A method for writing official documents based on cognitive externalization and evolving intelligent agents
Patent Information
- Application Number
- CN202610764617.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-28
AI Technical Summary
[0007]发明目的,提供一种基于认知外化与演进智能体的公文写作方法,旨在解决现有技术无法理解与复用论证逻辑、缺乏生成内容逻辑自检能力及知识库被动僵化等深层问题
[0013] Beneficial effects: This invention elevates official document writing from a text generation tool to an engine for the construction and evolution of organizational cognition. Through the transplantation of argumentation context, adversarial reasoning by intelligent agents, and self-evolution of knowledge graphs, the generated official documents possess fully refuted logical rigor and cross-context policy adaptability, while driving the continuous self-consistency and evolution of organizational cognitive assets.
Smart Images

Figure CN122655700A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent decision-making technology in supply chains, and in particular to a document writing method based on cognitive externalization and evolving intelligent agents. Background Technology
[0002] With the deepening of digital government construction, the intelligent transformation of official document writing has become a key link in improving administrative efficiency. Official document writing differs from general text generation tasks; its core requirements lie in rigorous argumentation, policy compliance, logical consistency, and precise context. Existing technological solutions mostly focus on text retrieval and language generation; however, several fundamental technical bottlenecks remain in supporting the deep cognitive processing required for high-quality official document writing.
[0003] First, at the knowledge reuse level, existing systems generally employ text fragment retrieval mechanisms based on keywords or vector similarity. These methods can only capture the surface semantic relationship between the query and the document, failing to understand and transfer the complete logical structure of arguments contained in historical examples. When the policy context changes, simple text matching is insufficient to determine whether an argument still holds true in the new context and how it needs adjustment. This results in a significant amount of high-quality argumentative wisdom stored in organizational archives being unable to be effectively reused, leading to a continuous loss of cognitive assets.
[0004] Secondly, at the content generation level, directly applying large language models to official document writing carries inherent logical risks. Generative models tend to produce seemingly fluent text based on statistical correlations, but lack the ability to self-verify the internal logical validity of the argumentation process. Official documents have extremely high requirements for causal inference, policy basis, and definition of authority and responsibility. Content automatically generated without rigorous logical refutation is prone to hidden logical flaws such as reversed causality, overgeneralization, or missing evidence, making it difficult to meet the standardized requirements of formal official documents.
[0005] Furthermore, at the knowledge management level, existing knowledge base technologies are essentially passive storage systems, with knowledge updates and maintenance entirely dependent on manual operation. When new higher-level regulations are issued, old policies are revised, or there are contradictions between cross-departmental documents, existing knowledge bases cannot proactively identify these cognitive conflicts, nor can they assess their chain reaction impact on the compliance of historical documents, leading to entropy-driven degradation of the knowledge system over time.
[0006] In summary, existing technologies are insufficient to fundamentally solve the three core challenges of "understanding and transplanting argumentation logic," "logical self-checking and refutation of generated content," and "proactive self-consistency and evolution of knowledge systems." There is an urgent need for an innovative technological solution that addresses the cognitive essence of official document writing. Summary of the Invention
[0007] The purpose of this invention is to provide a document writing method based on cognitive externalization and evolving intelligent agents, aiming to solve the deep-seated problems of existing technologies such as the inability to understand and reuse argumentation logic, the lack of self-checking ability of generated content logic, and the passive rigidity of knowledge base.
[0008] A technical solution, a document writing method based on cognitive externalization and evolved intelligent agents, includes the following steps:
[0009] Based on the user's initial writing intent, deep semantic analysis and contextual element extraction are performed to obtain the initial task context vector;
[0010] The historical argument framework is extracted from the self-evolving knowledge graph. Based on the initial task context vector, the historical argument framework is adapted and transplanted across contexts to form a transplanted argument framework structure.
[0011] The transplanted argumentation framework is input into a generative adversarial reasoning network consisting of argumentation agents, questioning agents, and arbitration and synthesis agents, and multiple rounds of dynamic adversarial logical deduction are carried out to generate a logic tree that has been refuted and argued.
[0012] The logic tree and user decision preferences are used as new knowledge nodes and written back to the cognitive tension-driven self-evolving knowledge graph, triggering cognitive tension calculation and driving the graph's self-evolution.
[0013] Beneficial effects: This invention elevates official document writing from a text generation tool to an engine for the construction and evolution of organizational cognition. Through the transplantation of argumentation context, adversarial reasoning by intelligent agents, and self-evolution of knowledge graphs, the generated official documents possess fully refuted logical rigor and cross-context policy adaptability, while driving the continuous self-consistency and evolution of organizational cognitive assets. Attached Figure Description
[0014] Figure 1 This is a flowchart of the overall solution of the present invention.
[0015] Figure 2 This is a flowchart of the cross-context adaptation and transplantation of the historical argumentation framework in this invention.
[0016] Figure 3 This is a flowchart illustrating how the initial task context vector is obtained in this invention.
[0017] Figure 4 This is a flowchart of the logic tree generated by the present invention after rebuttal and argumentation.
[0018] Figure 5 This is a flowchart of the invention that triggers cognitive tension calculation and drives the self-evolution of the graph. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0020] like Figures 1-5 As shown, this embodiment describes in detail the data processing flow of a document writing method based on cognitive externalization and evolutionary intelligent agents, specifically including:
[0021] S1: Based on the user's initial writing intent, perform deep semantic analysis and extract contextual elements to obtain the initial task context vector.
[0022] In this application, the user's vague writing concept is transformed into a structured task context representation that can be directly processed by subsequent modules. Specifically, firstly, the initial writing intent data of multiple modalities is collected concurrently through the front-end interface of the logical deduction visualization interactive canvas. This multimodal intent data may include text commands directly typed by the user at the interaction node, voice descriptions recorded by audio acquisition devices, and background material data such as reference documents and images provided by dragging or uploading.
[0023] After acquiring multimodal data, the normalization and fusion processing stage is performed according to the method of this embodiment. For speech data, a streaming speech recognition engine is invoked to perform real-time transcription processing, converting continuous audio waveform signals into discrete speech-to-text sequences. For background material data, differential extraction is performed based on its format type: for image and scanned document data, the OCR recognition module is activated to parse the pixel array information in the image into editable text information; for document data, the document structure parsing model is invoked to strip format control characters and extract the plain text content of each chapter level. Furthermore, the aforementioned speech-to-text and key text information extracted from the background material are subjected to cross-modal alignment and semantic fusion processing to eliminate information redundancy and potential contradictions between different data sources, resulting in a complete and unified user intent fused text sequence.
[0024] After obtaining the fused text sequence, it is fed into a pre-trained deep intent understanding model for semantic parsing. In this embodiment, the intent understanding model performs three core extraction tasks. First, it identifies the core appeal by accurately locating the core actions (such as "drafting," "revising," and "arguing") and target entities (such as "implementation opinions on the development of XX industry") of the user's intent through sequence labeling and dependency parsing, and outputs the core verbs of intent and the target entity pairs. Second, it extracts constraints by extracting explicit or implicit writing constraints from the text using keyword matching and template parsing rules, forming a set of constraints. Typical constraints include document type, target audience level, keyword list, expected word count range, etc. Third, it extracts contextual elements by inferring non-explicit contextual information crucial to the construction of the argument from the text based on named entity recognition and common sense graph reasoning. This includes identifying the issuing body from pronouns such as "our commission" and "this bureau," and extracting the policy field, administrative level, and geographical scope of the task from the task background description, thereby constructing an initial set of contextual parameters. Preferably, the discrete results of the above processing—the core intention verb, the target entity, the set of constraints, and the initial context parameter set—are structurally encapsulated and integrated into a set of high-dimensional semantic vectors and their associated structured descriptions, i.e., the initial task context vector. This vector serves as both the query anchor for subsequent graph retrieval and the input benchmark for context transfer adaptation.
[0025] S2: Extract the historical argument framework skeleton from the self-evolving knowledge graph, and adapt and transplant the historical argument framework skeleton across contexts according to the initial task context vector to form the transplanted argument framework structure.
[0026] After generating the initial task context vector, this embodiment no longer retrieves isolated text fragments. Instead, it seeks out and reuses historically successful argumentation structures that are highly isomorphic in argumentation logic to the current intent from the organization's accumulated knowledge assets, and semantically adapts them to the new policy context. In this embodiment, the process begins with the extraction of the first context parameter set, that is, extracting the specific values of four dimensions—the document subject, policy field, administrative level, and geographical scope—from the structured description part of the initial task context vector to form the first context parameter set.
[0027] Simultaneously, a retrieval of candidate context nodes is performed within the self-evolving knowledge graph. For example, the core verbs of intent, target entities, and policy domain fields are extracted from the initial task context vector and combined into a query intent graph representation according to the node and relation patterns of the knowledge graph. Subsequently, the topological similarity and node semantic similarity between this query graph and all "argument context" type nodes in the knowledge graph are calculated. Topological similarity measures the degree of matching between the logical deduction structure of the query intent and the graph structure of the candidate context skeleton, while node semantic similarity assesses the distance between their core concepts in the vector space. The results of the weighted fusion of these two similarities are sorted in descending order to select the top-scoring candidate context nodes, and the historical argument context skeleton structures stored in these nodes are extracted. Each historical argument context skeleton structure contains elements such as premise assumptions, argument chains, and conclusions, stored in a graph-like logical relationship.
[0028] For each selected candidate context node, its associated original successful application context parameters are obtained, forming a second context parameter set. This second context parameter set records the spatiotemporal and policy background in which the historical argument was successfully written and applied. Subsequently, the first context parameter set representing the current task and the second context parameter set representing the historical context are input into a pre-trained context transfer adaptation model. This adaptation model first calculates the differences between the two sets of context parameters in the time, geographical, and hierarchical dimensions, generating a multi-dimensional difference metric vector. Based on this difference metric vector, the model's internal gating mechanism and attention network generate a context mapping function, which is essentially a set of semantic transformation rules. Applying this context mapping function, the historical argument framework extracted from the knowledge graph is subjected to node-by-node context replacement and relation redirection. For example, a relatively abstract argument node in the skeleton, "providing financial subsidies to specific industries," will be concretized into "providing financial interest subsidies for decarbonization upgrades to eligible provincial digital economy park operating enterprises based on the establishment of the provincial digital economy development special fund in 2026." This adaptation operation continues until all abstract argument nodes in the skeleton have been contextualized and updated, ultimately generating a transplanted argument skeleton structure that inherits historical wisdom in its logical structure and is perfectly self-consistent with the current task in its content context.
[0029] S3: Input the transplanted argumentation framework into a generative adversarial reasoning network composed of argumentation agents, questioning agents, and arbitration and synthesis agents, and conduct multiple rounds of dynamic adversarial logical deduction to generate a logic tree that has been refuted and argued.
[0030] This embodiment is used to externalize deep reasoning. First, the transplanted argument skeleton structure, along with the initial task context vector, is transmitted to the argument agent in the generative adversarial reasoning network. According to a preferred embodiment, the argument agent generates an initial logic tree with blue as the main color on the logic deduction visualization interactive canvas based on the received skeleton structure and context vector. This initial logic tree includes a top-level main argument node, as well as a series of sub-argument nodes that expand in a tree structure to support the main argument and terminal evidence nodes, constituting the initial positive logical structure of the proposition to be argued.
[0031] Furthermore, the interrogating agent in the generative adversarial reasoning network is activated, its design goal being specifically focused on attacking the logical rigor of the drafts generated by the opposing agent. The interrogating agent traverses each argument node in the initial logic tree, performing logical flaw detection and counterexample generation tasks. When logical flaws such as reversed causality, improper analogy, or missing evidence chains are identified, or when contradictory known facts are found as counterexamples, a prominent red adversarial logical branch is generated at that node on the canvas. These adversarial branches contain specific counterexample nodes and risk markers, detailing the reasons for challenging the opposing argument.
[0032] After multiple rounds of game-playing between the argument-making agent and the questioning agent, an arbitration and synthesis agent intervenes. This agent is designed to be impartial, deeply analyzing the data records of the entire debate process to accurately identify the root causes of the disagreements between the two sides. The arbitration and synthesis agent proactively triggers cross-document evidence chain verification, retrieving relevant laws, cases, and data from the knowledge graph for higher-level logical aggregation. Its output is one or more sets of new logical nodes marked in green. These nodes represent comprehensive arguments that transcend the original positions of both sides, which may be a re-definition of the original conditions or a proposal of a completely new differentiated implementation path.
[0033] The entire deliberation process of the three agents mentioned above is not a closed internal computation, but rather is mapped in real-time and completely onto a visual interactive canvas of logical deduction in front of the user, forming a dynamic logic tree that continuously branches out in depth and to the opposite sides. During this process, the user acts as the deliberation moderator and facilitator, guiding any logical node on the canvas, including confirming a robust branch, pruning irrelevant rebuttals, developing insightful questions, or manually adding annotations. Based on the user's guidance, the logic tree dynamically adjusts the deliberation direction and depth of subsequent agents, generating revised logic tree branches. This process repeats until the structural integrity and attack resistance of the logic tree reach a preset robustness threshold, or the user actively issues a final generation command. At this point, the current state of the logic tree is frozen and determined as the final logic tree. In one alternative implementation, after determining the final logic tree, based on the selected logic branches confirmed or adopted by the user, and in accordance with the document type and format specifications of the target document, the tree-like logic structure is unidirectionally expanded into a one-dimensional linear text sequence and filled into the corresponding chapter positions of the document format template, ultimately generating a logically rigorous and rigorous formal document text.
[0034] S4: Use the logic tree and user decision preferences as new knowledge nodes, write them back to the cognitive tension-driven self-evolving knowledge graph, trigger cognitive tension calculation and drive the graph's self-evolution.
[0035] A complete official document writing process should not merely produce a final document, but rather become nourishment for the evolution of organizational cognition. According to the final aspect of this application, after the final logic tree is generated and the document text is linearly expanded based on it, the two core knowledge assets generated during the writing process are abstracted into standardized knowledge nodes. First, the final logic tree itself, after debate and revision, including its complete logical branch structure, the argumentation content of each node, and the chain of evidence cited, is abstracted into a new argumentation context node. Second, the decision-making patterns exhibited by users during canvas interaction—such as choosing a particular type for in-depth discussion among multiple parallel counterexamples, or frequently adding annotations and corrections to links in a certain policy area—are abstracted into a new decision preference node reflecting the organization's decision-making style.
[0036] These two new nodes are formally written into the self-evolving knowledge graph. Simultaneously, semantically clear relationship edges must be established between the new nodes and existing knowledge nodes in the graph. For example, these relationship edge types include: establishing a "citation" relationship, marking the new document's argument's dependence on a certain legal provision; establishing a "revision" relationship, connecting the old version replaced by this document; establishing a "conflict" relationship, indicating the contradiction between the new document's argument and certain existing knowledge in the database; establishing a "refinement" relationship, when the new document is a detailed implementation rule for a higher-level macro-policy; and establishing a "substitution" relationship, when a new revolutionary argumentation method completely replaces the old model.
[0037] Once the graph is written and the relationship links are completed, a cognitive tension-driven graph self-evolution process will be automatically triggered. The tension calculation engine embedded within the graph then starts, recalculating three key cognitive tension indices for the node cluster within the influence range of the written nodes: first, a conflict tension index, used to quantify the degree of disharmony between directly related nodes due to contradictions in terminology, arguments, or data; second, a structural fault index, used to detect whether a policy area lacks lower-level operational nodes with specific granularity or type; and third, an obsolescence risk index, used to assess the potential compliance risks of a regulatory node that is "replaced" by a new version but still relied upon in the "reference" paths of multiple key argumentation contexts. The proactive evolution trigger unit monitors the dynamic thresholds of all these tensions in real time. Once any cognitive tension index exceeds its corresponding preset threshold, maintenance suggestions or compliance risk alerts will be automatically generated for specific nodes or contexts, pushed to the knowledge management personnel's to-do interface, and the affected superior argumentation context nodes will be forcibly triggered to enter the "pending reassessment" state, driving the organization's cognitive assets to remain fresh, self-consistent, and evolving in the continuous tension, identification, and resolution.
[0038] According to another aspect of this application, the historical argumentation framework is adapted and transplanted across contexts, including:
[0039] Extract the first context parameter set from the initial task context vector. The first context parameter set includes the issuing entity, policy field, administrative level and geographical scope.
[0040] After obtaining the initial task context vector, the migration process first focuses on the structured extraction of the contextual information of the current writing task itself. Specifically, the initial task context vector, as a composite data structure, contains both a high-dimensional numerical vector for semantic matching and a structured description field output by the intent understanding model. In this embodiment, the parsing program accesses the structured description part of the vector and performs field-by-field data extraction operations based on a predefined context parameter template. First, the issuing body field is located and extracted from the named entity recognition results. This field identifies the responsibility and stance of the document, such as "Provincial Development and Reform Commission" or "Digital Transformation Leading Group Office of a City". Second, the policy domain field is extracted from the task background description and keyword clustering results to determine the policy scope involved in the document, such as "Development of Core Digital Economy Industries", "Aging-Friendly Renovation of Old Residential Communities", or "Cross-border Data Flow Management". Third, based on the institutional attributes of the issuing body and the reasoning results of the document circulation path, the administrative level field is determined to indicate the level of effectiveness of the document, such as "Provincial", "Municipal Bureau", or "Ministry". Finally, from the analysis of the geographical qualifiers and scope of application of the target task, the geographical scope field is obtained to define the applicable spatial boundaries of this document, such as "the whole province", "the Yangtze River Delta Ecological Green Integrated Development Demonstration Zone" or "the coastal economic belt of this province". After extraction and verification, the fields of the above four dimensions are encapsulated into a unified data structure, namely the first context parameter set, which provides the current task-side benchmark input for subsequent calculation of contextual differences with historical context.
[0041] Candidate context nodes are retrieved from the self-evolving knowledge graph, and context parameters of the original successful applications associated with the candidate context nodes are obtained to form a second context parameter set.
[0042] This embodiment is responsible for retrieving the most logically matching historical context from the organization's long-term accumulated cognitive assets and extracting its original application context. In a preferred embodiment, firstly, a query intent graph representation oriented towards a knowledge graph is constructed based on the acquired core verbs of intent, target entities, and policy domain fields. This graph representation uses the core concepts of the current task as nodes and the semantic relationships between concepts as edges, forming a structured query graph representing the retrieval intent. Subsequently, this query intent graph representation is subjected to graph matching search in a cognitive tension-driven self-evolving knowledge graph, calculating its topological similarity and node semantic similarity with all nodes in the graph labeled as "argument context". Topological similarity measures the alignment of the skeleton structure of the query intent with the argument skeleton stored inside the candidate context node at the layer level, while node semantic similarity evaluates the cosine distance between the corresponding concept nodes in the vector embedding space. Based on the weighted fusion score of the above two types of similarity, several candidate context nodes with the highest scores are selected. For each selected candidate context node, its associated "original successful application context" attribute subgraph in the knowledge graph is further accessed to extract the complete context parameters of when the historical argument framework was successfully written and put into practice, including the issuing entity, the corresponding policy field, the administrative level, and the geographical scope. These historical context parameters are structured and encapsulated to form a second context parameter set.
[0043] The first and second context parameter sets are input into the context transfer adaptation model to calculate the difference measurement vectors in the time dimension, region dimension, and hierarchy dimension, and generate the context mapping function.
[0044] In this embodiment, the context representing the current task and the context representing historical success are jointly fed into a specially trained context transfer adaptation model to quantify their differences across multiple dimensions and generate mapping rules for context transfer. Specifically, the context transfer adaptation model receives a first set of context parameters and a second set of context parameters as dual inputs. Internally, the model first activates a multi-dimensional difference calculation module, comparing the two sets of parameters one by one across several preset semantic dimensions. In the time dimension, it calculates the numerical difference or time span of the document publication time and policy cycle stage to generate a time difference component; in the geographical dimension, based on a preset administrative region ontology tree, it calculates the tree distance, economic development gradient difference, and resource endowment similarity between the two locations, synthesizing them into a geographical difference component; in the hierarchical dimension, it calculates the difference in administrative rank and scope of authority to generate a hierarchical difference component. The difference components of each dimension are concatenated to form a multi-dimensional difference measurement vector, comprehensively characterizing the overall offset between the two writing task contexts. Subsequently, based on this set of difference metric vectors, the context transfer adaptation model dynamically generates a context mapping function through its internal gating mechanism and attention network. This context mapping function is essentially a parameterized representation of a set of conditional transformation rules, defining how, under a specific difference pattern, concepts, terms, and policy expressions in one context are systematically transformed into semantically adapted counterparts in another context.
[0045] By applying the context mapping function, the abstract argument nodes in the argument skeleton of the candidate context nodes are replaced and the relationships are redirected node by node to obtain a ported argument skeleton structure adapted to the current task.
[0046] After the context mapping function is generated, the actual argument skeleton transplantation operation stage begins. This embodiment uses the historical argument skeleton carried by the optimal candidate context node as the operation object, and the context mapping function as the transformation rule set to traverse and rewrite the skeleton structure from top to bottom. Specifically, the traversal process starts from the root node of the argument skeleton (usually the main argument) and gradually expands along the argument edges to the sub-argument nodes and evidence nodes. For each abstract argument node encountered, the context mapping function is called to perform semantic replacement processing. For example, if an abstract node in the historical skeleton is "giving preferential land use quotas to leading enterprises," while the context mapping function indicates that in the current task context, the policy logic has changed to "providing flexible industrial space based on per-acre benefit evaluation," then the core semantic content of that node is replaced with the latter, while retaining its functional role in the argument chain (such as "supply-side incentive measures"). After completing the context replacement of the node content, a further check and relation redirection operation is performed. This involves evaluating whether the original argumentative relationships between the node and its parent and child nodes still hold true in the new context. If situations arise, such as changes in the type of policy tool causing the inference path to fail, the type of the relation edge is adjusted or the argumentative link is rerouted to a more suitable supporting node. Once all abstract argumentative nodes in the skeleton have completed the above context replacement and relation redirection, a transplanted argumentative skeleton structure that is logically isomorphic to the original historical context but is fully adapted to the current writing task in terms of content semantics and policy orientation is generated.
[0047] According to another aspect of this application, the initial task context vector is obtained, including:
[0048] By using the front-end interface of the logical deduction visualization interactive canvas, multimodal intent data of user input is collected, including text commands, voice data, and background material data.
[0049] This embodiment establishes the initial entry point for communication between the user and the system regarding writing intent. In this embodiment, the logical deduction visualization interactive canvas serves not only as the display interface for the subsequent reasoning process but also as a unified front-end for collecting multimodal intents. Specifically, the front-end interface of the interactive canvas concurrently opens multiple input channels. The first channel is a text input channel, where the user directly types structured text instructions via keyboard or touch in the core intent node area of the canvas, such as "Draft a document on several policy measures to promote the clustered development of the artificial intelligence large-scale model industry in this province." The second channel is a voice input channel, where the user verbally expresses their writing intent in a natural, conversational manner using the microphone access integrated into the canvas. The verbal content can include more background explanations and emphasis, among other paralinguistic information. The third channel is a background material upload channel, where the user uploads background material data related to the writing task, such as reference documents, historical documents, research reports, or news photos, to the canvas's material area by dragging and dropping or selecting files. The data collected from these three channels have different modal characteristics and information densities, collectively constituting a complete multimodal intent dataset.
[0050] The speech data is processed by streaming speech recognition to obtain speech-to-text; background material data is processed by OCR recognition and document structure parsing to extract key text information; the speech-to-text and key text information are aligned and fused to obtain a fused text sequence of user intent.
[0051] After collecting multimodal intent data, this embodiment performs corresponding preprocessing and normalization operations for different modalities, unifying heterogeneous multi-source information into a single text representation. First, for speech data collected via the speech channel, a streaming speech recognition engine is invoked for processing. This engine employs end-to-end acoustic-language joint modeling technology to perform real-time segmentation, noise suppression, and feature extraction on continuous audio waveform signals, decoding them frame-by-frame into phoneme sequences and further mapping them to text, ultimately outputting a speech-to-text sequence with timestamps. Second, for background material data provided via the upload channel, processing is performed based on the file's MIME type. For image files, the OCR recognition module is activated to perform text line detection, character segmentation, and recognition on the pixel array in the image, extracting text information embedded in the image. For document files such as PDFs or Word documents, a document structure parsing model is invoked to remove format control characters and layout information, accurately extracting key text information such as heading levels, body paragraphs, table content, and headers and footers. After this, alignment and fusion procedures are applied to the speech-to-text and the key text information extracted from the background material. The program first establishes the correspondence between text paragraphs from different sources based on the similarity of semantic vector space, then performs redundancy elimination processing, merges content that is repeated across sources, and resolves possible semantic conflicts, and finally outputs a complete and logically consistent user intent fusion text sequence.
[0052] The model integrates text sequence input intent understanding and performs deep semantic parsing to identify core intent verbs and target entities, extracts a set of constraints, and constructs an initial context parameter set based on the issuing entity, policy field, administrative level, and geographical scope.
[0053] After obtaining the unified fused text sequence, this embodiment performs a deep analysis of the user's writing intent, extracting key structured information from the natural language description to support subsequent processing. Specifically, the fused text sequence is fed into a specially fine-tuned deep intent understanding model. This model first performs a core appeal identification task, employing an extractive reading comprehension architecture based on span representation to accurately locate the core action words of the user's intent (such as "formulate," "revise," "argue," "approve," etc.) and the target entity phrases governed by these actions (such as "Several Policy Measures for the Agglomeration and Development of the Artificial Intelligence Large Model Industry" and "2026 Budget Execution Audit Work Plan") in the text sequence, and outputs the two as a pair of core intent verbs and target entities. Subsequently, the model performs a constraint extraction task, identifying the writing specifications explicitly or implicitly defined by the user from the text through sequence labeling, forming a set of constraints. Typical constraints include document type, security classification, primary and secondary recipients, expected word count range, and mandatory higher-level laws. Finally, the model performs the task of extracting contextual elements. Based on the named entity recognition and referential resolution capabilities within the pre-trained language model, it infers non-explicit contextual information from the text that is crucial for the construction of the argument, including the full name of the issuing entity, the classification code of the policy field involved, the administrative level of the document, and the applicable geographical scope, and uses this to construct the initial set of contextual parameters.
[0054] The initial task context vector is generated by integrating the core verb of intent, target entity, set of constraints, and initial context parameter set.
[0055] After extracting information from each dimension, this embodiment is responsible for structurally aggregating and vectorizing all discrete parsing results to form a standard data format that can be directly called by downstream modules. Specifically, the integration program first constructs semantic relationship triples for the core verbs of intent and target entities, and maps them into high-dimensional semantic vectors through a pre-trained embedding model. Subsequently, the constraints in the constraint set are type-encoded and normalized, transforming them into a series of attribute key-value pairs. Next, the four fields of issuing body, policy field, administrative level, and geographical scope in the initial context parameter set are mapped into discrete indices according to a predefined dictionary and embedded. Finally, the intent semantic vector, constraint attribute key-value pairs, and the embedded representation of context parameters are merged and encapsulated according to a preset data structure template to generate a composite data object with both vector query capabilities and structured description capabilities, namely the initial task context vector.
[0056] According to another aspect of this application, a logic tree of refuted arguments is generated, including:
[0057] The argumentation agent receives the transplanted argumentation skeleton structure and the initial task context vector, and generates an initial logic tree. The initial logic tree includes a main argument node and sub-argument nodes and evidence nodes to support the main argument node.
[0058] After generating the transplanted argument skeleton structure, the generative adversarial reasoning network is officially launched. In this embodiment, the argument-setting agent executes first. Specifically, the argument-setting agent receives two input data simultaneously: one is the transplanted argument skeleton structure, which defines the macro-logical direction of the official document's argument and the deductive relationships between nodes; the other is the initial task context vector, which carries the specific semantic direction and constraints of the current writing task. Based on the logical prototype provided by the skeleton structure, and combined with the core demands and constraints in the context vector, the argument-setting agent generates an initial logic tree rendered with a first visual attribute (such as blue) on the logic deduction visualization interactive canvas. The top-level root node of this initial logic tree is the main argument node, whose text content directly responds to the core demands of the user's intent. From the main argument node downwards, according to the development path defined in the argument skeleton, several columns of supporting sub-argument nodes are generated layer by layer. Each sub-argument node further extends downwards, connecting to specific evidence nodes, which contain citationable data facts, legal clauses, or case names. The entire initial logic tree constitutes the preliminary positive argument structure of the official document's proposition.
[0059] The interrogating agent performs logical vulnerability detection and counterexample generation on each argument node of the initial logic tree, and generates adversarial logic branches on the initial logic tree. The adversarial logic branches contain counterexample nodes and risk markers.
[0060] After the argument-making agent completes the construction of the initial logic tree, the interrogating agent is immediately activated, its function being to act as a rigorous checker of the positive argument structure. In this embodiment, the interrogating agent executes a depth-first traversal algorithm, visiting each argument node in the initial logic tree one by one. For each visited argument node, the interrogating agent initiates two parallel analysis tasks. The first is a logic flaw detection task, which uses a built-in argument fallacy classifier to detect whether the argument node has common logical flaws such as causal reversal, circular reasoning, generalization, false analogy, and slippery slope reasoning. The second is a counterexample generation task, which attempts to generate counterexamples that can refute the argument by retrieving factual records, data cases, or precedent policies in the self-evolving knowledge graph that contradict the semantics of the argument. When a logical flaw is detected or a counterexample is successfully generated, the interrogating agent generates an adversarial logical branch at the branch terminal of the current argument node with a prominent second visual attribute (such as red). This adversarial logic branch contains counterexample nodes that specifically describe the content of the challenge, as well as risk markers that indicate the type of logical fallacy or the source of the counterexample, providing clear clues for users to make subsequent judgments.
[0061] The arbitration and synthesis agent identifies the core disagreements between the argumentative and adversarial logic branches in the initial logic tree, and performs higher-order logic aggregation through cross-document evidence chain verification to generate new logic nodes containing comprehensive arguments.
[0062] After the interrogating agent generates adversarial logical branches for multiple argument nodes, the arbitration and synthesis agent intervenes in the deliberation process. In this embodiment, the arbitration and synthesis agent first performs deep semantic analysis on the debate pairs formed between the argument logic branches (blue) and the adversarial logic branches (red), accurately extracting the core points of disagreement that lead to the opposition between the two sides. These core points of disagreement may manifest as differences in the definition of the same term, different judgments on the presuppositions of policy implementation, or methodological differences in the estimation of the future scope of impact. After identifying the core disagreement, the arbitration and synthesis agent does not favor either side, but triggers a cross-document evidence chain verification process, simultaneously retrieving higher-level legal texts, authoritative statistical data, and cross-departmental signed documents supporting or opposing the positions in the self-evolving knowledge graph, forming a dispute-related evidence map. Based on this evidence map, the arbitration and synthesis agent performs high-order logical aggregation operations, attempting to propose comprehensive arguments that transcend the original binary opposition of the argument and the interrogation, such as adding a "phased dynamic evaluation and exit mechanism" as a precondition for a questioned subsidy scheme. Ultimately, this comprehensive argument was inserted into the logic tree at the location where the dispute occurred, in the form of a new logical node representing a third visual attribute (such as the color green).
[0063] The interaction process of the argumentation agent, the interrogation agent, and the arbitration and synthesis agent is mapped in real time as a logic tree that grows dynamically on the logic deduction visualization interactive canvas. The branches generated by different agents in the logic tree are distinguished by differentiated visual attributes.
[0064] This embodiment ensures that the entire internal reasoning process of the intelligent agent is completely transparent and controllable to the user. During the operation of the generative adversarial reasoning network, the entire process of the argumentative agent generating blue positive branches, the interrogating agent generating red adversarial branches, and the arbitrating and synthesizing agents inserting into green synthesizing nodes is continuously captured by a real-time state synchronization engine and converted into a front-end renderable visual event stream. On the logical deduction visualization interactive canvas, these event streams are continuously mapped into a dynamic logic tree that grows outwards, downwards, and to the opposite side. What the user observes on the canvas is not a static text outline, but a reasoning evolution that uses colors to distinguish roles, lines to represent logical relationships, and animations to present the growth process. The generation of each branch carries a clear identifier of the source agent, and the risk markers and evidence links of each node can be clicked to expand and view details, allowing the user to fully trace the origin and development of any argument and all the questioning and synthesis it has undergone.
[0065] According to another aspect of this application, triggering cognitive tension computation and driving map self-evolution includes:
[0066] The final logic tree and user decision preferences generated during this writing process are abstracted into new argumentation context nodes and new decision preference nodes, and written into the self-evolving knowledge graph.
[0067] After the critical thinking process concludes and the final logic tree is determined, this embodiment initiates the process of accumulating the cognitive assets of this writing task. Specifically, the first step is knowledge abstraction. On one hand, for the final logic tree, the core output, its complete tree structure topology, the argumentative text content of each node, the types of logical relationships between nodes (such as support, progression, transition, and exemplification), and the external evidence links referenced by the nodes are extracted and encapsulated into a standardized argumentative context data object, namely, a new argumentative context node. On the other hand, user decision preference mining is performed on the interaction behavior logs left by the user when guiding the logic tree on the critical thinking canvas. This mining process statistically analyzes the user's adoption tendency when faced with disagreements between arguments and questions, the degree of importance attached to specific types of arguments, and the semantic distribution of annotations added to nodes in different policy areas. Based on this, a new decision preference node representing the user's decision-making pattern in this writing task is abstracted. Subsequently, the two newly generated knowledge nodes are formally stored in the persistent storage layer of the cognitive tension-driven self-evolving knowledge graph through the graph writing interface.
[0068] Establish relationship edges between new argument context nodes and existing nodes in the graph. The types of relationship edges include reference, revision, conflict, refinement, and replacement.
[0069] After writing the new node, this embodiment is responsible for establishing explicit semantic associations between the new node and existing cognitive assets in the self-evolving knowledge graph, enabling the new knowledge to be seamlessly integrated into the organization's existing knowledge network. Specifically, the relationship-building engine parses the content and metadata of the new argumentative context node, automatically identifies the potential association types between it and existing nodes in the graph, and creates directed relation edges one by one. When the argument of a new context node explicitly cites a legal clause node, a relation edge of type "citation" is established. When the generated document is a formal revised version of a document previously issued by the same entity, a relation edge of type "revision" is established pointing to the old version of the document. When the core argument in the new context clearly contradicts the conclusion of an existing cognitive node in the graph, a relation edge of type "conflict" is established to identify this knowledge tension that requires subsequent attention. When the new document is a specific implementation rule of a higher-level macro-guidance in this region or field, a relation edge of type "refinement" pointing to the higher-level guidance document is established. When the new working model or management mechanism proposed in this document completely replaces the old model recorded in the graph, a "replacement" relationship edge pointing to the node of the old model is established. Through the automatic establishment of the above-mentioned various types of relationship edges, the new knowledge node is accurately embedded into the network structure of the graph.
[0070] After detecting a new node write, the tension calculation engine calculates a cognitive tension index for the node cluster within its influence range. The cognitive tension index includes a conflict tension index, a structural fault index, and an obsolescence risk index.
[0071] After the writing of new knowledge nodes and the linking of relation edges are completed, the active evolution mechanism of the self-evolving knowledge graph is triggered. In this embodiment, the tension calculation engine embedded in the knowledge graph is awakened by the new node writing event. The engine first uses the newly written node and the newly established relation edge as seeds to delineate its influence range through a network propagation algorithm, that is, all node clusters in the graph that are reachable from the new node by one or more hops. Subsequently, for the node clusters within this influence range, three types of cognitive tension indices are calculated one by one. First, the conflict tension index is calculated, which comprehensively considers the number of "conflicting" relation edges within the influence range, the authority level of conflicting nodes, and the degree of semantic opposition of the core concepts involved in the conflict, and is used to quantify the degree of inconsistency of knowledge in this area. Second, the structural fault index is calculated, which analyzes the spanning tree structure of node clusters in a specific policy domain to detect whether there are missing lower-level nodes at the necessary granularity level (such as only having macro principles without operational details), and is used to assess the integrity of the cognitive system. Third, calculate the obsolescence risk index, which focuses on the old regulations or policy nodes that are pointed to by the "replacement" relationship edge of the new node. It traces the frequency and importance of these nodes in the graph that are still relied upon by other argumentation context nodes through "citation" relationships, and is used to quantify the systemic compliance risks caused by the continued existence of old knowledge.
[0072] When any cognitive tension index exceeds its corresponding dynamic threshold, the proactive evolution triggering unit generates maintenance suggestions or compliance risk alerts and triggers a reassessment process for the affected superior argumentation nodes.
[0073] After a comprehensive scan and index calculation by the tension calculation engine, this embodiment executes the final decision-making and response operations for evolution. Specifically, the proactive evolution triggering unit maintains a dynamic threshold system corresponding to each cognitive tension index. These thresholds can be configured according to the organization's risk preferences and knowledge management strategies. The triggering unit monitors the three types of tension indices of all nodes within its influence range in real time. Once it detects that the conflict tension index, structural fault index, or obsolescence risk index of any node exceeds its corresponding dynamic threshold limit, the response process is immediately activated. For areas where conflict tension exceeds the limit, a knowledge maintenance suggestion work order is automatically generated, detailing the node information of both conflicting parties, a summary of the conflict content, and recommended resolution solutions (such as organizing expert review or marking for revision), and is pushed to the task queue of knowledge management personnel. For areas where structural faults exceed the limit, a system improvement suggestion is generated, indicating the types of missing knowledge nodes and their expected positions in the knowledge tree. For areas where outdated risks exceed the limits, a high-priority compliance risk alert is generated, clearly identifying several historical documents that may pose compliance risks due to the repeal or updating of specific regulations. These affected superior-level argumentation nodes are then forcibly marked as "requiring reassessment," preventing their direct reuse in future writing tasks until manual review is completed. Through this closed-loop mechanism, the knowledge graph evolves towards greater self-consistency, completeness, and dynamism after each use.
[0074] This invention transcends the text generation scope of existing official document writing tools, proposing an intelligent writing paradigm centered on organizational cognitive construction and evolution. Its advantages are concentrated in the following aspects: In the dimension of knowledge reuse, through the transplantation of argumentative contexts, it achieves the understanding and cross-contextual transfer of the logical structure of argumentation in historical official documents, breaking through the superficial limitations of traditional text fragment retrieval. This allows the organization's argumentative wisdom to be continuously reused in policy context changes, improving the quality of the starting point of writing and the efficiency of conception. In the dimension of content quality, a generative adversarial reasoning network composed of argumentation, questioning, and arbitration introduces a debate mechanism into the official document generation process. Before output, the logic of the arguments undergoes multiple rounds of attack and defense testing and synthesis, effectively avoiding hidden logical defects such as causal reversal and overgeneralization, ensuring that the generated official documents possess rigorousness and robustness that can withstand scrutiny. In the dimension of knowledge management, the self-evolving knowledge graph driven by cognitive tension endows the knowledge base with an active sense of life, capable of autonomously detecting conflicts, gaps, and outdated risks in the knowledge system, and driving continuous self-consistency and evolution, reversing the trend of inertial entropy increase in traditional knowledge bases. This invention provides not only a writing aid tool, but also an intelligent infrastructure that promotes the continuous accumulation, iteration and evolution of organizational cognition, possessing both significant technological innovation and broad practical value.
[0075] The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the specific details in the above embodiments. Within the scope of the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all fall within the protection scope of the present invention.
Claims
1. A document writing method based on cognitive externalization and evolutionary intelligent agents, characterized in that, include: Based on the user's initial writing intent, deep semantic analysis and contextual element extraction are performed to obtain the initial task context vector; The historical argument framework is extracted from the self-evolving knowledge graph. Based on the initial task context vector, the historical argument framework is adapted and transplanted across contexts to form a transplanted argument framework structure. The transplanted argumentation framework is input into a generative adversarial reasoning network consisting of argumentation agents, questioning agents, and arbitration and synthesis agents, and multiple rounds of dynamic adversarial logical deduction are carried out to generate a logic tree that has been refuted and argued. The logic tree and user decision preferences are used as new knowledge nodes and written back to the cognitive tension-driven self-evolving knowledge graph, triggering cognitive tension calculation and driving the graph's self-evolution.
2. The method according to claim 1, characterized in that, Cross-context adaptation and transplantation of the historical argumentation framework, including: Extract the first context parameter set from the initial task context vector. The first context parameter set includes the issuing entity, policy field, administrative level and geographical scope. Retrieve candidate context nodes from the self-evolving knowledge graph, obtain context parameters of the original successful applications associated with the candidate context nodes, and form a second context parameter set; Input the first and second context parameter sets into the context transfer adaptation model, calculate the difference measurement vectors in the time dimension, region dimension, and hierarchy dimension, and generate the context mapping function; By applying the context mapping function, the abstract argument nodes in the argument skeleton of the candidate context nodes are replaced and the relationships are redirected node by node to obtain a ported argument skeleton structure adapted to the current task.
3. The method according to claim 2, characterized in that, The initial task context vector is obtained, including: By using the front-end interface of the logical deduction visualization interactive canvas, multimodal intent data of user input is collected, including text commands, voice data, and background material data; The speech data is processed by streaming speech recognition to obtain speech-to-text; background material data is processed by OCR recognition and document structure parsing to extract key text information; the speech-to-text and key text information are aligned and fused to obtain a fused text sequence of user intent. The model for understanding intent by integrating text sequence input is subjected to deep semantic parsing to identify core verbs of intent and target entities, extract a set of constraints, and construct an initial set of contextual parameters based on the issuing entity, policy field, administrative level, and geographical scope. The initial task context vector is generated by integrating the core verb of intent, target entity, set of constraints, and initial context parameter set.
4. The method according to claim 2, characterized in that, Retrieve candidate lineage nodes from the self-evolutionary knowledge graph, including: The core verbs of intent, target entities, and policy domain fields in the initial task context vector are combined into a query intent graph representation; Calculate the topological similarity and semantic similarity between the query intent graph representation and all argument context type nodes in the self-evolving knowledge graph; Based on the weighted fusion results of topological similarity and node semantic similarity, multiple candidate context nodes are selected, and the historical argument context skeleton structure stored in each node is extracted, including the graph-like logical relationship of premises, argument chains and conclusions.
5. The method according to claim 1, characterized in that, Generate a logic tree based on the refuted arguments, including: The argumentation agent receives the transplanted argumentation skeleton structure and the initial task context vector, and generates an initial logic tree. The initial logic tree includes a main argument node and sub-argument nodes and evidence nodes to support the main argument node. The interrogating agent performs logical vulnerability detection and counterexample generation on each argument node of the initial logic tree, and generates adversarial logic branches on the initial logic tree. The adversarial logic branches contain counterexample nodes and risk markers. The arbitration and synthesis agent identifies the core disagreements between the argumentative and adversarial logic branches in the initial logic tree, and performs higher-order logic aggregation through cross-document evidence chain verification to generate new logic nodes containing comprehensive arguments. The interaction process of the argumentation agent, the interrogation agent, and the arbitration and synthesis agent is mapped in real time as a logic tree that grows dynamically on the logic deduction visualization interactive canvas. The branches generated by different agents in the logic tree are distinguished by differentiated visual attributes.
6. The method according to claim 5, characterized in that, The dynamic growth includes: Perform guiding operations on any logical node in the logic tree. The guiding operations include branch confirmation, branch pruning, depth expansion, and manual annotation. Based on the guided operation, the reasoning direction and deduction depth of subsequent intelligent agents are dynamically adjusted to generate corrected logic tree branches; When the logic tree reaches the preset robustness threshold or receives a user's generation instruction, the logic tree in the current state is determined as the final logic tree.
7. The method according to claim 6, characterized in that, After obtaining the final logic tree, the linearization and expansion of the official document text is also included: Retrieve the selected logical branch in the final logic tree that has been confirmed or adopted by the user; According to the document type and format specifications of the target document, the tree-like logical structure of the selected logical branch is converted into a one-dimensional linear text sequence; Fill the corresponding chapter positions in the official document format template with a one-dimensional linear text sequence to generate official document text that conforms to the specifications.
8. The method according to claim 1, characterized in that, Triggering cognitive tension computation and driving the self-evolution of the graph includes: The final logic tree and user decision preferences generated during this writing process are abstracted into new argumentation context nodes and new decision preference nodes, and written into the self-evolving knowledge graph; Establish relationship edges between new argument context nodes and existing nodes in the graph. The types of relationship edges include reference, revision, conflict, refinement, and replacement. After detecting a new node write, the tension calculation engine calculates a cognitive tension index for the node cluster within its influence range. The cognitive tension index includes a conflict tension index, a structural fault index, and an obsolescence risk index. When any cognitive tension index exceeds its corresponding dynamic threshold, the proactive evolution triggering unit generates maintenance suggestions or compliance risk alerts and triggers a reassessment process for the affected superior argumentation nodes.