Method and system for automatically generating formal specification of password based on logical consistency verification
Patent Information
- Application Number
- CN202611061405.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]为了解决现有非结构化密码标准文档规约的提取存在语义遗漏、安全规约存在逻辑冲突问题;本发明提出一种基于逻辑一致性验证的密码形式化规约自动生成方法及系统,可完整挖掘密码学标准文档全部规约以消除语义遗漏,并通过逻辑校验实现规约全局无逻辑冲突
[0028]1、本发明通过语义残差反馈机制,驱动神经网络模型持续在残差空间检索,主动挖掘隐藏在表格或长句中的衍生约束,有效消除语义遗漏,从而实现从显性表层规约到深层隐性规约的全覆盖挖掘,大幅提升规约提取召回率,使规约提取不再遗漏边缘场景。
Smart Images

Figure CN123016455A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of network security compliance and knowledge engineering technology, and in particular to a method and system for automatically generating cryptographic formal specifications based on logical consistency verification. Background Technology
[0002] Achieving comprehensive and automated auditing of complex cryptographic compliance presents significant technical challenges. The primary challenge lies in the "knowledge representation bottleneck" of cryptographic standards. Existing security standards primarily exist as unstructured PDF documents, their content interwoven with highly dense natural language, algebraic expressions, and nested tables. While these documents are authoritative to human experts, they are typical "semantic black boxes" for computer auditing systems. To transform these "paper standards" into "audit rules" that can be understood and executed by machines, the industry has long relied heavily on manual analysis and experience-based refinement by security experts. This manual approach is not only extremely inefficient but also prone to misunderstandings or knowledge omissions when dealing with complex standards such as the NISTSP 800 series, which can easily run for hundreds of pages. This results in the audit rule base being updated far behind the frequency of standard changes.
[0003] To address the challenge of low knowledge conversion efficiency, subsequent technological advancements began to incorporate artificial intelligence and natural language processing techniques. In particular, the emergence of Large Language Models (LLMs) provided a new path for knowledge extraction from unstructured documents. However, existing automated extraction techniques exhibit significant limitations in the highly rigorous field of cryptography. Firstly, there is a lack of "page layout awareness," as key constraints in cryptographic standards are often hidden in tables spanning multiple pages or containing complex superscripts (such as...). In algebraic formulas, traditional analytical techniques are prone to causing logical errors in data rows and columns or loss of algebraic exponents, resulting in fatal deviations in the original semantics. Secondly, there is the "logic illusion problem of artificial intelligence." When processing strongly logical cryptographic reductions, generative models often produce outputs that appear grammatically correct but are logically contradictory, and lack a deterministic self-verification mechanism to ensure the mathematical accuracy of the extracted results.
[0004] A more serious dilemma lies in the fact that most existing research on automated knowledge extraction remains at the stage of "single-shot heuristic scanning." Large models, limited by the locality of attention mechanisms, tend to prioritize extracting explicit and simple numerical rules when faced with high-density technical documents, while exhibiting extremely high false negative rates for implicit constraints with long-distance dependencies and complex preconditions. This phenomenon of "unsaturated knowledge mining" results in serious deficiencies in the completeness of the generated reduction library. Furthermore, the extracted knowledge often lacks a unified semantic model, and the naming of rules produced by different standards and different chapters is chaotic and logically conflicting, making it difficult to form a structured knowledge base capable of supporting deep symbolic verification. Summary of the Invention
[0005] To address the issues of semantic omissions and logical conflicts in security specifications when extracting specifications from existing unstructured cryptographic standard documents, this invention proposes an automatic generation method and system for cryptographic formal specifications based on logical consistency verification. This method can fully mine all specifications in cryptographic standard documents to eliminate semantic omissions and achieve global logical conflict-free specifications through logical verification.
[0006] To achieve the above objectives, the technical solution adopted is:
[0007] This invention provides a method for automatically generating cryptographic formal specifications based on logical consistency verification, comprising the following steps:
[0008] Perform multimodal layout parsing on the original cryptographic standard PDF document to generate structured intermediate text with contextual anchors;
[0009] Multiple rounds of iterative mining based on residual masks are performed on the structured intermediate text until semantic saturation is reached, and explicit and implicit reductions are extracted.
[0010] The extracted specification text is instantiated into a preset multi-dimensional attribute structured template to generate a semi-structured knowledge graph.
[0011] Natural language constraints in semi-structured knowledge graphs are interpreted into symbolic expressions;
[0012] The symbolic expression is input into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the reduction set.
[0013] According to the automatic generation method of cryptographic formal specifications based on logical consistency verification of the present invention, the process of generating structured intermediate text with context anchors is further as follows: removing visual layout interference from the original PDF document, parsing continuous text blocks, multi-level nested tables and algebraic formula areas respectively; identifying the hierarchical relationship of chapter titles, the correspondence between table cells and footnotes and cross-paragraph cross-reference identifiers; and uniformly converting the parsing results into structured intermediate text with context anchors containing physical page number coordinates and logical chapter levels.
[0014] According to the automatic generation method of cryptographic formal specifications based on logical consistency verification of the present invention, the iterative mining based on residual masks further includes: calling a neural network model to perform the first round of explicit specification scanning and extraction on the structured intermediate text; performing feature encoding on the extracted specification content and generating a corresponding semantic mask in the structured intermediate text to block the specification features of the mined area at the logical level; feeding the text carrying the semantic mask as residual features back to the model input, so that the model performs a second round of search on the residual space not covered by the mask; repeating the above mask generation and iterative search until it is determined that the current text block no longer contains new constraint features.
[0015] According to the method for automatically generating cryptographic formal specifications based on logical consistency verification of the present invention, the multi-dimensional attribute structured template further includes five standard dimensions: execution subject E, security attribute P, logical operator O, constraint threshold V, and precondition C, which are used to decompose and map unstructured original specification short sentences into standardized knowledge graphs.
[0016] According to the automatic generation method of cryptographic formal specifications based on logical consistency verification of the present invention, further, interpreting the natural language constraints in the semi-structured knowledge graph into symbolic expressions includes: extracting logical operators and mapping them to Boolean algebra operations; extracting constraint thresholds and converting them into arithmetic relations; defining the execution subject and security attributes as variables; identifying the preconditions of the environment as constraints; and assembling the above discrete elements into a symbolic formula set supported by first-order predicate logic or satisfiability modular theory according to preset syntax rules.
[0017] According to the automatic generation method of cryptographic formal specifications based on logical consistency verification of the present invention, further, inputting the symbolic expression into the SMT solver to perform global satisfiability detection includes: injecting the symbolic expression and the fundamental axioms of cryptography into the SMT solver; traversing the global specification library to detect whether there are logical contradictions between specifications extracted from different chapters and whether the specifications conflict with the fundamental axioms of cryptography; and outputting a satisfiable state SAT that represents the overall logical consistency without conflict or an unsatisfiable state UNSAT that represents the logical conflict.
[0018] According to the method for automatically generating cryptographic formal specifications based on logical consistency verification of the present invention, the method further includes a conflict tracing and feedback step: if an unsatisfiable state result is detected, the minimum conflict subset is extracted and the context anchor is used to trace back to the corresponding position in the original PDF document; a logical reward function is constructed based on the minimum conflict subset, a negative penalty signal is generated to fine-tune the neural network, the semantic extraction deviation of the model is corrected, and finally a globally logically consistent security specification library is output.
[0019] Furthermore, the present invention also provides an automatic generation system for cryptographic formal specifications based on logical consistency verification, comprising:
[0020] The multimodal layout anchor reconstruction module is used to perform multimodal layout parsing on the original cryptographic standard PDF document and generate structured intermediate text with context anchors;
[0021] The residual mask iterative mining module is used to perform multiple rounds of iterative mining based on residual masks on the structured intermediate text until semantic saturation is reached, and to extract explicit and implicit reductions.
[0022] The multidimensional attribute structured mapping module is used to instantiate the extracted specification text into a preset multidimensional attribute structured template to generate semi-structured knowledge graphs.
[0023] The symbolic interpretation module is used to interpret natural language constraints in semi-structured knowledge graphs into symbolic expressions.
[0024] The SMT satisfiability audit module is used to input the symbolic expression into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the specification set.
[0025] According to the automatic generation system of cryptographic formal specifications based on logical consistency verification of the present invention, the residual mask iterative extraction module further includes a semantic saturation detection module, which is used to perform feature encoding on the extracted specifications of the current text block and generate a semantic mask, and to determine whether the residual space contains new constraint features.
[0026] According to the automatic generation system of cryptographic formal specifications based on logical consistency verification of the present invention, the system further includes a conflict tracing and feedback module, which is used to extract the minimum conflict subset under the UNSAT result, reverse locate the conflict position of the original document using context anchors, and generate feedback signals for model optimization.
[0027] The beneficial effects achieved by adopting the above technical solution are:
[0028] 1. This invention drives the neural network model to continuously search in the residual space through a semantic residual feedback mechanism, actively mining the derived constraints hidden in tables or long sentences, effectively eliminating semantic omissions, thereby achieving full coverage mining from explicit surface reduction to deep implicit reduction, greatly improving the reduction extraction recall rate, and ensuring that reduction extraction no longer misses edge scenarios.
[0029] 2. This invention breaks down the technical barriers between neural reasoning and symbolic proof. By using the SMT solver to perform rigorous formal logical verification and conflict tracing on the extracted specifications, logical paradoxes are automatically eliminated, resulting in a globally unconflicted secure specification library. This significantly reduces the workload of manual review and provides a high-confidence standardized knowledge base that can be directly reused for downstream compliance review. Attached Figure Description
[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. The drawings are merely illustrative of some embodiments of the present invention and are not intended to limit the scope of the present invention to all embodiments.
[0031] Figure 1 This is a flowchart illustrating the method for automatically generating cryptographic formal specifications based on logical consistency verification according to an embodiment of the present invention.
[0032] Figure 2 This is a schematic diagram of the iterative mining process based on residual masks according to an embodiment of the present invention. Detailed Implementation
[0033] The exemplary solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art.
[0034] First, the relevant definitions used in the embodiments of this invention are given:
[0035]
[0036]
[0037]
[0038] This invention discloses an automatic generation method for cryptographic formal specifications based on logical consistency verification. Its core is a systematic process that transforms unstructured, semantically complex cryptographic standard documents into a multi-dimensional, structured, and rigorously mathematically proven security specification library. For example... Figure 1As shown, the process is logically divided into two stages: the first stage is the document logic reconstruction and multi-dimensional residual mining stage, which aims to break through the fragmentation bottleneck of long text parsing and achieve the extraction of explicit and implicit security specifications without omission; the second stage is the neural symbol consistency audit and adaptive alignment stage, which aims to use formal verification technology to eliminate the reasoning illusion of neural network models and finally output a globally logically conflict-free specification knowledge base.
[0039] Phase 1: Document Logic Restructuring and Multidimensional Residual Mining
[0040] This stage forms the foundation for data analysis and feature extraction in the entire solution. Its core task is to transform complex, unstructured standard documents containing tables, formulas, and natural language into a multi-dimensional structured representation that can be deeply understood and continuously tracked by machines. The output of this stage is not merely a series of discrete text fragments, but a knowledge set with strict contextual anchors and no semantic omissions. The specific steps are as follows:
[0041] Step S1: Multimodal layout anchor reconstruction: Perform multimodal layout parsing on the original cryptographic standard PDF document to generate structured intermediate text with context anchors.
[0042] This step is key to overcoming the fragmentation bottleneck in long text parsing. This invention abandons the crude fixed-length text segmentation methods used in traditional large language models or Retrieval Enhanced Generation (RAG), instead introducing a multimodal layout analysis engine to reconstruct the original PDF from both physical and logical perspectives.
[0043] First, visual layout distractions such as headers, footers, page numbers, watermarks, decorative lines, background patterns, multi-column layouts, floating text boxes, and irrelevant icons are removed from the original PDF document. This eliminates the impact of non-text elements on content recognition and reading order determination, providing standardized input for subsequent text structure restoration, semantic segmentation, and accurate parsing. Then, continuous text blocks, multi-layered nested tables, and algebraic formula areas are parsed independently. The system accurately identifies the hierarchical relationships of chapter titles, the correspondence between table cells and footnotes, and cross-paragraph cross-references, and uniformly transforms the parsing results into structured intermediate text with both physical page number coordinates and logical chapter hierarchy anchors. This mechanism fundamentally ensures that the triggering prerequisites and contextual conditions upon which complex specifications rely are not lost due to physical pagination or text truncation.
[0044] Step S2: Deep Iterative Mining Based on Residual Masks: Perform multiple rounds of iterative mining based on residual masks on the structured intermediate text until semantic saturation is reached, and extract explicit and implicit reductions.
[0045] This step is a core innovative action to completely solve the problem of "implicit specification omission". For example... Figure 2As shown, based on the completion of logical reconstruction, the system breaks through the limitation of single linear extraction and introduces a closed-loop extraction process with dynamic feedback mechanism.
[0046] First, a neural network model is invoked to perform an initial explicit reduction scan on the structured intermediate text, extracting surface-level and clearly defined rules from the text. Then, the successfully extracted rules are feature-encoded, and corresponding semantic masks are generated in the original structured intermediate text to logically mask the rule features of the mined areas. Next, the text carrying the semantic mask is fed back as residual features to the model input, forcing the model's attention mechanism to shift to the residual space not covered by the mask (such as hidden table descriptions or extreme marginal conditional clauses) for a second round of deep search. This mask generation and iterative search are repeated until it is determined that the current text block no longer contains new constraint features (i.e., semantic saturation is reached), thus achieving a near-exhaustive level of knowledge recall.
[0047] Step S3: Multidimensional attribute structured mapping: Instantiate the extracted specification text to the preset multidimensional attribute structured template to generate semi-structured knowledge graphs.
[0048] This step serves as a bridge connecting natural language understanding and subsequent logical verification. The original specification phrases mined through multiple iterations are uniformly mapped and instantiated into a pre-defined multi-dimensional attribute structured template. This template deconstructs the inherent mechanism of security rules, forcing the system to fill non-standardized text into five standard dimensions: execution subject E, security attribute P, logical operator O, constraint threshold V, and pre-existing environment C. For example, a lengthy cryptographic algorithm specification is precisely broken down into a specific algorithm (subject), the number of calls (attribute), the maximum allowed (operator), a specific value (threshold), and a specific working mode (environment). Through this mapping process, the system successfully transforms chaotic corpora into highly cohesive, semi-structured knowledge graphs, laying a standardized data foundation for the next stage of symbolic translation and rigorous machine deduction.
[0049] Phase Two: Neural Symbol Consistency Auditing and Adaptive Alignment
[0050] Once the multi-dimensional attribute structured template is generated, the core verification and closed-loop feedback process for this stage will be initiated. This process transforms the probabilistic generation results of the neural network into rigorous mathematically deterministic logical proofs. Its core technical goal is to completely eliminate the "illusion of fact" inherent in large language models in long text reasoning, ensuring that every extracted security specification is free of logical paradoxes in the global dimension. The specific steps are as follows:
[0051] Step S4: Symbolic Translation of Specification: Translate the natural language constraints in the semi-structured knowledge graph into symbolic expressions.
[0052] This step is the entry point for formal logic verification. Its core task is to accurately reduce the dimensionality of the natural language constraints in the multidimensional template and transform them into symbolic expressions that can be computed by the mathematical solver. The system's internal translation engine automatically parses the key elements in the multidimensional template: first, it extracts logical operators (such as MUST, SHOULD, NOT, etc. in the RFC specification) and maps them to Boolean algebra operations; second, it extracts constraint thresholds (such as "bit length > 128" or "number of calls < 2^32") and transforms them into arithmetic relations; it defines the execution subject and security attributes as variables; it identifies the preconditions as constraints; and finally, according to preset syntax rules, it assembles the above discrete elements into a symbolic formula set supported by first-order predicate logic (FOL) or satisfiability module theory (SMT). This step completes the leap from fuzzy and ambiguous natural language semantics to rigorous and unambiguous mathematical logic features.
[0053] Step S5: Global satisfiability audit based on SMT solver: Input the symbolic expression into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the reduction set.
[0054] This step is the core engine of the verification method in this embodiment of the invention. First, the symbolic formula set generated in the previous step and the fundamental axioms of cryptography (as hard prerequisites) are jointly injected into the SMT solver (such as Z3) to perform a global satisfiability test. The global specification library is traversed to check whether there are logical contradictions between the specifications extracted from different chapters and whether the specifications conflict with the fundamental axioms of cryptography; the output is a satisfiable state SAT that represents the overall logical non-conflict or an unsatisfiable state UNSAT that represents the logical conflict.
[0055] For example, if the model extracts "the key length of algorithm A must be 64 bits" and "the key length of all authentication algorithms must not be less than 128 bits" in different chapters, this long-distance logical contradiction is often ignored by neural networks. However, the SMT solver can accurately determine that the current set of reductions is "unsatisfiable (UNSAT)" through rigorous mathematical deduction. This mechanism provides a solid verification foundation for the soft knowledge generated by large models by introducing external "hard logic" constraints.
[0056] Step S6: Conflict Origin and Feedback: If an unsatisfactory state result is detected, extract the minimum conflict subset and use context anchors to trace back to the corresponding position in the original PDF document; construct a logical reward function based on the minimum conflict subset, generate a negative penalty signal to fine-tune the neural network, correct the model reduction extraction deviation, and finally output a globally logically consistent security specification library.
[0057] This step is crucial for the system to achieve self-evolution. Using the verification results output from the previous step, bidirectional tracing and optimization are performed:
[0058] Source tracing (from logical conflict to physical text): For logical conflicts (UNSAT) reported by the SMT solver, the system extracts the minimum set of conflicts (MUS) that caused the contradiction. Then, using the context anchors established in the first stage, the system reverse-engineers the process, precisely mapping the conflict back to the physical location of a specific chapter or table in the original PDF document. This path not only reveals the source of the model's "illusion" but also provides highly accurate navigation for expert review.
[0059] Alignment Update (From Feedback Signal to Model Optimization): Based on the minimum conflict subset and its source tracing results, the system automatically constructs a logical reward function that includes assessments of syntactic compliance and logical consistency. The negative penalty signal generated by this function is injected into the underlying neural network through a feedback loop for model fine-tuning. This process enables the model to dynamically correct misunderstandings of specific complex sentence structures, continuously improving the accuracy of its zero-sample reduction mining, and ultimately outputting a high-quality secure reduction library that meets the "gold standard."
[0060] This invention also discloses an automatic generation system for cryptographic formal specifications based on logical consistency verification, comprising:
[0061] The multimodal layout anchor reconstruction module is used to perform multimodal layout parsing on the original cryptographic standard PDF document and generate structured intermediate text with context anchors;
[0062] The residual mask iterative mining module is used to perform multiple rounds of iterative mining based on residual masks on the structured intermediate text until semantic saturation is reached, and to extract explicit and implicit reductions.
[0063] The multidimensional attribute structured mapping module is used to instantiate the extracted specification text into a preset multidimensional attribute structured template to generate semi-structured knowledge graphs.
[0064] The symbolic interpretation module is used to interpret natural language constraints in semi-structured knowledge graphs into symbolic expressions.
[0065] The SMT satisfiability audit module is used to input the symbolic expression into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the specification set.
[0066] Furthermore, the residual mask iterative extraction module also includes a semantic saturation detection module, which is used to encode the extracted reduction of the current text block and generate a semantic mask, as well as to determine whether the residual space contains new constraint features.
[0067] The system also includes a conflict tracing and feedback module, which is used to extract the minimum conflict subset from the UNSAT results, reverse locate the conflict position of the original document using context anchors, and generate feedback signals for model optimization.
[0068] In summary, this invention proposes a feedback iteration mechanism based on "residual masking," breaking the limitations of traditional language models' single-step linear extraction and providing a self-closing algorithmic foundation for the complete extraction of implicit specifications in complex standard documents. Furthermore, it constructs a "neural generation-constraint solving" collaborative auditing mechanism, transforming probabilistic text extraction results into deterministic mathematical logic expressions, fundamentally overcoming the inherent logical illusion bottleneck in existing models during rule extraction.
[0069] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for automatically generating cryptographic formal specifications based on logical consistency verification, characterized in that, Includes the following steps: Perform multimodal layout parsing on the original cryptographic standard PDF document to generate structured intermediate text with contextual anchors; Multiple rounds of iterative mining based on residual masks are performed on the structured intermediate text until semantic saturation is reached, and explicit and implicit reductions are extracted. The extracted specification text is instantiated into a preset multi-dimensional attribute structured template to generate a semi-structured knowledge graph. Natural language constraints in semi-structured knowledge graphs are interpreted into symbolic expressions; The symbolic expression is input into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the reduction set.
2. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 1, characterized in that, The process of generating structured intermediate text with contextual anchors is as follows: remove visual layout interference from the original PDF document, parse continuous text blocks, multi-level nested tables, and algebraic formula areas separately; identify the hierarchical relationship of chapter titles, the correspondence between table cells and footnotes, and cross-paragraph cross-reference identifiers; and uniformly convert the parsing results into structured intermediate text with contextual anchors that include physical page number coordinates and logical chapter levels.
3. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 1, characterized in that, The iterative mining based on residual masks specifically includes: calling a neural network model to perform the first round of explicit reduction scanning and extraction on the structured intermediate text; encoding the extracted reduction content into features and generating corresponding semantic masks in the structured intermediate text to logically shield the reduction features of the mined areas; feeding the text carrying the semantic mask as residual features back to the model input, enabling the model to perform a second round of search on the residual space not covered by the mask; repeating the above mask generation and iterative search until it is determined that the current text block no longer contains new constraint features.
4. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 1, characterized in that, The multidimensional attribute structured template includes five standard dimensions: execution subject E, security attribute P, logical operator O, constraint threshold V, and pre-context C. It is used to decompose and map unstructured original specification short sentences into standardized knowledge graphs.
5. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 4, characterized in that, The process of interpreting natural language constraints in semi-structured knowledge graphs into symbolic expressions includes: extracting logical operators and mapping them to Boolean algebra operations; extracting constraint thresholds and converting them into arithmetic relations; defining the execution subject and security attributes as variables; identifying the preceding environment as constraint premises; and assembling the above discrete elements into a symbolic formula set supported by first-order predicate logic or satisfiability modular theory according to preset grammar rules.
6. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 1, characterized in that, The process of inputting the symbolic expression into the SMT solver to perform a global satisfiability test includes: injecting the symbolic expression and fundamental axioms of cryptography into the SMT solver; traversing the global specification library to detect whether there are logical contradictions between specifications extracted from different chapters and whether the specifications conflict with fundamental axioms of cryptography; and outputting either a satisfiable state SAT that represents a logically conflict-free overall system or an unsatisfiable state UNSAT that represents a logically conflicting system.
7. The method for automatically generating cryptographic formal specifications based on logical consistency verification according to claim 6, characterized in that, The method also includes conflict tracing and feedback steps: if an unsatisfactory state result is detected, the minimum conflict subset is extracted and the context anchor is used to trace back to the corresponding position in the original PDF document; a logical reward function is constructed based on the minimum conflict subset, a negative penalty signal is generated to fine-tune the neural network, correct the semantic extraction deviation of the model, and finally output a globally logically consistent security specification library.
8. An automatic generation system for cryptographic formal specifications based on logical consistency verification, characterized in that, include: The multimodal layout anchor reconstruction module is used to perform multimodal layout parsing on the original cryptographic standard PDF document and generate structured intermediate text with context anchors; The residual mask iterative mining module is used to perform multiple rounds of iterative mining based on residual masks on the structured intermediate text until semantic saturation is reached, and to extract explicit and implicit reductions. The multidimensional attribute structured mapping module is used to instantiate the extracted specification text into a preset multidimensional attribute structured template to generate semi-structured knowledge graphs. The symbolic interpretation module is used to interpret natural language constraints in semi-structured knowledge graphs into symbolic expressions. The SMT satisfiability audit module is used to input the symbolic expression into the SMT solver to perform a global satisfiability check and determine whether there are logical conflicts within the specification set.
9. The automatic generation system for cryptographic formal specifications based on logical consistency verification according to claim 8, characterized in that, The residual mask iterative extraction module also includes a semantic saturation detection module, which is used to encode the extracted reduction of the current text block and generate a semantic mask, as well as to determine whether the residual space contains new constraint features.
10. The automatic generation system for cryptographic formal specifications based on logical consistency verification according to claim 8, characterized in that, The system also includes a conflict tracing and feedback module, which is used to extract the minimum conflict subset from the UNSAT results, reverse locate the conflict location in the original document using context anchors, and generate feedback signals for model optimization.