Compliant file generation method based on openxml analysis and template deep configuration

By using OpenXml parsing and deep template configuration, a unified mapping and dynamic adjustment of audit information in the file is achieved, which solves the problem of separation between the structure layer and interface layer in the generation of compliance documents in the existing technology, and improves the compliance and audit transparency of the documents.

CN121614451BActive Publication Date: 2026-06-05CHENGDU HONGRUI TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHENGDU HONGRUI TECH
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing compliance document generation solutions lack the ability to deeply analyze and dynamically inject OpenXml structures, resulting in a lack of unified mapping between the structural and interface layers in the audit information recording mechanism. This makes it difficult to support full-process audit management, and the compliance of documents is difficult to be objectively verified outside the generation environment.

Method used

By using OpenXml parsing and deep template configuration, we collect and preprocess structure mapping data, node location data, and binding rule data to build a standardized audit status dataset. We dynamically adjust the audit description generation process to achieve consistent association between annotation content and structure fields, and simultaneously complete the embedding of interface annotations and structured audit content during the file export stage.

Benefits of technology

It enhances the closedness and integrity of the audit chain, ensures the immutability and audit transparency of documents in the archiving environment, and has semantic readability and integrity verification capabilities, avoiding the break between interface semantics and structural records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121614451B_ABST
    Figure CN121614451B_ABST
Patent Text Reader

Abstract

The application discloses a compliance file generation method based on OpenXml analysis and template deep configuration, and relates to the technical field of file generation.The compliance file generation method based on OpenXml analysis and template deep configuration comprises the following steps: S1, collecting and preprocessing structure mapping data, node positioning data and binding rule data in a file audit process, and constructing a standardized audit state data set; S2, analyzing the information integrity of the structured audit, and adjusting an audit description generation process; S3, evaluating the mapping redundancy degree of the audit chain, and adjusting a redundancy writing strategy; S4, evaluating the consistency of the audit data, and identifying the matching accuracy of the annotation insertion and the structure binding relationship; and S5, completing interface annotation reservation and audit content embedding, and generating a compliance file.The method solves the problem that the audit information recording mechanism lacks unified mapping capability of the structure layer and the interface layer, and the audit chain is prone to be broken, so that the whole-process audit management cannot be supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of document generation technology, specifically a method for generating compliant documents based on OpenXml parsing and deep template configuration. Background Technology

[0002] With increasingly stringent standards for information system auditing, compliance supervision, and document archiving, document output processes for scenarios such as internal auditing, external auditing, and regulatory reporting are no longer limited to traditional content export and format restoration. Instead, they are gradually evolving into complex document generation tasks that integrate multi-level structural information and audit data. While current mainstream office software technically supports features such as annotations, revision tracking, and custom XML structure embedding, exporting documents to PDF or the final archived version still faces numerous problems, including information gaps between the interface display layer and the structural record layer, poor content display compatibility, and unverifiable structural metadata. For example, annotation content often exhibits semantic disconnects or misalignments during conversion between different platforms; audit records in the customXml node, although parsable by the program, cannot be visually displayed in the final file, affecting the integrity and transparency of the audit chain.

[0003] For example, the invention patent with announcement number CN113536740B provides a method and terminal for generating SPCD files based on SCD files. The method includes: extracting substation primary system information and physical connection information of substation secondary equipment from the SCD file; constructing the area and cabinet of the SPCD file according to voltage level, bay, and secondary equipment associated with the bay, and assigning IEDs in the SCD file to each cabinet; creating ODF devices for each cabinet and assigning ODF ports to the ODF devices; constructing a jumper list within the cabinet and connecting optical cables between cabinets based on the physical connection information of the equipment within the cabinet; associating each physical connection with an ODF port and optical fiber core; generating the SPCD file; and configuring the substation based on the SPCD file. This invention can avoid manual configuration by engineers, solve the problem of errors easily caused by manual configuration, and improve efficiency.

[0004] For example, the invention patent with announcement number CN111259634B involves a method for parsing and generating XSD format files. The parsing method includes: initializing a StreamReader class with the XSD file path as input, converting the XSD file into a Stream file, initializing an XmlDocument class object, and converting the file stream into the corresponding XmlDocument class; obtaining N Node blocks of the document, where each node object represents a single node in the XmlElement document tree; obtaining the name of the corresponding node and the attribute set of the node; and finally completing the parsing of the XSD and generating the corresponding XSD parsing class. This invention can directly call the relevant methods in the DLL class library of this invention to parse and generate XSD format files from XSD files.

[0005] Furthermore, existing compliance document generation solutions typically rely on template-driven content filling, lacking deep parsing and dynamic injection capabilities of OpenXml structures. This makes it difficult to uniformly write multi-dimensional information such as audit data, structural paths, annotation locations, and version identifiers. When handling complex business scenarios such as cross-system generation, automated audit summarization, and multi-file concatenation, traditional methods rely on manual insertion or nested static watermark pages, lacking a robust mechanism. This hinders version traceability and fails to support large-scale archiving needs. More importantly, existing export logic often lacks verification, encapsulation, and tamper detection designs for audit information. Once a file leaves the generation environment, its compliance becomes difficult to objectively verify, violating the core requirements of "archivable, verifiable, and tamper-proof" audit documents. Simultaneously, interface annotations, structural records, and version tags are often scattered across multiple logical locations, lacking a unified injection process and integrity verification mechanism, resulting in uncontrollable compliance risks for archived versions.

[0006] To address the above issues, there is an urgent need for a compliance document generation method based on OpenXml parsing and deep template configuration. Summary of the Invention

[0007] To address the shortcomings of existing technologies, this invention provides a compliance document generation method based on OpenXml parsing and deep template configuration, which solves the problem that the audit information recording mechanism lacks a unified mapping capability between the structural layer and the interface layer, leading to easy breakage of the audit chain and difficulty in supporting full-process audit management.

[0008] To achieve the above objectives, this invention employs the following technical solution: a compliance document generation method based on OpenXml parsing and deep template configuration, comprising: S1, collecting structural mapping data, node location data, and binding rule data during the document audit process, and preprocessing the collected structural mapping data, node location data, and binding rule data to construct a standardized audit status dataset; S2, based on the standardized audit status dataset, performing information analysis on the integrity of structured audit information from key fields in the annotation text, and dynamically adjusting the audit description generation process based on the information analysis results; S3, based on the standardized audit status dataset, performing redundancy assessment on the mapping redundancy of the audit chain, and dynamically executing structural anchor point synchronization and redundancy writing strategy adjustments based on the redundancy assessment results; S4, using the information analysis results and redundancy assessment results as input, performing consistency assessment on the consistency of audit data, and identifying the matching accuracy of annotation insertion and structural binding relationships based on the consistency assessment results; S5, simultaneously completing the retention of interface annotations and the embedding of structured audit content during the document export stage, generating a compliance document with semantic readability and integrity verification capabilities.

[0009] Further, the specific steps for collecting structure mapping data, node positioning data, and binding rule data during the file auditing process are as follows: Collect structure mapping data for dynamically filled items, including: mapping node type, relative position index, length and total byte length of the audit ID number for annotations, total number of written audit records, number of audit insertion placeholders, total length of fields mapped to the structure, number of nodes without audit ID tags in the XML structure, total number of interface annotation records, number of bound audit records, and number of nodes with broken audit ID chains; Collect node positioning data after file parsing, including: the selected file location and structural path of the paragraph containing the annotation, and the node hierarchy number of the annotation insertion location in the XML path; Collect binding rule data during annotation generation, including: operation time, modified content and number of characters in the modified content fields, reason for modification, annotation field content, structural field content, operator, total length of the original annotation content, and remaining field capacity in the target customXml node, while simultaneously calculating and recording the average length of the annotation text and the average length of the structural fields.

[0010] Furthermore, the specific steps for preprocessing the collected structure mapping data, node positioning data, and binding rule data to construct a standardized audit status dataset are as follows: Perform field dimension expansion and type identifier conversion operations on the structure mapping data to uniformly map the mapping node types to a fixed enumeration encoding format; uniformly convert the relative position index to linear values ​​of the file structure, where the linear values ​​adopt a file sequential indexing strategy, numbering them according to the top-down and left-to-right arrangement order of the annotation nodes in the original structure; extract and retain integer fields for the length of the audit ID number and the total byte length of the annotations; retain the original count values ​​for the total number of written audit records, the number of audit insertion placeholders, and the field length mapped and written to the structure; directly extract the original values ​​for the number of nodes without audit ID tags, the total number of interface annotation records, the number of bound audit records, and the number of nodes with broken audit ID chains in the XML structure; and select the file for the annotation in the node positioning data. The text path parsing is performed on the location and structural path of the paragraph; the hierarchical number of the annotation insertion position in the XML path is used as the baseline dimension of structural nesting depth and aligned with the path structure of the mapped nodes; for the binding rule data in the annotation generation process, the operation time is converted into a standard integer timestamp after character parsing, and recorded as the annotation timestamp value; the modified content is mapped to a fixed-length numerical value based on the operation dictionary to obtain the keyword encoding value of the modified content; the modification reason is converted into a phrase number based on the classification thesaurus and recorded as the semantic compression value of the modification reason; the operator is connected to the salt value of AUDIT-SALT-2025 and processed using the SHA-256 hash function to obtain an unsigned value, recorded as the operator hash perturbation value; the annotation field content and the structural field content are compared and statistically analyzed item by item to obtain the inconsistency node ratio; the standardized structural mapping data, node positioning data and binding rule data are normalized to construct a standardized audit status dataset.

[0011] Furthermore, the specific steps for analyzing the information integrity of structured audit information from key fields in the annotation text based on the standardized audit status dataset are as follows: Obtain the selected file structure location and the structure path of the paragraph after file parsing; input the structure path into the number mapping algorithm, and combine the mapping node type and relative position index to obtain a unique binding identifier value, recorded as the audit identifier value; add one to the annotation timestamp value and take its natural logarithm to obtain the time weighting value; add the audit identifier value to the square of the modified content keyword encoding value and then multiply it by the time weighting value to obtain the annotation density increase value; divide the annotation density increase value by the value after adding one to the modification reason semantic compression value and then round down to obtain the main audit level base value; add the operator hash perturbation value (remainder after dividing by ten) to the main audit level base value to obtain the standard audit information value.

[0012] Furthermore, the specific steps of the dynamic adjustment audit description generation process based on information analysis results are as follows: Real-time comparison of the standard audit information value of the current audit node with the audit evaluation threshold; when the standard audit information value is less than or equal to the audit evaluation threshold, the audit identifier is rebound, the structure mapping table entry corresponding to the current node is refreshed and the mapping index is updated, the annotation field secondary parsing is activated synchronously, the field segmentation is re-executed to generate a new audit description, the corresponding node is locked and subsequent non-audit modifications to the current content are stopped; when the standard audit information value is greater than the audit evaluation threshold, all structure binding information of the current audit node is retained, the position of the current audit description in the XML physical structure is fixed, and it serves as the final audit traceability anchor point.

[0013] Furthermore, the specific steps for redundancy assessment of the mapping redundancy degree of the audit chain based on the standardized audit status dataset are as follows: The product of the number of characters in the modified content field multiplied by the number of node levels in the XML path where the annotation is inserted is added to the square of the length of the audit ID number to obtain the structure load confirmation value; the total number of written audit records is incremented by one, and the result is taken as the natural logarithm to the base 10, then multiplied by the structure load confirmation value to obtain the audit trajectory density value; the total byte length of the current structured annotation is divided by the remaining field capacity in the target customXml node plus one, and then added to the number of audit insertion placeholders to obtain the data carrying strength value; the total length of the original annotation content is subtracted from the length of the currently mapped fields written to the structure, and the square is taken, then divided by the number of nodes without audit ID tags plus one to obtain the mapping missing risk value; the audit trajectory density value is divided by the data carrying strength value and then added to the mapping missing risk value to obtain the structure mapping redundancy value.

[0014] Furthermore, the specific steps for dynamically executing structural anchor point synchronization and redundant writing strategy adjustment based on redundancy assessment results are as follows: Real-time comparison of the structural mapping redundancy value and the structural mapping redundancy threshold of the current structural layer: When the structural mapping redundancy value is less than or equal to the structural mapping redundancy threshold, a redundant paragraph node containing complete upper and lower level paragraphs, tables, and annotation reference chains is appended to the file structure as backup content for the main file structure. An extended tag associated with the original node is written, and a nested association is established between the extended tag and the main file content through a relational file. Simultaneously, the reference paths between each paragraph and annotation recorded in the file are reactivated. The structural mapping position of the original annotation is extracted from the extended tag, and the starting paragraph and corresponding range of the original annotation in the main file are reverse-marked. Finally, structural repair suggestions are generated by calling the mapping verification component corresponding to the file's extended tag. When the structural mapping redundancy value is greater than the structural mapping redundancy threshold, the annotation update permission of the current node is frozen and the structural segment is sealed. The main writing channel is switched to the backup mapping path.

[0015] Furthermore, the specific steps for assessing the consistency of audit data using information analysis results and redundancy assessment results as input are as follows: Square the number of audit ID broken links, add one, and take the natural logarithm. Add this to the absolute value of the difference between the total number of interface annotation records and the number of bound audit records, and the product of the standard audit information value and the structural mapping redundancy value, to obtain the annotation broken link growth value. Cube the absolute value of the difference between the average length of the annotation text and the average length of the structural record fields, add one, and then take the square root to obtain the field semantic matching deviation value. Take the natural constant as the power of the ratio of inconsistent field nodes, multiply this by the annotation broken link growth value, and divide by the field semantic matching deviation value to obtain the audit consistency verification value.

[0016] Further, the specific steps for identifying the matching accuracy of annotation insertion and structural binding relationship based on the consistency assessment result are as follows: Real-time comparison of the current audit consistency verification value with the consistency verification threshold, which includes a first verification threshold and a second verification threshold, wherein the first verification threshold is greater than the second verification threshold; when the audit consistency verification value is less than or equal to the second verification threshold, redundant annotation entries are added, structural tracing and semantic reconstruction are performed on all broken annotation nodes, and the reconstruction results are inserted into the interface layer in the form of temporary markers for user confirmation; when the audit consistency verification value is greater than the second verification threshold and less than or equal to the first verification threshold, bidirectional verification is performed on the audit ID mapping relationship in the current file, and all missing fields in the structural layer and no annotation statements in the interface layer are marked; when the audit consistency verification value is greater than the first verification threshold, the audit flow path of the current file is stopped, and an audit consistency anomaly report is forcibly generated, while the compliance status marker of the current file is frozen, and flow is resumed after the consistency verification of annotations and structural records is completed.

[0017] Furthermore, the specific steps for simultaneously retaining interface annotations and embedding structured audit content during the file export stage to generate a compliant file with semantic readability and integrity verification capabilities are as follows: Combining the processing results based on audit consistency verification values ​​and the export target format, a dual injection process of audit information is performed on the file: all annotation content of the interface layer is retained in the file, all nodes in the customXml structure are traversed, all audit record entries are formatted into structured text content, and a read-only watermark page is generated and inserted at the end of the file at the specified page position as an uneditable structured audit backup; a compliance audit completion identifier is inserted in the footer of each page of all exported files, along with the current export version number and the integrity hash code obtained based on the node content, and finally the file is output.

[0018] Beneficial effects

[0019] The present invention has the following beneficial effects:

[0020] (1) The compliance document generation method based on OpenXml parsing and deep template configuration improves the closedness and reference integrity of the audit chain by automatically identifying broken chain nodes, unmapped fields and unbound records, and combining them with the annotation structure for linkage processing.

[0021] (2) The compliance file generation method based on OpenXml parsing and template deep configuration determines and corrects the injection position by extracting structure mapping data and node positioning data, so as to achieve consistent association between annotation content and structure fields and avoid the break between interface semantics and structure records.

[0022] (3) The compliance document generation method based on OpenXml parsing and deep template configuration improves the immutability and audit transparency of the document in the archive environment by parsing the audit nodes under the customXml structure and generating a read-only watermark page.

[0023] (4) The compliance document generation method based on OpenXml parsing and deep template configuration ensures that the document has the dual expressive capabilities of visual annotation and structural backup by synchronously injecting interface annotations and structured audit records during the export stage.

[0024] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description

[0025] Figure 1 This is a flowchart of the compliance document generation method based on OpenXml parsing and deep template configuration of the present invention;

[0026] Figure 2 This is a distribution map of the principal components of the features involved in this invention;

[0027] Figure 3 This is a line graph of the audit consistency verification values ​​involved in this invention;

[0028] Figure 4 This is the final document integrity overlay diagram involved in this invention. Detailed Implementation

[0029] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] Please see Figures 1-4This invention provides a technical solution: a compliance document generation method based on OpenXml parsing and deep template configuration, comprising: S1, collecting structure mapping data, node positioning data, and binding rule data during the document audit process, and preprocessing the collected structure mapping data, node positioning data, and binding rule data to construct a standardized audit status dataset; S2, based on the standardized audit status dataset, performing information analysis on the information integrity of structured audit from key fields in the annotation text, and dynamically adjusting the audit description generation process based on the information analysis results; S3, based on the standardized audit status dataset, performing redundancy assessment on the mapping redundancy of the audit chain, and dynamically executing structure anchor point synchronization and redundancy writing strategy adjustment based on the redundancy assessment results; S4, using the information analysis results and redundancy assessment results as input, performing consistency assessment on the consistency of audit data, and identifying the matching accuracy of annotation insertion and structure binding relationship based on the consistency assessment results; S5, simultaneously completing the retention of interface annotations and embedding of structured audit content during the document export stage, generating a compliance document with semantic readability and integrity verification capabilities.

[0031] Specifically, the steps for collecting structure mapping data, node location data, and binding rule data during the document auditing process are as follows: Collect structure mapping data for dynamically filled items. This data includes: mapping node type, relative position index, length and total byte length of the audit ID number for annotations, total number of written audit records, number of audit insertion placeholders, total length of fields mapped to the structure, number of nodes without audit ID tags in the XML structure, total number of interface annotation records, number of bound audit records, and number of audit ID break nodes. While collecting this data, the order of document content presentation is also considered to mark the sequential position of each annotation's corresponding node within the entire document structure. This more clearly reflects the distribution of audit information and reflects the density of structure filling based on the cumulative field length, enabling intuitive identification of weak points and broken chain clusters during subsequent consistency assessments.

[0032] Collect node location data after file parsing. The node location data includes: the file location of the annotation and the structural path of the paragraph in which it is located, and the node level of the annotation insertion position in the XML path. By explicitly recording the nesting depth and path direction of the paragraph in which the annotation is located in the structural path, the annotation behavior has a complete index anchor point at the structural level, which facilitates the unified analysis of the annotation behavior trend, structural association strength and spatial distribution characteristics in the same paragraph.

[0033] The binding rule data collected during the annotation generation process includes: operation time, modified content and the number of characters in the modified content fields, reason for modification, annotation field content, structure field content, operator, total length of the original annotation content, and remaining field capacity in the target customXml node. Simultaneously, the average length of the annotation text and the average length of the structure fields are calculated and recorded. This information comprehensively presents the differentiated characteristics of annotation behavior across time, text expression, and structure occupancy dimensions. It not only reveals the consistency trend between annotation content and structure content but also demonstrates the current structural capacity based on the remaining field capacity, providing an accurate basis for judging the saturation of annotation content mapping.

[0034] This implementation plan comprehensively grasps the mapping status and content association characteristics between annotations and structures during the dynamic filling process. By jointly collecting structural mapping data, node positioning data, and binding rule data, a complete audit information view covering the source location of annotations, structural carrying capacity, and differences in content expression can be formed. This provides a data foundation for subsequent audit chain integrity analysis, mapping consistency judgment, and annotation chain break repair strategies, ensuring that document audit information has a verifiable correspondence and a traceable association path between the structural layer and the interface layer.

[0035] Specifically, the preprocessing of the collected structural mapping data, node location data, and binding rule data to construct a standardized audit status dataset involves the following steps: First, performing field dimension expansion and type identifier conversion operations on the structural mapping data to uniformly map the mapping node types to a fixed enumeration encoding format. Simultaneously, when recording the mapping node types, their semantic attributes within the document structure are supplemented to reflect the differences in the impact of different node types on the audit chain during subsequent consistency analysis. Second, the relative position index is uniformly converted into linear values ​​of the file structure. These linear values ​​employ a file sequential indexing strategy, numbered according to the top-down and left-to-right arrangement of annotation nodes in the original structure, ensuring that each... The annotation location has a unique and traceable sequential identifier at the structural layer, enhancing subsequent path tracing and paragraph association capabilities; the length of the audit ID number and the total byte length of the annotation are extracted and retained as integer fields, while their distribution position in the document indicates the sufficiency of the annotation data volume; the original count values ​​of the total number of written audit records, the number of audit insertion placeholders, and the length of fields mapped to the structure are retained, so that the field carrying capacity and its proportion can be fully reflected; the original values ​​of the number of nodes without audit ID tags, the total number of interface annotation records, the number of bound audit records, and the number of nodes with broken audit ID chains in the XML structure are directly extracted to present the integrity of the audit chain and the level of mapping effectiveness.

[0036] Text path parsing is performed on the selected file location and the structural path of the paragraph containing the annotation in the node positioning data. During the parsing process, the positions of each segment involved in the path are explicitly indexed so that the structural path can truly reflect the nesting direction of the paragraph containing the annotation in the overall document structure. The number of the level of the annotation insertion position in the XML path is used as the baseline dimension of the structural nesting depth and aligned with the mapping node path structure to clearly show the depth differences of different annotations in the document structure and their impact on structural consistency.

[0037] For the binding rule data in the annotation generation process, the operation time is converted into a standard integer timestamp after character parsing and recorded as the annotation timestamp value, giving the audit behavior a sortable attribute in the time dimension; the modified content is mapped to a fixed-length numerical value based on the operation dictionary to obtain the keyword encoding value of the modified content, so that the hidden behavioral intentions in different expression forms can be uniformly represented; the modification reason is converted into a phrase number based on the classification thesaurus and recorded as the semantic compression value of the modification reason, which is used to reflect the attribution relationship of the audit motivation in the structural comparison process; after the operator is connected to the salt value of AUDIT-SALT-2025, it is processed by the SHA-256 hash function to obtain an unsigned value, which is recorded as the operator hash perturbation value, so that the operation behavior has a distinguishable identity trajectory expression; the annotation field content and the structural field content are compared and statistically analyzed item by item to obtain the field inconsistency node ratio, so that the degree of deviation between the annotation text and the structural content can be quantitatively presented.

[0038] Finally, the standardized structural mapping data, node positioning data, and binding rule data are uniformly adjusted to maintain a consistent basis for comparison in numerical feature expression. A standardized audit status dataset is constructed to support subsequent comprehensive analysis and judgment on the integrity of the audit chain, mapping accuracy, and content consistency.

[0039] This implementation plan standardizes the structural representation of audit-related data, enabling annotation behavior, structural location characteristics, and content association status to be analyzed and quantified within the same data dimension and logical framework. This constructs a clear, consistent, and comparable audit status data foundation. Through this step, various types of data information, originally scattered across the interface and structural layers, are transformed into a standardized structure that can be directly used for comparative analysis. This structure can be used for subsequent audit chain integrity identification, mapping deviation quantification, and consistency risk assessment, ensuring that all audit information generated by dynamic reporting is traceable and contributes effectively in subsequent analysis processes.

[0040] Specifically, based on a standardized audit status dataset, the information analysis of the integrity of structured audit information from key fields in the annotation text involves the following steps: First, obtain the selected file structure location and paragraph structure path after file parsing. Then, input the structure path into a number mapping algorithm and combine it with the mapping node type and relative position index to obtain a unique binding identifier value, denoted as the audit identifier value. Next, add one to the annotation timestamp value and take its natural logarithm to obtain the time-weighted value. Then, add the audit identifier value to the square of the modified content keyword encoding value and multiply it by the time-weighted value to obtain the annotation density increase value. Finally, divide the annotation density increase value by the value obtained after adding one to the modification reason semantic compression value and round down to obtain the main audit level base value. Finally, add the operator hash perturbation value (remainder after dividing by ten) to the main audit level base value to obtain the standard audit information value.

[0041] The standard audit information value is calculated using the following formula:

[0042] ;

[0043] In the formula, S represents the standard audit information value, which is used to quantitatively characterize the comprehensive audit status of a single audit node under multi-dimensional information including structural binding stability, time behavior characteristics, operational semantic density and operator disturbance factors. It is the basic judgment indicator for subsequent audit process scheduling and audit description generation strategy selection. This represents the timestamp value of the annotation, which is used to quantify the time characteristics of the annotation insertion time. It is an important basic field for expressing the timing of audit actions. It is derived from the operation time field extracted from the annotation content stream and converted into a standard integer timestamp after character parsing. The value of the audit identifier is used to identify the structured anchor point position corresponding to each annotation node. It is the core index for establishing the binding relationship between annotation information and OpenXml structure nodes, and it comes from the structure mapping information. The keyword encoding value represents the modified content and is used to express the main operation described in the annotation. It is the basic variable for identifying the semantic category of the operation and matching the type of structural action. It is derived from the modified content field extracted from the annotation content stream and mapped to a fixed-length value based on the operation dictionary. The modified reason semantic compression value is used to reflect the reasonable explanation of the modification operation in the annotation. It is an auxiliary indicator for judging the legitimacy of changes in the structural compliance review. It is derived from the modified reason field in the annotation content flow and converted into a phrase number based on the classification thesaurus. This represents the operator's hash perturbation value, used to enhance the uniqueness and traceability of the generated audit information block. It is an important perturbation item for identifying the person responsible for the annotation, derived from the operator field in the annotation content stream, and is a numerical representation obtained after processing by a hash function.

[0044] In this implementation plan, the importance of annotation behavior in the audit process is transformed into quantifiable standard audit information values, which serve as core foundational variables for subsequent audit consistency comparison and integrity verification. By simultaneously considering the temporal characteristics of annotation insertion, the annotation's position in the document structure, the semantic criticality of the modified content, the standardization level of the operation expression, and the anti-counterfeiting capabilities, this formula can comprehensively reflect the contribution of each annotation behavior to the effectiveness of the audit chain, the accuracy of information expression, and the credibility of structural mapping. This transforms the audit value judgment, which originally relied on manual perception, into a numerical expression that can be directly used for calculation and comparison, supporting quantitative decision-making throughout the entire process of audit information coverage assessment, consistency deviation identification, and abnormal risk classification and handling.

[0045] Specifically, the steps for dynamically adjusting the audit description generation process based on information analysis results are as follows: First, the standard audit information value of the current audit node is compared with the audit evaluation threshold in real time to determine the node's effective contribution and structural binding quality within the audit chain. When the standard audit information value is less than or equal to the audit evaluation threshold, the current audit node is considered a risk node with incomplete audit expression. This immediately triggers the audit identifier rebinding process, refreshing the corresponding structural mapping table entry based on the updated structural path information and synchronously updating the mapping index, thus re-solidifying the link between annotations and structural fields in the OpenXml attribute structure. Second, the annotation field undergoes secondary parsing, splitting the annotation text into semantic segments and generating audit descriptions that better meet audit expression requirements, ensuring that key audit content forms a clear and traceable expression chain at the structural layer. To prevent risk nodes from deviating from their intended purpose before audit verification, the node is locked, suspending all content changes except for audit-related operations, ensuring the continued effectiveness of the node's audit from the structural source.

[0046] When the standard audit information value is greater than the audit assessment threshold, it is determined that the node has fully assumed audit responsibilities and has stable traceability value. Its current structural binding information remains unchanged, and the generated audit description is solidified in the XML physical structure in its final state, making the node an audit traceability anchor point that can be directly referenced to support accurate verification in the process of audit traceability and compliance record archiving.

[0047] like Figure 2The diagram shows a principal component scatter plot provided in this application example. By projecting the variables of audit identifier value, annotation timestamp value, and keyword encoding value through dimensionality reduction, it reveals the main structural association patterns between fields. The horizontal axis represents principal component 1, and the vertical axis represents principal component 2. Each point represents a document structure node, and its position is determined by the two principal axis directions after dimensionality reduction via principal component analysis. The colors are automatically labeled by the KMeans clustering results to distinguish the similarity of structural characteristics. The color intensity reflects the clustering affiliation of nodes in high-dimensional space. For example, nodes 2 and 5, with similar colors, indicate similar structural features in the dimensions of audit ID length, total annotation byte length, and the number of node levels in the XML path; while node 7, with a significantly different position, represents a structurally different configuration, suggesting a unique insertion pattern and special nesting characteristics. The color bars on the right side of the diagram indicate clustering label values, which do not directly represent specific numerical values ​​but serve as a reference for the category of structural clustering. The principal component scatter plot is used to identify the consistency characteristics, abnormal clustering trends, and classification boundaries of structural nodes, providing data support for the audit backup of compliant document structures, injection path optimization, and node template configuration.

[0048] This implementation plan dynamically assesses the audit reliability of nodes by comparing the standard audit information values ​​of the current audit node with the audit evaluation threshold in real time, thereby achieving automatic verification and hierarchical processing of the audit chain structure quality. When there is a risk of incomplete audit representation at a node, identifier rebinding and content re-parsing operations are performed promptly to ensure that audit information can be fully identified at the structural layer and form a continuously traceable representation chain, avoiding audit breakpoints caused by missing mappings. When the node audit representation meets the completeness requirements, the structural binding is directly solidified, achieving archiveable audit anchoring records. Ultimately, this ensures that all audit nodes can accurately present their compliance traceability value in a structured manner in the document, improving audit consistency, enhancing the verifiability of the audit chain, and supporting subsequent audit tracing and compliance verification processes.

[0049] Specifically, based on the standardized audit status dataset, the redundancy assessment of the mapping redundancy of the audit chain involves the following steps: First, multiply the number of characters in the modified content field by the number of node levels in the XML path where the annotation is inserted, and add this product to the square of the audit ID length to obtain the structure load confirmation value. Second, add one to the total number of written audit records, take the natural logarithm to base 10, and multiply this by the structure load confirmation value to obtain the audit trajectory density value. Third, divide the total byte length of the current structured annotation by the remaining field capacity in the target customXml node plus one, and add this value to the number of audit insertion placeholders to obtain the data carrying strength value. Fourth, subtract the length of the currently mapped fields from the total length of the original annotation content, take the square of this value, and divide this by the number of nodes without audit IDs plus one to obtain the mapping missing risk value. Finally, divide the audit trajectory density value by the data carrying strength value and add this value to the mapping missing risk value to obtain the structure mapping redundancy value.

[0050] The formula for calculating the structural mapping redundancy value is:

[0051] ;

[0052] In the formula, V represents the structural mapping redundancy value, which is used to comprehensively quantify the mapping load intensity and structural redundancy introduced by the current annotation in the structured writing process. It is an important evaluation indicator to measure whether the audit information in the XML structural mapping has path congestion, excessive node load or high writing complexity. This indicates the length of the audit ID number of the current annotation, used to identify the uniqueness of each audit anchor point. It is a fundamental indicator for ensuring the consistency of structural mapping and originates from the generation of audit identifiers. The number of characters in the modified content field of the annotation is used to quantify the textual impact of the user's modification of the document structure. It is a core parameter for evaluating the load intensity of the structure mapping and is derived from the structured field extraction. This indicates the node level of the annotation insertion position in the XML path. It is used to measure the path nesting complexity during the audit information writing process and is a mapping indicator of the strength of the nested structure mapping logic. It is derived from the target XML structure path parsing. This represents the total number of audit records that have been written. It is used to characterize the cumulative depth of historical audit traces and is an important variable for measuring the density of mapping nodes. It is derived from the scanning of XML structure historical records. This indicates the number of placeholders inserted for auditing purposes, used to limit nesting. <record>The upper limit on the number of writes is a limiting factor for the capacity of the structure mapping template, derived from the OpenXml template structure tag scanning; The total byte length of the current structured annotation is used to reflect the data load strength of the actual audit text in the structure mapping. It is a metric parameter for the accuracy of audit information writing and comes from the standard annotation block output module. G represents the field capacity margin in the target customXml node. It is used to represent the available space of the current structure and is a space variable for structure write conflict judgment. It comes from the structure node space estimation. This indicates the total length of the original annotation content. It is used to compare the degree of information retention during the structure mapping process and serves as an input value for audit integrity matching. It originates from the original Word annotation content stream. This represents the total length of fields currently mapped and written to the structure. It reflects the precision of data retention in the embedded structure and serves as a benchmark for integrity verification during the mapping process. It originates from XML node readback verification. This indicates the number of nodes in the current XML structure that lack audit ID tags. It is used to identify potential omissions in audit information and serves as a quantitative indicator for early warning of structural integrity risks. It originates from reverse structural verification.

[0053] This implementation plan quantifies the redundancy and integrity of audit record mappings in the structural layer. It evaluates the current audit information's carrying strength and sustainable writing capability within the XML physical structure path by jointly calculating core attributes such as audit ID length, node hierarchy position, description content size, cumulative write history, structural field capacity sufficiency, and content mapping offset. This formula supports the quantitative determination of structural mapping robustness and serves as a core basis for audit consistency evaluation. It maintains the integrity and security of record mappings, ensuring that the final document possesses verifiable structured audit evidence during the compliance archiving stage.

[0054] Specifically, the steps for dynamically executing structural anchor point synchronization and redundant writing strategy adjustments based on redundancy assessment results are as follows: Real-time comparison of the structural mapping redundancy value and the structural mapping redundancy threshold of the current structural layer. When the structural mapping redundancy value is less than or equal to the structural mapping redundancy threshold, a redundant paragraph node containing complete upper and lower level paragraph, table, and annotation reference chains is appended to the file structure and reserved as backup content for the main file structure. Simultaneously, fields related to this node are written to the file in the form of extended tags, creating a traceable nested relationship between the extended tags and the main file content. The existing reference paths between paragraphs and annotations within the file structure are reactivated, ensuring that the structural mapping position in the extended tags corresponds to the actual projection of the original annotation in the file. Subsequently, based on the historical writing range indicated by the extended tags, the starting paragraph and covered area of ​​the annotation in the main file structure are located in reverse order, maintaining the original sequential structure without displacement. The inherent component responsible for performing mapping verification in the file automatically triggers the comparison process, providing structural repair suggestions as the basis for subsequent audit recovery.

[0055] When the structural mapping redundancy value exceeds the structural mapping redundancy threshold, the existing structural mapping relationship is maintained without any migration. The annotation update permission of the current node is immediately frozen, and the structural segment corresponding to the node is put in a sealed state. At the same time, the write direction is switched to the backup mapping path to ensure that the file content still has the ability to continuously record without affecting the stability and complete archiving characteristics of the existing audit records.

[0056] In this implementation plan, by comparing the redundancy value of the structure mapping with the redundancy threshold of the structure mapping in real time, the system can instantly determine the load status of the structure mapping of annotations in the file. This allows for timely supplementation of redundant paragraph nodes and repair of reference links when the structure mapping is insufficient, thereby improving the continuity and fault tolerance of the structure mapping chain. At the same time, when the structure mapping is sufficient, the system locks the existing structure status and guides the write path to switch to the backup channel to prevent annotation updates from disturbing the existing structure. Overall, this ensures the structural stability, mapping consistency, and audit content integrity of the file during the continuous filling process.

[0057] Specifically, using information analysis results and redundancy assessment results as input, the consistency assessment of audit data involves the following steps: Square the number of audit ID broken links, add one, and take the natural logarithm. Add this to the absolute value of the difference between the total number of interface annotation records and the number of bound audit records, and the product of the standard audit information value and the structural mapping redundancy value to obtain the annotation broken link growth value. Cube the absolute value of the difference between the average length of the annotation text and the average length of the structure record fields, add one, and then take the square root to obtain the field semantic matching deviation value. Take the natural constant as the power of the ratio of inconsistent field nodes, multiply this by the annotation broken link growth value, and divide by the field semantic matching deviation value to obtain the audit consistency verification value. The formula for calculating the audit consistency verification value is:

[0058] ;

[0059] In the formula, The audit consistency check value is used to comprehensively quantify the degree of consistency between interface layer annotation records and structure layer audit records in multiple dimensions, including quantity correspondence, audit identifier continuity, field semantic consistency, and structure mapping carrying status. It is the core check indicator for determining whether the current audit chain meets the requirements of structured storage and traceability; S represents the standard audit information value. Indicates the redundant value of the structure mapping; This represents the total number of annotation records in the interface. It is used to quantify the total number of annotations inserted by the user through the interface in the current Word document. It is a basic indicator for subsequent consistency comparison with the structure layer data and is derived from the traversal and extraction results of the Word content stream by the annotation data acquisition module. This indicates the number of audit records that have been bound, used to count the number of records in the customXml structure. <audittrail>Under the master node <record>The total number of child nodes is a key indicator for determining whether the structure storage has completed the mapping of complete audit records, and it comes from the parsing results of the XML structure information in the structure layer; This indicates the number of audit ID breakpoints, used to identify the number of times the interface layer annotations and structure layer audit nodes fail to match in the audit ID field. It is an important basis for identifying audit chain breakpoints and is derived from the matching and verification of the audit ID, annotation record and structure node ternary path in the structure mapping table. The inconsistency ratio of fields is used to measure the difference in expression of key content items between the interface annotation fields and the structure record fields. It is an important indicator for detecting semantic synchronization failure and is derived from the item-by-item comparison and statistics of the annotation field content and the structure field content. This represents the average length of the annotation text, used to quantify the average number of words in the annotation content at the user interface layer. It is an important linguistic dimension indicator for evaluating semantic integrity and expressive standardization, and is derived from the statistical aggregation results of the annotation content parsing process. The average length of the structure record field is used to evaluate the average expression length of the field content of each audit node in customXml. It serves as a reference for aligning with the annotation content in the semantic dimension and is derived from the analysis of the structure record content. e represents the natural constant, which is used as the exponential modulation base to participate in the nonlinear amplification calculation of the audit consistency verification value. It is used to enhance the weight of the impact of the inconsistency node ratio and the redundancy value of the structure mapping on the overall audit consistency result.

[0060] In this implementation example, the total number of interface annotation records in document one is set to 28, the number of bound audit records is 10, the number of audit ID broken nodes is 0.40, the standard audit information value is 5, the structure mapping redundancy value is 0.80, the field inconsistency node ratio is 0.60, the average length of annotation text is 3.1, and the average length of structure record fields is 2.80.

[0061] The total number of interface annotation records in Document 2 is set to 25, the number of bound audit records is 9, the number of audit ID broken nodes is 0.30, the standard audit information value is 4, the structure mapping redundancy value is 0.70, the field inconsistency node ratio is 0.50, the average length of annotation text is 2.9, and the average length of structure record fields is 2.70.

[0062] The total number of interface annotation records in Document 3 is set to 30, the number of bound audit records is 11, the number of audit ID broken nodes is 0.50, the standard audit information value is 6, the structure mapping redundancy value is 0.85, the field inconsistency node ratio is 0.65, the average length of annotation text is 3.2, and the average length of structure record fields is 2.90.

[0063] The total number of interface annotation records in Document 4 is set to 27, the number of bound audit records is 10, the number of audit ID broken nodes is 0.35, the standard audit information value is 5, the structure mapping redundancy value is 0.75, the field inconsistency node ratio is 0.58, the average length of annotation text is 3.0, and the average length of structure record fields is 2.75.

[0064] The total number of interface annotation records in Document 5 is set to 29, the number of bound audit records is 12, the number of audit ID broken nodes is 0.45, the standard audit information value is 6, the structure mapping redundancy value is 0.80, the field inconsistency node ratio is 0.62, the average length of annotation text is 3.3, and the average length of structure record fields is 3.00.

[0065] The total number of interface annotation records in document six is ​​set to 26, the number of bound audit records is 9, the number of audit ID broken links is 0.38, the standard audit information value is 4, the structure mapping redundancy value is 0.72, the field inconsistency node ratio is 0.55, the average length of annotation text is 3.0, and the average length of structure record fields is 2.85.

[0066] The total number of interface annotation records in document seven is set to 31, the number of bound audit records is 11, the number of audit ID broken links is 0.42, the standard audit information value is 5, the structure mapping redundancy value is 0.78, the field inconsistency node ratio is 0.61, the average length of annotation text is 3.1, and the average length of structure record fields is 2.95. The audit consistency verification value for each document is calculated, as shown in Table 1, the audit consistency verification value data table.

[0067] Table 1 Audit Consistency Verification Values ​​Data Table

[0068]

[0069] like Figure 3 As shown in Table 1, this is a line graph of the audit consistency verification values ​​provided in this application example. Figure 3 As can be seen, Document 3 has the highest audit consistency check value, indicating that its annotation structure has a large number of broken chain nodes, serious mismatch in semantic mapping relationships, and a high proportion of missing fields. This comprehensively reflects that the document has an extremely high risk of structural closure in the current audit process, great difficulty in semantic restoration, and strong uncertainty in compliance status. Its audit flow path should be terminated immediately and its compliance mark frozen. Flow can only be resumed after the consistency check of annotations and structural records is completed. Document 2 has the lowest audit consistency check value, indicating that its annotation structure has a high degree of closure, accurate field mapping, and sufficient compression of redundant content. Its overall structure is stable and semantics are clear, meeting the consistency standard requirements. It can enter the standard audit channel and serve as a benchmark sample for mapping relationship verification, effectively supporting the structural alignment and annotation completion of other documents, and improving the overall stability and efficiency of batch audits. The line chart of audit consistency verification values ​​intuitively reflects the differences in structural mapping integrity and annotation semantic coherence among multiple documents. The higher the audit consistency verification value, the greater the risk of structural chain breakage and the stronger the semantic consistency difference in the current document. Structural tracing, semantic reconstruction, and compliance interruption operations should be triggered first. The lower the audit consistency verification value, the more it indicates that it has completed structural closure and semantic binding. It can be used as a trusted sample to participate in two-way mapping verification and manual revision marking reference, supporting the stable implementation of subsequent audit consistency processing procedures.

[0070] Specifically, the steps for identifying the accuracy of the matching relationship between annotation insertion and structural binding based on the consistency assessment results are as follows: Real-time comparison of the current audit consistency check value with the consistency check threshold. The consistency check threshold includes a first check threshold and a second check threshold, where the first check threshold is greater than the second check threshold. This first check threshold is used as the dynamic judgment benchmark for the current document audit integrity status.

[0071] When the audit consistency check value is less than or equal to the second check threshold, the current file is considered to have a significant consistency deficiency. Redundant annotations are immediately added. Based on the total number of annotation records in the interface and the structural mapping relationship, a source-based structural tracing and semantic reconstruction is performed on all broken annotation nodes. The tracing results are inserted as temporary markers into the corresponding paragraph area and the user is prompted to confirm with a prominent annotation. At the same time, subsequent extended writing of related annotation content is suspended to ensure that the addition operation can be completed first, so as to restore the most basic traceability capability.

[0072] When the audit consistency check value is greater than the second check threshold and less than or equal to the first check threshold, it indicates that the current file has basic consistency but still has potential omissions. At this time, bidirectional verification is performed on all audit ID mapping relationships in the file, cross-identifying the reliability of field correspondence between the interface layer and the structure layer, and explicitly marking all missing fields in the structure layer and paragraph ranges without comments in the interface layer. Automatic revision reminders are pushed to users to ensure that the file structure completion operation can continue to advance under normal flow conditions.

[0073] When the audit consistency check value exceeds the first check threshold, the current file is determined to have entered a consistency anomaly state. The audit flow path of the current file is immediately stopped, all write permissions involving annotations and structure mapping are frozen, an audit consistency anomaly report is forcibly generated, and the compliance status mark is locked at the file level. The flow state can only be restored after the consistency check between the annotation content and the structure record is completed, in order to avoid the continuous spread of erroneous records and maintain a strict audit trust chain at the document record level.

[0074] In this implementation plan, the consistency and reliability of audit information in the annotation structure mapping process are dynamically evaluated, and the consistency status level of the current document is classified accordingly. This determines whether to perform structure restoration, mapping correction and process termination, thus ensuring the integrity and traceability of the document audit chain.

[0075] Specifically, the process of simultaneously preserving interface annotations and embedding structured audit content during the file export stage to generate a compliance file with semantic readability and integrity verification capabilities involves the following steps: Combining the processing results based on audit consistency verification values ​​and the target export format, a dual-injection process of audit information is performed on the file to ensure that both the interface presentation layer and the structured data layer have complete traceability capabilities during the export stage. All annotation content from the interface layer is retained in the file, allowing users to clearly view the semantics and contextual relationships of the annotations after opening the file. Simultaneously, all nodes in the customXml structure are traversed, and each audit record entry is converted into structured text content. Based on this, a read-only watermark page is generated and inserted at the end of the file at a specified page position, making it an uneditable structured audit backup. The existence of this physical page ensures that the structural layer audit information is retained long-term and cannot be tampered with, thus providing reliable evidence for subsequent compliance traceability.

[0076] A compliance audit completion marker is inserted in the footer of each page of all exported files, providing a consistent audit status indication for the document. The current export version number is also appended, ensuring clear version identification even after multiple audit operations. Simultaneously, an integrity hash code based on the audit node content is calculated and written into the footer to support subsequent integrity verification and tamper detection. After completing these steps, the output file is completed, ensuring that the final audit deliverables possess both readable interface information and verifiable structural evidence, achieving the goal of exporting audit documents that are consistent, traceable, and have solidified content.

[0077] like Figure 4 The diagram shown is the final file integrity coverage diagram provided in this application example, used to reflect the audit injection integrity level and hash verification consistency fluctuation characteristics achieved by each structural node during the compliant document generation process. The horizontal axis represents the document structural nodes, and the left vertical axis is the structural coverage rate shown in the bar chart, indicating the proportion of compliant audit content injected into the current structural node; the closer the value is to 1, the higher the injection integrity. The right vertical axis is the hash difference value shown in the line chart, used to measure the consistency offset that may occur in the dual-channel generation process during document export; the smaller the value, the more consistent the structural content is across different export paths. Structures A and F in the diagram have high coverage rates of 0.92 and 0.88 respectively, and small hash difference values, indicating that these two structural contents have high stability during compliant insertion and multi-channel export. While structure D has the lowest coverage rate of 0.66, its hash difference value is the highest, indicating that this part faces the dual risks of insufficient insertion and content offset during the generation process.

[0078] In this implementation plan, after the audit consistency verification is completed, all relevant audit information is injected into the target file in a dual manner. This simultaneously solidifies the audit content at both the structural and interface levels, improving audit traceability and the integrity of the exported file. On one hand, by traversing all nodes in the customXml structure, each audit record is uniformly formatted into structured text, and a watermarked page with read-only attributes is inserted at the end of the file, forming an uneditable backup of the audit content. This ensures that even if interface-level annotations are modified or deleted, the audit data can still be recovered and traced. On the other hand, a compliance audit completion identifier is embedded in the footer of each page of the exported file, along with the current exported version number and an integrity hash code calculated based on the node content, ensuring the uniqueness and tamper-proof capability of the exported version. This step effectively constructs a two-layer audit protection mechanism from internal structure to external presentation, providing a reliable basis for compliance checks and version verification.

[0079] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0080] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.< / record> < / audittrail> < / record>

Claims

1. A compliance document generation method based on OpenXml parsing and deep template configuration, characterized by: include: S1, collect structural mapping data, node location data and binding rule data during the file audit process, and preprocess the collected structural mapping data, node location data and binding rule data to build a standardized audit status dataset; The specific steps for collecting structural mapping data, node location data, and binding rule data during the document auditing process are as follows: Collect the structure mapping data of the dynamically filled items. The structure mapping data includes: mapping node type, relative position index, length of the audit ID number and total byte length of the annotation, total number of written audit records, number of audit insertion placeholders, total length of fields mapped to the structure, number of nodes without audit ID tags in the XML structure, total number of interface annotation records, number of bound audit records, and number of nodes with broken audit ID chains. Collect node location data after file parsing. The node location data includes: the file location of the annotation and the structural path of the paragraph in which it is located, and the node level of the annotation insertion location in the XML path. Collect binding rule data during the annotation generation process. The binding rule data includes: operation time, modified content and number of characters in the modified content field, reason for modification, annotation field content, structure field content, operator, total length of the original annotation content, and remaining field capacity in the target customXml node. At the same time, calculate and record the average length of the annotation text and the average length of the structure field. S2, based on a standardized audit status dataset, performs information analysis on the information integrity of structured audits from key fields in the annotation text, and dynamically adjusts the audit description generation process based on the information analysis results; The specific steps for analyzing the information integrity of structured audits based on key fields in annotation text using a standardized audit status dataset are as follows: Obtain the structural location of the selected file structure and the structural path of the paragraph after the file is parsed. Input the structural path into the number mapping algorithm and combine it with the mapping node type and relative position index to obtain a unique binding identifier value, which is recorded as the audit identifier value. Add one to the annotation timestamp value and take the natural logarithm to obtain the time-weighted value; Add the audit identifier value to the square of the modified content keyword code value, and then multiply it by the time weighting value to obtain the annotation density increase value; Divide the annotation density increase value by the value of the modified reason semantic compression value plus one, and then round down to obtain the base value of the main audit level. The standard audit information value is obtained by taking the remainder after dividing the operator's hash perturbation value by ten and then adding it to the base value of the main audit level. S3, based on a standardized audit status dataset, performs a redundancy assessment on the mapping redundancy of the audit chain, and dynamically executes structural anchor point synchronization and redundancy writing strategy adjustments based on the redundancy assessment results; The specific steps for redundancy assessment of the mapping redundancy of the audit chain based on the standardized audit status dataset are as follows: Add the product of the number of characters in the modified content field and the number of node levels in the XML path where the comment is inserted, to the square of the length of the audit ID number to obtain the structural load confirmation value; Add one to the total number of audit records already written, take the natural logarithm to the base 10, and then multiply it by the structural load confirmation value to obtain the audit trajectory density value. The data carrying strength value is obtained by dividing the total byte length of the current structured annotation by the field capacity margin in the target customXml node plus one, and then adding the result to the number of audit insertion placeholders. The square of the original annotation content minus the length of the fields currently mapped and written to the structure is then divided by the number of nodes without audit IDs plus one to obtain the mapping missing risk value. The structural mapping redundancy value is obtained by dividing the audit trajectory density value by the data carrying strength value and then adding it to the mapping missing risk value. The specific steps for dynamically executing structural anchor point synchronization and redundant write strategy adjustment based on redundancy evaluation results are as follows: Real-time comparison of the structural mapping redundancy value and the structural mapping redundancy threshold of the current structural layer: When the structural mapping redundancy value is less than or equal to the structural mapping redundancy threshold, a redundant paragraph node containing complete upper and lower level paragraphs, tables and annotation reference chains is added to the file structure as backup content for the main file structure. An extended tag associated with the original node is written, and a nested association is established between the extended tag and the main file content through the relationship file. At the same time, the reference paths between each paragraph and annotation recorded in the file are reactivated. The structural mapping position of the original annotation is extracted from the extended tag. The starting paragraph and corresponding range of the original annotation in the main file are marked in reverse. Finally, the structural repair suggestion content is generated by calling the mapping verification component corresponding to the file extended tag. When the structure mapping redundancy value is greater than the structure mapping redundancy threshold, freeze the annotation update permission of the current node and seal the structure segment, and switch the main write channel to the backup mapping path. S4 uses the information analysis results and redundancy assessment results as input to perform a consistency assessment on the consistency of the audit data, and identifies the accuracy of the matching relationship between annotation insertion and structural binding based on the consistency assessment results; S5 simultaneously retains interface annotations and embeds structured audit content during the file export stage, generating compliance files with semantic readability and integrity verification capabilities.

2. The compliance document generation method based on OpenXml parsing and deep template configuration according to claim 1, characterized in that: The specific steps for preprocessing the collected structural mapping data, node location data, and binding rule data to construct a standardized audit status dataset are as follows: The system performs field dimension expansion and type identifier conversion operations on the structure mapping data, uniformly mapping the mapping node types to a fixed enumeration encoding format; it uniformly converts the relative position index to linear values ​​of the file structure, where the linear values ​​adopt a file sequential indexing strategy, numbering them according to the top-down and left-to-right arrangement order of the annotation nodes in the original structure; it extracts and retains the integer fields of the length of the audit ID number and the total byte length of the annotations; it retains the original count values ​​of the total number of written audit records, the number of audit insertion placeholders, and the field length of the mapped and written structure; and it directly extracts the original values ​​of the number of nodes without audit ID tags, the total number of interface annotation records, the number of bound audit records, and the number of nodes with broken audit ID chains in the XML structure. The text path of the selected file location and paragraph structure path of the annotation in the node positioning data is parsed; the number of the level of the annotation insertion position in the XML path is used as the basis dimension of the structural nesting depth and aligned with the structure of the mapped node path. For the binding rule data in the annotation generation process, the operation time is converted into a standard integer timestamp after character parsing and recorded as the annotation timestamp value; the modified content is mapped to a fixed-length numerical value based on the operation dictionary to obtain the keyword encoding value of the modified content; the modification reason is converted into a phrase number based on the classification thesaurus and recorded as the semantic compression value of the modification reason; the operator is connected to the salt value of AUDIT-SALT-2025 and processed using the SHA-256 hash function to obtain an unsigned value, recorded as the operator hash perturbation value; the annotation field content and the structure field content are compared and statistically analyzed item by item to obtain the inconsistency node ratio. The standardized structure mapping data, node location data, and binding rule data are normalized to construct a standardized audit status dataset.

3. The compliance document generation method based on OpenXml parsing and deep template configuration according to claim 1, characterized in that: The specific steps of the process for dynamically adjusting the audit description generation based on information analysis results are as follows: Real-time comparison of standard audit information values ​​with audit assessment thresholds at the current audit node: When the standard audit information value is less than or equal to the audit assessment threshold, the audit identifier is rebound, the structure mapping table entry corresponding to the current node is refreshed and the mapping index is updated, the secondary parsing of the annotation field is activated synchronously, the field segmentation is re-executed to generate a new audit description, the corresponding node is locked and subsequent non-audit modifications to the current content are stopped. When the standard audit information value is greater than the audit assessment threshold, all structural binding information of the current audit node is retained, and the position of the current audit description in the XML physical structure is fixed as the final audit traceability anchor point.

4. The compliance document generation method based on OpenXml parsing and deep template configuration according to claim 1, characterized in that: The specific steps for conducting a consistency assessment of the audit data, using information analysis results and redundancy assessment results as input, are as follows: The square of the number of audit ID broken links is taken, then the natural logarithm is added to it. This is then added to the absolute value of the difference between the total number of interface annotation records and the number of bound audit records, and the product of the standard audit information value and the structural mapping redundancy value to obtain the annotation broken link growth value. The absolute value of the difference between the average length of the annotation text and the average length of the structure record field is cubed, then one is added, and the square root is taken to obtain the field semantic matching deviation value. The natural constant is raised to the power of the inconsistency node ratio, multiplied by the annotation chain break growth value, and then divided by the field semantic matching deviation value to obtain the audit consistency verification value.

5. The compliance document generation method based on OpenXml parsing and deep template configuration according to claim 4, characterized in that: The specific steps for identifying the accuracy of the matching between annotation insertion and structural binding relationship based on the consistency assessment results are as follows: Real-time comparison of the current audit consistency check value with the consistency check threshold. The consistency check threshold includes a first check threshold and a second check threshold, wherein the first check threshold is greater than the second check threshold. When the audit consistency check value is less than or equal to the second check threshold, redundant annotations are added, structural tracing and semantic reconstruction are performed on all broken annotation nodes, and the reconstruction results are inserted into the interface layer in the form of temporary tags for user confirmation. When the audit consistency check value is greater than the second check threshold and less than or equal to the first check threshold, perform two-way verification on the audit ID mapping relationship in the current file, and mark all missing fields in the structure layer and no comments in the interface layer. When the audit consistency check value is greater than the first check threshold, the audit flow path of the current file is stopped, and an audit consistency exception report is forcibly generated. At the same time, the compliance status mark of the current file is frozen, and the flow is resumed after the consistency check of the annotations and structure records is completed.

6. The compliance document generation method based on OpenXml parsing and deep template configuration according to claim 4, characterized in that: The specific steps for simultaneously retaining interface annotations and embedding structured audit content during the file export stage to generate a compliance file with semantic readability and integrity verification capabilities are as follows: By combining the processing results based on audit consistency check values ​​with the exported target format, a dual-injection process of audit information is performed on the file: The file retains all comments from the interface layer, iterates through all nodes in the customXml structure, formats all audit record entries into structured text content, generates a read-only watermark page, inserts it at the specified page position at the end of the file, and serves as an uneditable structured audit backup. Insert a compliance audit completion marker in the footer of each page of all exported files, along with the current export version number and an integrity hash code obtained from the node content, to generate the final output file.