A semantic driven archival compliance and anomaly detection method and system

By constructing a two-dimensional compliance evaluation system and a multi-regulatory adaptation model, and combining knowledge graphs and spatiotemporal feature modeling, the technical challenges of archive compliance detection and anomaly identification have been solved. This has enabled intelligent and refined supervision and risk prevention throughout the entire lifecycle of archives, and improved detection accuracy and interpretability.

CN122114819BActive Publication Date: 2026-07-03SUZHOU IND PARK HANGXING INFORMATION TECH SERVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU IND PARK HANGXING INFORMATION TECH SERVICE CO LTD
Filing Date
2026-04-27
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies for archival compliance detection and anomaly identification suffer from rigid rules, insufficient semantic understanding capabilities, poor dynamic adaptability to regulations, lack of spatiotemporal dependency modeling, difficulty in identifying latent anomalies, and weak interpretability of results. These limitations make it difficult to achieve intelligent, refined, and adaptive compliance supervision and anomaly risk prevention throughout the entire lifecycle of archives.

Method used

A two-dimensional compliance evaluation system is constructed. Through dynamic semantic segmentation driven by legal semantics, knowledge graph construction and feature enhancement, combined with multi-scale spatiotemporal feature modeling and multi-regulatory adaptation model, the system can achieve accurate compliance detection and anomaly identification of archives and generate interpretable risk reports.

Benefits of technology

It achieves high-precision compliance supervision and anomaly identification throughout the entire lifecycle of archives, enhances the ability to understand legal semantics, responds quickly to changes in regulations, accurately locates anomalies, and generates auditable and accountable risk reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122114819B_ABST
    Figure CN122114819B_ABST
Patent Text Reader

Abstract

This invention discloses a semantically driven method and system for detecting archival compliance and anomalies, belonging to the field of intelligent archival management. Addressing the problems of rigid rules, insufficient semantic understanding, poor regulatory adaptability, and difficulty in identifying complex anomalies with a lack of interpretability in traditional methods, this invention constructs a two-dimensional evaluation system of "completeness-semantic consistency." It generates clause-level fragments through dynamic legal semantic segmentation, constructs a heterogeneous archival knowledge graph integrating spatiotemporal, business, and regulatory aspects, and completes knowledge-enhanced feature representation. Spatiotemporal features are modeled through multi-scale spatiotemporal graph convolution, and dynamic compliance detection is achieved based on a multi-regulatory adaptation model pool. Anomaly identification, risk tracing, and interpretable report generation are completed by combining semantic consistency reasoning. This invention features high detection accuracy, rapid regulatory adaptation, and can accurately identify complex anomalies across entities and time periods, making it suitable for intelligent supervision and risk prevention throughout the entire archival lifecycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of intelligent archive management, natural language processing, and graph neural network technology, and in particular to a semantic-driven method and system for archive compliance and anomaly detection. Background Technology

[0002] As vital original records of the activities of state organs and social organizations, the compliance of archives management and the authenticity of their data directly relate to the security of state secrets, the restoration of historical truth, and the value of information utilization. The continuous promulgation and revision of laws and regulations have imposed stricter and dynamically evolving compliance requirements on archives throughout their entire lifecycle, from formation and collection to organization, preservation, utilization, and destruction. Simultaneously, with the deepening of the digital transformation of archives, digital archival data exhibits characteristics of multi-source heterogeneity, diverse structures, and complex semantics. Archival anomalies have evolved from traditional issues like missing fields and format errors to problems of semantic consistency violations across entities, time periods, and rules, placing higher demands on archival compliance detection and anomaly identification technologies.

[0003] Existing technologies for document compliance detection and anomaly identification are mainly divided into two categories: rule-driven and data-driven. Both have significant limitations in practical applications.

[0004] First, traditional rule-driven detection methods rely on manually predefined rule engines and static verification standards, which suffer from rigid rules and high maintenance costs. Static rules are difficult to cover the diversity and implicit semantics of legal provisions in actual expression. For scenarios such as ambiguous expressions, cross-legal clause conflicts, and semantically implicit violations, false positives and false negatives are very likely to occur. At the same time, in the face of dynamic updates to regulations, a lot of manpower and resources are needed to rebuild the rule system, making it difficult to achieve rapid response, and the timeliness and effectiveness of detection results are seriously insufficient.

[0005] Secondly, existing data-driven detection methods are mostly based on traditional statistical models or single deep learning structures, which suffer from insufficient semantic understanding depth and weak ability to characterize spatiotemporal evolution features. These methods mostly focus on data distribution shifts or single-point structural errors, lack explicit modeling of the semantics of archival business rules, and are unable to identify complex implicit anomalies not covered by the rules. At the same time, they cannot effectively characterize the temporal evolution features of cross-archive associations and the entire life cycle between archival entities, and their detection capabilities are severely insufficient for anomalies such as cross-time and cross-entity process tampering, permission conflicts, and broken logical chains.

[0006] Third, existing technologies struggle to balance regulatory adaptability in compliance detection with interpretability in anomaly identification. While some deep learning models have achieved certain detection accuracy on specific datasets, their generalization ability is weak, and their performance drops significantly when faced with new regulations or new types of documents. At the same time, the detection results are mostly single anomaly scores, failing to provide accurate anomaly localization, traceability of violations, and interpretability analysis, making it difficult to meet the actual business needs of auditability and accountability in document management scenarios.

[0007] Therefore, there is an urgent need to propose an integrated technical solution for archival compliance and anomaly detection that can deeply integrate semantic understanding, dynamically adapt to regulatory updates, accurately depict spatiotemporal evolution characteristics, and combine high detection accuracy with strong interpretability. Summary of the Invention

[0008] To address the aforementioned deficiencies in existing technologies, this invention provides a semantically driven method and system for archival compliance and anomaly detection. It aims to solve the core problems of rigid archival compliance detection rules, insufficient semantic understanding capabilities, poor dynamic adaptability to regulations, lack of spatiotemporal dependency modeling, difficulty in identifying latent anomalies, and weak interpretability of results in archival anomaly detection. This will enable intelligent, refined, and adaptive compliance supervision and anomaly risk prevention throughout the entire archival lifecycle.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] In a first aspect, the present invention provides a semantically driven method for file compliance and anomaly detection, comprising the following core steps:

[0011] 1. Construct a two-dimensional compliance evaluation system: Based on relevant laws and regulations, establish a two-dimensional archive compliance evaluation system of "completeness-semantic consistency". Clarify three types of quantitative indicators for the completeness dimension: archive attributes, operation process, and security guarantee, as well as three types of detection standards for the semantic consistency dimension: clause conflict, ambiguous boundaries, and implicit violations. This provides a structured and quantifiable compliance basis for subsequent detection.

[0012] 2. Legal Semantic-Driven Dynamic Segmentation: Preprocessing and legal entity recognition are performed on the input original archival text (including document archives, OCR-transcribed audio-visual archive texts, electronic archive metadata, etc.). Through legal semantic-enhanced clause representation, semantic difference calculation, and adaptive breakpoint recognition, dynamic semantic segmentation of the archival text is achieved, generating clause-level semantic fragments with legal semantic coherence, laying the foundation for fine-grained compliance analysis.

[0013] 3. Knowledge Graph Construction and Feature Enhancement: Construct a heterogeneous knowledge graph of archives that integrates spatiotemporal metadata, business semantics, and legal constraints, and represent archive entities, attributes, legal clauses, and business processes in a unified graph structure; through entity linking, knowledge embedding, and sequence encoding, legal knowledge is deeply injected into the text feature representation process, and combined with a conflict-sensitive attention mechanism, a deep feature vector that integrates text semantics, legal relationships, and spatiotemporal attributes is generated.

[0014] 4. Multi-scale spatiotemporal feature modeling: Based on multi-scale spatiotemporal graph convolutional networks, the topological dependence of archival entities is modeled from the spatial dimension, and the state evolution characteristics of the entire life cycle of archives are characterized from the temporal dimension. By combining cross-level attention mechanism and multi-head self-attention mechanism, complex relationships across entities and long time series are captured, and high-order spatiotemporal representations of archival entities and business processes are generated.

[0015] 5. Compliance Detection Based on Multiple Regulations: A heterogeneous multi-regulatory adaptation model pool is constructed, consisting of a diffusion model and a BERT-GAN model. Through model reliability assessment, dynamic updates, and strategic merging mechanisms, rapid adaptation to dynamic changes in regulations is achieved. Based on high-order spatiotemporal representation and a two-dimensional evaluation system, clause-level compliance judgment and semantic consistency verification are completed through multi-model weighted voting, and preliminary compliance detection results are output.

[0016] 6. Anomaly Detection and Explainable Output: A semantic consistency reasoning module is introduced, which, combined with compliance path modeling, rule constraint injection, and comparative learning optimization, enables accurate detection of abnormal behavior in archives. An anomaly detection accuracy is improved through a multi-objective joint optimization mechanism, and finally, an explainable risk report is generated that includes compliance judgment results, clause-level anomaly location, source of violations and regulations, risk level assessment, and handling suggestions.

[0017] Furthermore, the method of the present invention also includes an online model optimization step, which continuously updates the entity relationship weights and model pool parameters of the legal knowledge graph based on the results of manual review and the newly added file execution records, thereby achieving closed-loop iterative optimization of detection capabilities.

[0018] Secondly, this invention provides a semantically driven archive compliance and anomaly detection system, implemented based on the above method, comprising: a compliance evaluation system construction module, a dynamic semantic segmentation module, a knowledge graph construction and feature enhancement module, a spatiotemporal feature modeling module, a multi-regulatory adaptive compliance detection module, and an anomaly discrimination and report generation module. Each module works together to achieve the entire process of archive compliance detection and anomaly identification.

[0019] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-mentioned semantically driven file compliance and anomaly detection method.

[0020] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the semantically driven file compliance and anomaly detection method described above.

[0021] Compared with the prior art, the present invention has the following significant advantages:

[0022] 1. This invention constructs an integrated technical framework of "semantic segmentation - knowledge enhancement - spatiotemporal modeling - dynamic detection - anomaly tracing", which solves the two core business needs of archive compliance detection and anomaly identification, breaks through the limitations of the single detection dimension of traditional methods, and realizes compliance supervision and risk prevention and control throughout the entire life cycle of archives.

[0023] 2. This invention breaks through the limitations of traditional fixed window or paragraph-level coarse-grained segmentation by using a dynamic segmentation mechanism driven by legal semantics. It achieves precise clause-level segmentation based on legal semantics, providing a solid foundation for fine-grained compliance analysis and anomaly localization. Combined with feature representations enhanced by legal knowledge graphs, it significantly improves the model's ability to understand legal terms and the semantics of regulatory clauses, effectively reducing the missed detection rate of ambiguous expressions and implicit violation scenarios.

[0024] 3. The multi-regulatory adaptation model pool designed in this invention combines strong distributed modeling capabilities with boundary sample robustness through heterogeneous collaboration between the diffusion model and BERT-GAN. By combining model reliability assessment, dynamic updating and strategic merging mechanisms, it achieves rapid response to the promulgation of new regulations and the revision of old regulations, significantly shortens the model adjustment cycle, and solves the core pain points of rigid rules and poor regulatory adaptability of traditional methods.

[0025] 4. This invention integrates multi-scale spatiotemporal graph convolution and self-attention mechanism, which can effectively characterize the topological dependence between archival entities and the temporal evolution characteristics of the entire life cycle. It achieves accurate identification of complex spatiotemporal anomalies such as cross-archives permission conflicts, cross-year process tampering, and broken retention period logic chains, making up for the shortcomings of existing methods in modeling long-range dependencies and evolutionary anomalies.

[0026] 5. This invention combines high detection accuracy with strong interpretability. On real archival datasets, its detection accuracy and F1 score are significantly better than traditional methods. It can also achieve precise anomaly location at the field and clause levels, automatically trace the corresponding illegal legal clauses, and generate auditable and accountable risk reports. It can directly support the actual business scenarios of archival management and has strong practical value and applicability. Attached Figure Description

[0027] Figure 1This is an overall flowchart of the semantic-driven file compliance and anomaly detection method described in this invention;

[0028] Figure 2 This is a logical architecture diagram of the "completeness-semantic consistency" two-dimensional evaluation system for archival compliance described in this invention;

[0029] Figure 3 This is a schematic diagram of the heterogeneous knowledge graph structure of archives described in this invention;

[0030] Figure 4 This is a module architecture diagram of the semantic-driven archive compliance and anomaly detection system described in this invention. Detailed Implementation

[0031] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0032] This embodiment provides a semantically driven method for file compliance and anomaly detection, the overall process of which is as follows: Figure 1 As shown, the specific implementation steps are explained in detail below:

[0033] Step 1: Construct a two-dimensional evaluation system for archival compliance: "completeness and semantic consistency".

[0034] This step, based on laws, regulations, and industry standards, constructs a multi-dimensional, quantifiable, two-dimensional evaluation system, the logical framework of which is as follows: Figure 2 As shown, this provides a standardized basis for compliance judgment in subsequent testing.

[0035] 1. Integrity Dimension

[0036] This dimension focuses on the completeness of physical elements and the standardization of operational procedures throughout the entire archival management process, ensuring that archives meet basic compliance requirements at every stage from generation and circulation to destruction. It is specifically divided into three levels:

[0037] Completeness of archival attributes: Core evaluation indicators include the missing rate of metadata fields and the compliance rate of key attribute labeling. Among them, the accuracy rate of security classification labeling is required to be no less than 98%, the completeness rate of retention period labeling is more than 99%, and the correlation rate of responsible entities is 100%. The inspection focuses on the completeness and standardization of core metadata such as archival title, responsible person, creation time, retention period, security classification, and classification number.

[0038] Compliance of operational procedures: Core indicators include the completeness rate of process nodes, the timeliness violation rate, and the number of times permissions are exceeded. Among them, the overdue rate of archiving is required to be controlled within 5%. The inspection content covers the timeliness of archiving and transfer, the completeness of signing and approval procedures, the compliance of document formats, the matching of borrowing and approval processes and permissions, and the closed loop of destruction and identification processes and approval chains.

[0039] Effectiveness of security assurance: Core indicators include storage environment compliance rate, backup completeness rate, and disaster recovery drill pass rate; the key areas of inspection cover the compliance of file storage temperature and humidity environment, carrier security protection level, off-site backup coverage, backup cycle compliance, and data recovery plan completeness.

[0040] 2. Semantic Consistency Dimension

[0041] This dimension focuses on the deep semantic alignment between archival content and legal provisions, identifying hidden violations caused by ambiguity, regulatory conflicts, and logical contradictions. It utilizes a legal knowledge graph to achieve clause-level semantic understanding, specifically divided into three levels:

[0042] Legal clause conflict detection: The core indicators are the conflict clause detection rate and the conflict resolution compliance rate; a clause conflict rule base is constructed based on legal knowledge graph, and semantic contradictions of clauses within a single law and cross-legal conflicts between departmental rules and higher-level laws are identified through relational reasoning such as inclusion, exclusion, and time limit coverage.

[0043] Identification of compliance boundaries for ambiguous expressions: The core indicators are the coverage rate of ambiguous clauses and the clarity of compliance boundaries; for flexible expressions such as "handled at the discretion of the authorities", "when necessary", and "generally not disclosed", a context-sensitive compliance boundary model is constructed, decision-making elements are extracted and matched with historical precedents and judicial interpretations to generate clear compliance decision ranges.

[0044] Semantic implicit violation mining: The core indicators are implicit violation detection rate and semantic association accuracy; through contextual semantic modeling, long-distance semantic dependencies are captured to identify content that appears compliant but has semantic risks of violation, as well as issues such as broken business logic chains in archives and implicit overstepping of permissions.

[0045] Step Two: Dynamic Semantic Segmentation Driven by Legal Semantics

[0046] This step addresses the characteristics of loosely structured archival texts and ambiguous semantic unit boundaries by designing a legal entity-driven semantic change detection mechanism. This enables dynamic semantic segmentation of archival texts, avoiding semantic fragmentation issues caused by traditional fixed-window partitioning, and providing standardized semantic units for fine-grained compliance analysis. The specific implementation process is as follows:

[0047] 1. Text preprocessing and legal entity recognition

[0048] The input raw archival text is preprocessed, including unstructured text cleaning, OCR noise robustness enhancement, and punctuation and format standardization. A sequence labeling method based on joint modeling of BERT and Conditional Random Field (CRF) is used to identify legal entities in the archival text, including core elements such as institution name, time node, security classification, responsible party, retention period, and archival operation actions, and to determine the boundaries of legal entities.

[0049] 2. Construction of Legal Semantic Vectors

[0050] The preprocessed text is segmented by punctuation to form a sequence of clauses. The semantic enhancement vector of each clause is constructed by fusing legal entity information from each clause, and the calculation formula is as follows:

[0051]

[0052] in, For BERT models pre-trained with legal texts, The set of legal entities appearing in the clause. This refers to the subgraph embedding vector of an entity within the regulatory knowledge graph. This indicates a vector concatenation operation.

[0053] 3. Semantic change detection and adaptive breakpoint recognition

[0054] To determine the degree of legal semantic shift between adjacent clauses, the semantic difference between adjacent clauses is calculated using the following formula:

[0055]

[0056] This value ranges from [0, 2], with larger values ​​indicating more significant semantic differences. If the current clause contains key verbs related to file operations such as "transfer," "decrypt," or "destroy," a weighted enhancement is applied to the difference score:

[0057]

[0058] in, This is an indicator function that takes the value 1 if the clause contains a key verb, and 0 otherwise.

[0059] A sliding window mechanism is introduced to calculate the dynamic breakpoint threshold, adapting to the semantic density differences of different file types. The formula is as follows:

[0060]

[0061] in, For window The mean of all semantic differences within. To correspond to the standard deviation, the window size is set to 5 clauses by default, and the empirically optimal value for the coefficient β is 1.25. When the semantic difference between adjacent clauses exceeds a dynamic threshold, that position is determined as a semantic breakpoint, triggering a segmentation operation.

[0062] 4. Semantic Fragment Generation and Optimization

[0063] Set segment length constraints, with a default effective segment length range of 3-15 clauses; if the distance between two breakpoints is less than the minimum length threshold, the segment is merged with the previous segment; if the length exceeds the maximum limit, forced segmentation is performed at the clause with the greatest difference, ultimately generating a semantically coherent clause-level semantic segment sequence. .

[0064] The global representation vector is calculated for each semantic segment, as shown in the following formula:

[0065]

[0066] Meanwhile, an entity transition matrix is ​​constructed within each semantic segment to record the frequency of co-occurrence relationships between entities, providing support for subsequent conflict detection and knowledge graph correction.

[0067] Step 3: Construction of Heterogeneous Archival Knowledge Graph and Feature Representation for Knowledge Enhancement

[0068] This step consists of two core components: first, constructing a heterogeneous knowledge graph of archives that integrates spatiotemporal metadata, business semantics, and legal constraints to achieve a unified structured representation of multi-source heterogeneous information in archives; and second, completing knowledge-enhanced feature representation of semantic fragments based on the knowledge graph, deeply integrating textual semantics and legal domain knowledge to improve the model's ability to understand compliance semantics.

[0069] 3.1 Construction of Heterogeneous Knowledge Graph of Archives

[0070] The heterogeneous knowledge graph structure of archives constructed in this step is as follows: Figure 3 As shown, the specific implementation process is as follows:

[0071] 1. Definition of Graph Nodes and Relationships

[0072] Building Heterogeneous Knowledge Graphs , where V is the node set, E is the edge set, and R is the relation type set.

[0073] Node set V is divided into four core node categories: archive entity nodes (file number, responsible person, archival number, subject keywords, etc.), attribute nodes (time stamp, retention period, security classification, geographical coordinates, storage location, etc.), legal clause nodes (specific legal clauses, industry standards and specifications), and business process nodes (lifecycle stages such as drafting, archiving, borrowing, and destruction).

[0074] Relation sets R are divided into three main categories of semantic relations:

[0075] 1. Due to time constraints : Represents the chronological relationship of archives, such as the order of their formation, the sequence of life cycle nodes, and the start and end dates of legal validity, such as "formed at", "earlier than", and "validity period covered";

[0076] 2. Spatial Relationships : Represents spatial relationships such as the location of archives, cross-repository transfer paths, and geographical affiliation, such as "stored in", "transferred to", and "geographical affiliation";

[0077] 3. Semantic Relationships This covers legal and business semantic relationships such as inclusion of regulations, conflict of clauses, business prerequisites, entity association, and subject matching, including "violation of clauses", "dependency process", and "belonging to a collection".

[0078] 2. Graph Embedding and Topology Construction

[0079] The TransE model is used to initialize the embeddings of entities and relations in the graph. The training objective is to minimize the following distances:

[0080]

[0081] in, For the head entity embedding vector, For relation embedding vectors, This is the tail entity embedding vector.

[0082] The weights of different relation types are adaptively learned based on the attention mechanism to generate a weighted adjacency matrix, as shown in the following formula:

[0083]

[0084] in, For edge strength under the corresponding relationship, The relation weights learned through the attention mechanism are used to ultimately complete the topology construction of the heterogeneous knowledge graph.

[0085] 3.2 Feature Representation of Knowledge Enhancement

[0086] Based on the constructed heterogeneous knowledge graph of archives, deep feature representation with knowledge enhancement is performed on semantic fragments. The specific process is as follows:

[0087] 1. Entity Linkage and Knowledge Injection

[0088] Clause fragments generated from dynamic semantic segmentation Perform entity linking to align entities in the fragment with knowledge graph nodes, constructing the overall knowledge representation of the fragment. The calculation formula is as follows:

[0089]

[0090] in, For the set of entities in the fragment, The entity weighting factor (determined by the TF-IDF value and the coreity indicator function, with the core entity weight doubled). This is the semantic relation vector that appears most frequently with this entity.

[0091] 2. Context sequence modeling

[0092] A bidirectional long short-term memory (BiLSTM) network is used to perform sequence modeling on text word vectors and knowledge augmentation vectors, capturing contextual semantic dependencies. The model input is the concatenation of word vectors and their corresponding knowledge vectors.

[0093]

[0094] in, For the first Word vectors of 1 word, This represents the knowledge of the clause fragment. BiLSTM is used to perform forward and backward context modeling, resulting in a bidirectional hidden state representation for each location:

[0095]

[0096] 3. Conflict-sensitive attention mechanism

[0097] To improve the model's ability to identify potential regulatory conflicts, a conflict-sensitive attention mechanism is introduced, and a specific query vector is designed. For words that frequently trigger conflict (such as "at one's discretion," "special circumstances," "permanent," "destroy," etc.), attention weighting is applied to the word-level representations, and the calculation process is as follows:

[0098]

[0099]

[0100] in, Word-level attention weights are used; when a weight exceeds 0.3, the corresponding word is marked as a conflict candidate. Through attention-weighted aggregation, a global semantic representation of the clause fragment is generated. .

[0101] 4. Feature optimization and noise robustness enhancement

[0102] A linear transformation is applied to the conflict-sensitive representation, mapping the features to the feature space required by the detection model, as shown in the following formula:

[0103]

[0104] The mapping matrix reduces the original 768-dimensional representation to a 256-dimensional target space, improving the computational efficiency of the model.

[0105] To enhance the model's robustness to ambiguous and vague representations, two types of noise are introduced during the training phase: one is a word substitution perturbation based on a legal thesaurus, and the other is an adversarial perturbation, which generates adversarial examples through gradient direction to optimize the boundary robustness of the representation space. The adversarial perturbation formula is as follows:

[0106]

[0107] in, For the amplitude of the disturbance, The loss function is used to determine compliance.

[0108] Step 4: Multi-scale spatiotemporal graph convolution and high-order spatiotemporal representation modeling

[0109] This step, based on a multi-scale spatiotemporal graph convolutional network and a self-attention mechanism, models the structural dependencies and long-range temporal relationships of the knowledge-enhanced deep feature vectors. This effectively characterizes the topological relationships between archival entities and their state evolution characteristics throughout their entire lifecycle, generating a high-order spatiotemporal representation to support subsequent anomaly detection. The specific implementation process is as follows:

[0110] 1. Spatial Dimension Convolution Modeling

[0111] Graph convolution operations are used to aggregate multi-level neighborhood information of nodes, enhancing the model's ability to perceive local topology and capturing structural dependencies between archival entities (such as "archive-catalog" hierarchy, "responsible party-archive" association, cross-archive entity association, etc.). The node hidden state update formula is as follows:

[0112]

[0113] in, Represents a node In relation types The set of adjacent nodes below, For the first Weight matrix of layer correspondence type, for Activation function.

[0114] To capture long-distance structural dependencies across whole groups and entities, a cross-level attention mechanism is introduced, calculated as follows:

[0115]

[0116] The global representation is updated based on attention weights, as shown in the following formula:

[0117]

[0118] Finally, the local graph convolutional features and global attention features are concatenated to obtain the complete spatial topological features. .

[0119] 2. Temporal Dimension Convolutional Modeling

[0120] To address the temporal evolution characteristics of archives throughout their entire lifecycle, a multi-scale temporal modeling method is employed to capture patterns of archive status changes across different time windows.

[0121] First, the time series of nodes is modeled using a Long Short-Term Memory (LSTM) network to capture the temporal dependencies of the archive state, as shown in the following formula:

[0122]

[0123] in, Represents a node At the point of time state, and These represent the memory state and hidden state of the LSTM, respectively.

[0124] The LSTM output is fed into a Transformer encoder, which further captures long-term temporal dependencies through a self-attention mechanism, solving the problem of temporal dependency modeling in the long-term archive lifecycle. The self-attention calculation formula is as follows:

[0125]

[0126] We designed a multi-scale one-dimensional convolution operation to extract storage behaviors and business patterns at different time scales. We set convolution kernels with receptive fields of 3, 5, and 7, corresponding to short-term, medium-term, and long-term time windows, respectively. The formula is as follows:

[0127]

[0128] Finally, the multi-scale temporal features are concatenated to obtain the complete temporal dynamic features h^{tmp}= concat _{s}(h_{tmp}^{(s)}).

[0129] 3. Spatiotemporal Feature Fusion and Refinement

[0130] A gating mechanism is introduced to adaptively fuse spatial topological features and temporal dynamic features, balancing the contributions of the two types of features. The formula is as follows:

[0131]

[0132]

[0133] in, For gating weights, This is an element-wise multiplication operation.

[0134] The fused features are further refined through an 8-head multi-head attention mechanism to capture the deep associations of multi-dimensional spatiotemporal semantics, and finally generate a high-order spatiotemporal representation of the archive entities and business processes for subsequent compliance detection and anomaly identification.

[0135] Step 5: Construction of a Multi-Regulatory Adaptation Model Pool and Compliance Testing

[0136] This step constructs a heterogeneous model pool adaptable to multiple regulations, addressing the limitations of traditional methods in adapting to dynamic regulatory updates and their weak ability to model complex compliance patterns. Based on high-order spatiotemporal representation and a two-dimensional evaluation system, it achieves accurate compliance judgment and semantic consistency verification. The specific implementation process is as follows:

[0137] 1. Heterogeneous model pool initialization

[0138] A dual-model collaborative mechanism is adopted to initialize the model pool, introducing a diffusion model (DM) and a generative adversarial network BERT-GAN to form a heterogeneous and complementary model structure. The initial model pool contains three heterogeneous models: two diffusion models targeting different regulatory systems. and one BERT-GAN model Each model achieves a specialized division of labor:

[0139] Diffusion model: The core is used to learn the probability distribution of compliance document text, and the reconstruction error is used as a measure of compliance conflict. Its loss function is defined as follows:

[0140]

[0141] Among them, time step Set to 1000, noise scheduling uses a cosine strategy for smooth adjustment. DM-1 focuses on the core provisions of "Regulation 1" and excels at detecting storage period conflicts; DM-2 is trained for "Regulation 2" and focuses on compliance judgment of confidentiality level changes.

[0142] The BERT-GAN model introduces adversarial examples through generative adversarial training, enhancing the model's ability to identify boundary cases and ambiguous expressions. The generator G is responsible for semantically perturbing compliance clauses to generate boundary samples; the discriminator D, in conjunction with real compliance clauses, performs adversarial optimization against the generated samples. The objective function is as follows:

[0143] min _{G} max _{D} V(D, G)

[0144] This model is primarily used to process local regulations and industry standards, effectively identifying ambiguous wording and boundary compliance cases.

[0145] 2. Model Pool Dynamic Update Engine

[0146] To ensure the model always adapts to the latest regulatory framework, a dynamic update engine is designed to achieve adaptive optimization of the model pool and rapid regulatory adaptation. The core of this engine includes three main mechanisms:

[0147] Regulatory Change Monitoring and Adaptation: A built-in regulatory monitoring mechanism automatically extracts key change points when new regulations are issued or existing regulations are revised, compiling a set of changes including newly added, deleted, and revised clauses. ; Construct a differential dataset using a sample synthesis engine It is used for fine-tuning training of the model.

[0148] Model reliability assessment: By introducing a regulatory timeliness weighting function and combining it with changes in model performance, the confidence score of each model is calculated, as shown in the following formula:

[0149]

[0150]

[0151] in, To illustrate the difference in model performance on the old and new regulatory datasets, Let be the time decay function, and be the time decay coefficient. Setting it to 0.1 reduces the weight of historical models. Models with a reliability score below 0.7 are migrated to the cold backup pool for future regulatory retrospectives or edge case analysis.

[0152] Strategic model merging: A semantic center-driven similarity merging mechanism is adopted to extract the semantic center vectors of the models' adaptation to regulations and calculate the cosine similarity between models; when the similarity exceeds a set threshold, model parameters are merged, and the merging formula is as follows:

[0153]

[0154] in, , The training sample size for the two models. For incremental adjustments based on changes in regulations, parameters Setting it to 0.3 controls the intensity of new knowledge injection. Model merging maintains a simple and efficient model pool structure, avoiding computational overhead from redundant models.

[0155] 3. Multi-model decision fusion and compliance assessment

[0156] In the final compliance determination stage, a weighted voting mechanism is used to merge the outputs of multiple models in the model pool to generate a clause-level compliance determination result, as shown in the following formula:

[0157]

[0158] in, For the first The probability distribution of the predicted terms by each model. For the reliability weights of the corresponding model, For compliance tags (compliant, conflicting, missing).

[0159] To adapt to the judgment boundaries of clauses with different complexities, the conflict detection threshold adopts a dynamic adjustment strategy, and the update rules are as follows:

[0160]

[0161] When the entropy value of the model's predicted distribution is high and the judgment uncertainty is strong, the detection threshold should be appropriately lowered to improve the recall rate of potentially illegal content. Finally, the compliance label, compliance probability, conflict type, and risk location of each clause are output, completing the initial compliance detection.

[0162] Step Six: Semantic Consistency Reasoning and Anomaly Detection, Result Output

[0163] This step, based on compliance testing results, deeply characterizes the compliance behavior path of archives through a semantic consistency reasoning module. Combined with a multi-objective joint optimization anomaly detection model, it accurately identifies various abnormal behaviors throughout the entire lifecycle of the archives and completes risk tracing and interpretability report generation. The specific implementation process is as follows:

[0164] 1. Semantic Consistency Reasoning Modeling

[0165] A semantic consistency reasoning module is constructed to characterize the compliance behavior of archives under regulatory constraints from the perspective of path evolution, and to identify hidden problems such as logical chain breaks and abnormal state evolution. The core includes three stages:

[0166] Potential compliance path modeling: Archive nodes are embedded in a Gaussian latent space for state modeling. For archive node v_i, its potential state vector z_i is modeled as a multidimensional Gaussian distribution:

[0167]

[0168] The mean vector and covariance matrix are generated from the higher-order spatiotemporal representation of the nodes using a multilayer perceptron, and a reparameterization method is employed to ensure gradient transitivity.

[0169]

[0170] Based on latent state vectors, archival compliance behaviors are abstracted into a lifecycle path sequence. By recursively generating future compliance states through the Transformer decoder, the evolution of archive behavior can be predicted.

[0171] Business rule constraint injection: Construct a legal and rule knowledge base, transform relevant legal provisions and industry standards for archive management into computable vector constraints, and generate rule embedding representations through a pre-trained legal language model; design a dynamic rule matching mechanism to calculate the correlation between rules and the current archive status, generate rule context vectors, and inject them into the compliance path prediction process to ensure that path modeling is always guided by legal constraints.

[0172] Contrastive learning optimization: To improve the model's ability to distinguish between compliant and abnormal paths, a contrastive learning mechanism is introduced. A triplet sample set containing anchor paths, positive samples (compliant paths), and negative samples (non-compliant paths) is constructed. The triplet contrastive loss function is used to optimize the discrimination boundary and enhance the model's ability to identify abnormal evolution patterns.

[0173] 2. Anomaly detection in multi-objective joint optimization

[0174] We design a multi-task joint loss function to collaboratively optimize three main objectives: path reconstruction, compliance differentiation, and rule constraints, thereby achieving accurate training of the anomaly detection model, as detailed below:

[0175] Path Reconstruction Loss: Measures the difference between the generated compliant path and the actual documented behavioral path, while penalizing structural biases. The formula is as follows:

[0176]

[0177] The first half is the Euclidean distance of the state at each time step, and the second half is the graph editing distance, which is used to penalize structural anomalies such as missing approval nodes and process out-of-bounds errors.

[0178] Contrastive learning loss: Based on triplet samples, the distance between compliant and abnormal paths in the feature space is increased, as shown in the following formula:

[0179]

[0180] in, This is the boundary threshold, set to 0.5 by default. This is a function for calculating path similarity.

[0181] Rule violation penalties: This quantifies the degree to which a record-keeping action deviates from regulatory provisions and imposes penalties for violations, using the following formula:

[0182]

[0183] in, For the first Rule number 1 The function measures the compliance of each node. When a constraint is not met, the function takes a positive value and incurs a penalty.

[0184] A dynamic uncertainty weighting strategy is introduced to adaptively balance the contributions of the three types of losses, and a total loss function is constructed:

[0185]

[0186] in, , , The uncertainty estimates for each subtask are used as learnable variables in gradient optimization, enabling the model to adaptively adjust task weights based on training stability.

[0187] Based on the trained anomaly detection model, the anomaly confidence and overall anomaly score of the file path are calculated to distinguish between explicit and implicit anomalies and to locate the time point, business process and related entity where the anomaly occurred.

[0188] 3. Final Results Output and Interpretability Report Generation

[0189] Integrate compliance testing results with anomaly detection results to complete three-level risk positioning and interpretable output, specifically including:

[0190] Compliance and Anomaly Assessment: Based on the compliance label of the multi-model weighted voting and the anomaly score of the anomaly detection model, the overall compliance level of the file is comprehensively assessed and divided into four levels: compliant, low risk, medium risk and high risk.

[0191] Precise risk tracing: Achieve three-level anomaly location at the field, clause, and file levels, clearly mark the specific location of conflicting / abnormal content, automatically trace the corresponding violation clause number and specific clause content, and sort out the evolution path and responsibility nodes of abnormal behavior;

[0192] Explainable Risk Report Generation: Automatically generates standardized risk reports, including basic information about the records, overall compliance assessment results, details of anomalies / conflicts, risk level, violated regulations, root cause analysis and handling recommendations, providing record management personnel with auditable, accountable, and actionable decision support.

[0193] Method performance verification

[0194] The performance of this method was validated using the ArchComply dataset (containing 17,530 real archives in three categories: written documents, audio-visual archives, and electronic archives). Experimental results show that:

[0195] In the task of document compliance inspection, this method achieved an overall detection accuracy of 91.3%, a Macro-F1 score of 88.6%, and a semantic conflict detection rate of 89.7%, which is 23.1% higher than that of traditional rule engine methods.

[0196] In terms of regulatory adaptability, when faced with scenarios involving the promulgation of new regulations, the model adjustment time of this method is only 3.1 hours, which is a significant reduction of 93.6% compared to the traditional full retraining method, while the retention rate of old regulatory knowledge reaches 99.6%.

[0197] In the task of detecting archival anomalies, this method achieves an F1 score of 87.9% for complex anomalies such as cross-year tampering, cross-archives permission conflicts, and broken logical chains, which is 24.3% higher than traditional methods. The anomaly localization accuracy reaches 92.3%, demonstrating a strong ability to trace the source of fine-grained anomalies.

[0198] Supporting systems, equipment and storage media examples

[0199] This embodiment also provides a semantically driven file compliance and anomaly detection system, the module architecture of which is as follows: Figure 4 As shown, the implementation based on the above method specifically includes:

[0200] Compliance evaluation system construction module: used to build a two-dimensional archive compliance evaluation system of "integrity-semantic consistency" based on relevant laws and regulations on archive management, and to determine the quantitative standards for detection and identification;

[0201] Dynamic semantic segmentation module: used to preprocess the input archive text, identify legal entities, and perform dynamic segmentation driven by legal semantics to generate clause-level semantic fragments;

[0202] Knowledge Graph Construction and Feature Enhancement Module: Used to construct a heterogeneous knowledge graph of archives that integrates spatiotemporal metadata, business semantics and legal constraints, and to complete the knowledge-enhanced feature representation of semantic fragments based on the graph;

[0203] Spatiotemporal feature modeling module: It is used to model the file structure dependency and long-range temporal correlation through multi-scale spatiotemporal graph convolutional network and self-attention mechanism, and generate high-order spatiotemporal representation;

[0204] Multi-regulatory compliance detection module: used to build a heterogeneous multi-model pool, complete dynamic compliance judgment and semantic consistency verification, and output preliminary compliance detection results;

[0205] Anomaly detection and report generation module: used to perform semantic consistency reasoning, file anomaly detection and risk tracing, and generate the final compliance judgment result, anomaly location information and interpretable risk report.

[0206] This embodiment also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the semantic-driven document compliance and anomaly detection method described in the above embodiment. This computer device can be a server, desktop computer, laptop computer, or other terminal device. When its processor executes the program, it can realize the entire process of the above method, meeting the business needs of batch detection and real-time analysis in document management scenarios.

[0207] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the semantically driven file compliance and anomaly detection method described in the above embodiment. The storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, and optical disks, and can be used for program distribution, deployment, and implementation.

[0208] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope defined by the claims of the present invention.

Claims

1. A semantic driven archival compliance and anomaly detection method, characterized in that, include: Step 1: Based on relevant laws and regulations on archives management, construct a two-dimensional evaluation system for archives compliance, namely "completeness-semantic consistency," and determine the quantitative standards for compliance detection and anomaly identification. The "completeness-semantic consistency" two-dimensional evaluation system specifically includes: The completeness dimension covers three levels: completeness of archive attributes, compliance of operational procedures, and effectiveness of security assurance. Quantitative indicators such as metadata missing rate, process node completeness rate, and storage environment compliance rate are set to ensure the compliance of archive physical elements and all lifecycle operational stages. The semantic consistency dimension covers three levels: detection of legal clause conflicts, identification of compliance boundaries for ambiguous expressions, and mining of semantically implicit violations. Quantitative indicators such as conflict clause detection rate, ambiguous clause coverage rate, and implicit violation detection rate are set to ensure deep semantic alignment between archive content and legal provisions. Step 2: Preprocess the input file text and identify legal entities. Based on legal semantics, perform dynamic semantic segmentation to generate clause-level semantic fragments with legal semantic coherence. Step 3: Construct a heterogeneous knowledge graph of archives that integrates spatiotemporal metadata, business semantics, and legal constraints. Based on the knowledge graph, perform knowledge-enhanced feature representation on semantic fragments to generate deep feature vectors that integrate textual semantics, legal knowledge, and spatiotemporal attributes. Step 4: Based on multi-scale spatiotemporal graph convolutional networks and self-attention mechanisms, perform structural dependency and long-range temporal correlation modeling on deep feature vectors to generate high-order spatiotemporal representations of archival entities and business processes; Step 5: Construct a multi-regulatory adaptation model pool. Based on the aforementioned high-order spatiotemporal representation and two-dimensional evaluation system, perform compliance discrimination and semantic consistency verification, and output preliminary compliance detection results. The construction of the multi-regulatory adaptation model pool specifically includes: initializing the model pool using a heterogeneous dual-model collaborative mechanism, respectively constructing a text reconstruction discriminator based on a diffusion model and a generative adversarial enhancement model based on BERT-GAN; wherein, the diffusion model is used to learn the probability distribution of compliance document text, using reconstruction error as a compliance conflict metric; the BERT-GAN model strengthens the model's ability to handle boundary cases and patterns through generative adversarial examples. The system features the ability to recognize fuzzy expressions; a dynamic update engine for the model pool with a built-in regulatory monitoring mechanism is designed. When new regulations are released, the system automatically extracts regulatory change points and constructs a difference dataset to fine-tune the models; a reliability evaluation function is used to calculate the confidence score of each model, and models below the threshold are given a cold standby treatment, while highly similar models are strategically merged to achieve dynamic optimization of the model pool and regulatory adaptation; in the compliance judgment stage, a weighted voting mechanism is used to merge the output results of multiple models in the model pool, combined with a dynamically adjusted conflict detection threshold, to generate clause-level compliance labels and compliance probabilities, completing the initial compliance detection; Step Six: Introduce a semantic consistency reasoning and multi-objective joint optimization mechanism, combine compliance detection results to perform archive anomaly detection and risk tracing, and generate the final compliance judgment result, anomaly location information, and interpretability risk report; the semantic consistency reasoning and multi-objective joint optimization specifically include: constructing a semantic consistency reasoning module, embedding archive nodes into a Gaussian latent space for state modeling, characterizing the compliant behavior path of archives under regulatory constraints, and recursively generating future compliant states through a Transformer decoder; constructing a regulatory rule knowledge base, converting archive management-related regulatory clauses into computable vector constraints, generating rule context vectors through a dynamic rule matching mechanism, and injecting them into the compliance path prediction process; introducing a contrastive learning optimization mechanism, constructing triplet samples of compliant and abnormal paths, and optimizing the model's distinction boundary between compliant and abnormal states through a triplet contrastive loss function; designing a multi-task joint loss function, integrating path reconstruction loss, contrastive learning loss, and rule violation loss, and balancing the contribution of each loss item through a dynamic uncertainty weighting strategy to complete the joint optimization of the anomaly detection model.

2. The method as described in claim 1, characterized in that, The aforementioned dynamic semantic segmentation based on legal semantics specifically includes: Punctuation segmentation is performed on the preprocessed archival text to generate a clause sequence. Legal entity information in the clauses is integrated, and semantic enhancement vectors of the clauses are constructed by embedding a pre-trained BERT model in the legal domain with a subgraph of the legal knowledge graph. Calculate the legal semantic difference between adjacent clauses, and enhance the difference by combining key verbs of file operation. Calculate the dynamic breakpoint threshold based on the sliding window mechanism. When the semantic difference exceeds the dynamic breakpoint threshold, it is determined as a semantic breakpoint, and clause segmentation is performed. Length constraint optimization is performed on the segmented fragments to generate semantically coherent clause-level semantic fragments consisting of 3-15 clauses, and the global representation vector and entity transition matrix of each semantic fragment are calculated.

3. The method as described in claim 1, characterized in that, The construction of the heterogeneous knowledge graph of archives specifically includes: Define the node set and relationship set of the graph. The node set includes archival entity nodes, attribute nodes, legal clause nodes, and business process nodes. Among them, archival entity nodes cover file number, responsible person, and collection information, while attribute nodes cover timestamp, retention period, security classification, and spatial location information. The relationship set includes three categories: spatial relationship, temporal relationship and semantic relationship. Among them, spatial relationship represents the relationship between the storage location of the archives and the transfer path, temporal relationship represents the temporal evolution and sequence of the archives' life cycle, and semantic relationship covers legal inclusion, clause conflict, business premise, and entity relationship type. The TransE model is used to initialize the embedding of entities and relations in the graph. Based on the attention mechanism, the weights of different relation types are adaptively learned to generate a weighted adjacency matrix, thus completing the topology construction of the heterogeneous knowledge graph.

4. The method as described in claim 1, characterized in that, The knowledge-enhanced feature representation specifically includes: The semantic fragments generated by dynamic semantic segmentation are linked with the heterogeneous knowledge graph of archives to generate entity-enhanced vectors that integrate legal relationships; A bidirectional long short-term memory network (BiLSTM) is used to perform sequence modeling on the concatenation result of word vectors and knowledge enhancement vectors, thereby capturing contextual semantic dependencies. A conflict-sensitive attention mechanism is introduced, a conflict-triggered word query vector is designed, and attention weighting is applied to word-level representations to highlight the weight of keywords related to compliance conflicts, thereby generating a global feature representation that integrates contextual semantics and legal relationships.

5. The method as described in claim 1, characterized in that, The multi-scale spatiotemporal graph convolutional network and self-attention mechanism modeling specifically include: Spatial dimension convolution uses graph convolution operations to aggregate multi-level neighborhood information of nodes, and combines cross-level attention mechanisms to capture long-distance structural dependencies across parishes and entities to generate spatial topological features; Temporal convolution models the temporal sequence of nodes using a Long Short-Term Memory (LSTM) network, and combines a Transformer encoder with multi-scale one-dimensional convolution to extract the state evolution patterns of archives under different time windows, generating temporal dynamic features. A gating mechanism is introduced to adaptively fuse spatial topological features and temporal dynamic features, and then a multi-head attention mechanism is used to refine the features to generate the final high-order spatiotemporal representation.

6. The method as described in claim 1, characterized in that, The generation of the final compliance determination result, anomaly location information, and explainable risk report specifically includes: Based on the compliance detection results and anomaly identification output of the multi-model pool, the anomaly score and risk level of the entire life cycle of the archive are calculated. Locate the specific clauses, associated entities, and violated regulatory clause numbers of compliance conflicts and abnormal behaviors, and generate three levels of anomaly tracing information at the field, clause, and file levels; Automatically generate interpretable risk reports, including anomaly type, violation details, risk level, violation of regulations and handling recommendations, completing the entire process of document compliance and anomaly detection.

7. A semantically driven system for archive compliance and anomaly detection, characterized in that, Based on the method described in any one of claims 1-6, it includes: The compliance evaluation system construction module is used to build a two-dimensional archive compliance evaluation system of "completeness-semantic consistency" based on relevant laws and regulations on archive management, and to determine the quantitative standards for detection and identification. The dynamic semantic segmentation module is used to preprocess the input archive text, identify legal entities, and perform dynamic segmentation driven by legal semantics to generate clause-level semantic fragments. The knowledge graph construction and feature enhancement module is used to construct a heterogeneous knowledge graph of archives that integrates spatiotemporal metadata, business semantics and legal constraints, and to complete the knowledge-enhanced feature representation of semantic fragments based on the graph; The spatiotemporal feature modeling module is used to model the file structure dependency and long-range temporal correlation through a multi-scale spatiotemporal graph convolutional network and a self-attention mechanism, and generate a high-order spatiotemporal representation. The multi-regulatory compliance detection module is used to build a heterogeneous multi-model pool, complete dynamic compliance judgment and semantic consistency verification, and output preliminary compliance detection results. The anomaly detection and report generation module is used to perform semantic consistency reasoning, file anomaly detection and risk tracing, and generate the final compliance judgment result, anomaly location information and interpretability risk report.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the semantically driven file compliance and anomaly detection method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the semantically driven file compliance and anomaly detection method according to any one of claims 1 to 6.