Text generation method and system based on artificial intelligence with real-time verifiable feedback
Patent Information
- Application Number
- CN202610514141.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-17
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而随着应用场景的复杂化、用户需求的个性化升级,现有方案仍存在共性的核心技术缺口:尚未实现深度语义理解与文本生成过程的内生耦合,缺乏对生成文本内在语义逻辑一致性、事实准确性的实时建模与验证机制,要么仅在生成后进行优化或纠错,要么仅在生成前注入知识,在生成长篇、复杂或需要多步骤推理的文本时,容易产生语义漂移、逻辑矛盾、事实错误等问题,同时在语义理解的深度、生成逻辑的动态适配性等方面也存在优化空间
1、逻辑一致性与事实准确性从根源上提升:本发明构建“生成-理解-验证”一体化闭环架构,通过动态语义状态图实现生成过程中的实时语义建模,将错误防范从“生成后纠错”转变为“生成前预防”。经测试,在生成长度超过500词的论述性文本时,内在逻辑错误率较多候选筛选方案降低40%-60%,事实性错误率降低50%以上,有效避免语义漂移、逻辑矛盾、事实幻觉等问题。
Smart Images

Figure CN123013937A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to the interdisciplinary field of natural language processing and text generation, and particularly to a text generation method and system based on artificial intelligence with real-time verifiable feedback. Background Technology
[0002] Intelligent text generation is one of the core technologies in the fields of Natural Language Processing (NLP) and Artificial Intelligence (AI). Its goal is to automatically generate coherent, reasonable, and relevant text content based on given inputs (such as prompts, data, and knowledge). With the breakthrough development of deep learning, especially the Large Language Model (LLM) based on the Transformer architecture, text generation technology has made significant progress in terms of versatility, fluency, and diversity. Current technologies mainly revolve around LLM, Retrieval-Enhanced Generation (RAG), multimodal fusion, and feedback loop optimization. Industry and academia have developed various technical approaches to improve the quality, efficiency, and application value of generated text.
[0003] However, with the increasing complexity of application scenarios and the personalized upgrading of user needs, existing solutions still have common core technical gaps: they have not yet achieved the intrinsic coupling between deep semantic understanding and text generation process, and lack a real-time modeling and verification mechanism for the consistency of the inherent semantic logic and the accuracy of facts in the generated text. They either only optimize or correct after generation, or only inject knowledge before generation. When generating long, complex texts or texts that require multi-step reasoning, they are prone to problems such as semantic drift, logical contradictions, and factual errors. At the same time, there is room for optimization in terms of the depth of semantic understanding and the dynamic adaptability of generation logic.
[0004] To address the aforementioned issues, there is an urgent need to develop a text generation method that can provide real-time verification feedback based on artificial intelligence. Summary of the Invention
[0005] In view of the above problems, this disclosure provides an AI-based text generation method and system with real-time verifiable feedback that overcomes or at least partially solves the above problems. This technology can be widely applied to sub-scenarios such as intelligent writing, professional document generation, and multi-scenario adaptive text creation. It is suitable for AI application scenarios that require accurate semantic alignment, dynamic demand adaptation, logical fact consistency assurance, and high-quality text output.
[0006] The objective of this invention can be achieved through the following technical solutions: A first aspect of the present invention provides a text generation method based on artificial intelligence with real-time verifiable feedback, comprising: The user input is subjected to three-dimensional semantic analysis of explicit needs, implicit intentions and contextual features to obtain the three-dimensional semantic analysis results; Based on the three-dimensional semantic parsing results and the generated context of the text generation channel, a dynamic semantic state graph is constructed and updated in real time. Based on the text generation channel and the semantic understanding verification channel, text generation and semantic understanding verification are performed in parallel. The text generation channel generates candidate content based on a demand-layering strategy; The semantic understanding verification channel, based on the dynamic semantic state diagram, performs dual verification of logical consistency and factual conformity on the candidate generated content, and generates a comprehensive semantic risk score and a differentiable guidance signal. The probability distribution of the generation model is adjusted based on the differentiable guiding signal, and the final text is selected and output.
[0007] Furthermore, the three-dimensional semantic parsing includes: The BERT-based semantic coding model is used to extract core keywords and explicit demand instructions from user input to determine the type of explicit demand. Explicit demand keywords are mapped to nodes in a multi-domain knowledge graph, and implicit intentions are mined through multi-hop reasoning and attention mechanisms. Extract contextual keywords, tone features, and length constraints from user input text to construct a contextual feature model; A standardized association matrix of the explicit requirements, implicit intentions, and contextual features is constructed and output as the result of three-dimensional semantic parsing.
[0008] Furthermore, the construction and real-time updating of the dynamic semantic state graph includes: Based on the core entities, concepts, and relationships in the 3D semantic parsing results, initialize the nodes and edges of the dynamic semantic state graph; Wherein, the node vector is represented as , The edge vector is represented as ; Incremental semantic parsing is performed on the generated text to extract new entities, relationships, and events; A graph attention network is used to maintain a dynamic semantic state graph, and node vectors are updated based on message passing formulas through a local subgraph incremental update mechanism. The message passing formula is expressed as follows: .
[0009] Furthermore, the dual verification of logical consistency and factual conformity includes: Obtain the candidate word set predicted by the text generation channel and its original generation probability; A pre-trained multilayer perceptron classifier is used as the logical consistency evaluator. The target subgraph aggregation vector of the dynamic semantic state graph and the semantic embedding of candidate content are used as inputs to the logical consistency evaluator, and the logical consistency score is output. ; Output a fact-verification score through internal fact-checking and lightweight external searches. ; A weighted fusion algorithm is used to calculate the comprehensive semantic risk score: ; Based on the generation probability formula, the comprehensive semantic risk score is transformed into a differentiable guiding signal by adjusting the output of the Logits layer of the generation model; the generation probability formula is expressed as: .
[0010] Furthermore, the training data for the logical consistency evaluator is constructed by pairing logically positive samples with logically negative samples. The logically positive samples are logically consistent sentence pairs, and the logically negative samples are generated through entity substitution or attribute conflict injection. The training data used for the verification and evaluation of factual conformity includes: positive fact samples and negative fact samples; the positive fact samples are statements consistent with the factual knowledge base, and the negative fact samples are generated through entity substitution or data tampering.
[0011] Furthermore, the demand stratification strategy includes: Based on the results of three-dimensional semantic parsing, the requirements are divided into a core layer, an adaptation layer, and a constraint layer, forming a hierarchical requirement structure. Based on the hierarchical requirement structure, the corresponding core layer reinforcement strategy, adaptation layer fusion strategy and constraint layer adaptation strategy are matched from the generation strategy library. The matched hierarchical generation strategy is transformed into initial prompt words and input into a pre-trained large language model; When the received real-time verification feedback signal indicates that the overall score of the candidate content is lower than the threshold, the generation strategy is dynamically adjusted.
[0012] Furthermore, it also includes dynamic scene adaptation, specifically including: The target scene is automatically identified by calculating the similarity between the contextual features of the user input and the predefined scenes in the scene feature library. Based on the identified target scene, the exclusive generation strategy in the scene-strategy mapping table is invoked to adjust the strategy of the text generation channel; Based on the identified target scene, switch to the corresponding dedicated verification standard and adjust the verification evaluation standard of the semantic understanding verification channel.
[0013] Furthermore, it also includes feedback iteration, specifically including: Collect user feedback data on the final output text, including satisfaction ratings, error annotations, and scene effect data; Based on feedback data, update the user preference database, scenario feature database, fact knowledge base, and multi-domain knowledge graph; The model and algorithm are fine-tuned regularly based on updated data.
[0014] A second aspect of the present invention provides a text generation system based on artificial intelligence with real-time verification feedback, comprising: The data support layer is used to store and provide general corpora, domain knowledge graphs, scene features, user preferences, and factual knowledge; The three-dimensional semantic parsing module is used to perform three-dimensional semantic parsing of user input, including explicit needs, implicit intentions, and contextual features, and output the three-dimensional semantic parsing results. The dynamic semantic state graph construction module is used to construct and update the dynamic semantic state graph in real time based on the three-dimensional semantic parsing results and the generated text content. The real-time verification and evaluation module is used to perform dual verification of logical consistency and factual conformity of the candidate generated content output by the text generation channel based on the dynamic semantic state diagram, and generate a comprehensive semantic risk score and a differentiable guidance signal. The flexible generation strategy module is used to perform demand layering based on the three-dimensional semantic parsing results, formulate generation strategies, and construct initial prompt words. A pre-trained large language model is used to generate candidate content based on the initial prompt words, and adjust its output probability distribution according to the differentiable guidance signal fed back by the real-time verification and evaluation module. The dynamic scene adaptation module is used to automatically identify the target scene and dynamically adjust the generation strategy of the flexible generation strategy module and the verification criteria of the real-time verification and evaluation module.
[0015] A third aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the real-time verifiable feedback text generation method based on artificial intelligence as described in the first aspect.
[0016] The technical solution proposed in this application can bring the following beneficial effects: 1. Improved Logical Consistency and Factual Accuracy from the Root: This invention constructs an integrated closed-loop architecture of "generation-understanding-verification," achieving real-time semantic modeling during the generation process through dynamic semantic state graphs, transforming error prevention from "post-generation error correction" to "pre-generation prevention." Testing shows that when generating argumentative texts exceeding 500 words, the inherent logical error rate is reduced by 40%-60% compared to other candidate selection schemes, and the factual error rate is reduced by more than 50%, effectively avoiding problems such as semantic drift, logical contradictions, and factual illusions.
[0017] 2. Significantly improved accuracy and comprehensiveness of semantic understanding: This invention uses the three-dimensional semantic analysis results of "explicit needs - implicit intentions - contextual features" as the pre-input of the dynamic semantic state diagram, realizing multi-dimensional semantic capture from surface keywords to deep intentions. The degree of fit of need understanding is improved by more than 40% compared with traditional external knowledge guidance schemes, providing an accurate and comprehensive semantic foundation for dynamic semantic modeling and generation strategy formulation.
[0018] 3. Significantly enhanced adaptability to complex requirements: This invention integrates a requirement layering strategy into the initial prompt word construction of the text generation channel, realizing differentiated generation strategy matching of "core layer - adaptation layer - constraint layer". The requirement coverage of the generated text reaches more than 95%, which can meet the complex requirements of cross-dimensional and multi-constraint without manual intervention, significantly reducing the usage threshold in complex scenarios.
[0019] 4. Improved flexibility and efficiency in scene adaptation: This invention achieves real-time adaptation to 18 mainstream scenes through automatic scene feature recognition and dynamic mapping of dual-channel strategies / standards. The scene migration adaptation efficiency is improved by more than 60% compared with traditional domain corpus fine-tuning solutions. It also supports automatic adaptation for cross-scene composite needs and can be extended to new application scenarios without additional development.
[0020] 5. Excellent practicality and reproducibility: This invention clarifies the mathematical expression of the dynamic semantic state graph, the GNN message passing formula, and the incremental update rules. It details the training data construction method and differentiable interface implementation of the verification and evaluation module, and provides complete implementation examples for multiple scenarios, ensuring that those skilled in the art can reproduce it without creative effort. It adopts a lightweight model architecture (based on LLaMA-7B fine-tuning), which improves the generation response speed by 25% compared to the traditional large model + post-generation processing scheme, balancing generation quality and efficiency.
[0021] 6. Excellent scalability and interpretability: The dynamic semantic state graph structure of this invention facilitates access to richer knowledge sources. Each module is modularly designed and can be optimized or replaced individually according to application requirements. The dynamic semantic state graph itself provides a structured semantic summary of the generated text. The visualized graph can partially reveal the "internal basis" of the model's generation of specific content, providing a valuable tool for understanding the model's decision-making process and debugging generation errors.
[0022] The above description is merely an overview of the technical solution disclosed herein. In order to better understand the technical means of this disclosure and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this disclosure more apparent and understandable, specific embodiments of this disclosure are described below. Attached Figure Description
[0023] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this disclosure. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a flowchart of the steps of the AI-based text generation method with real-time verifiable feedback provided in the embodiments of this specification; Figure 2 This is a schematic diagram of the structure of the AI-based text generation system with real-time verification feedback provided in the embodiments of this specification. Detailed Implementation
[0024] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art. The technical solutions provided by various embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0025] This application provides a text generation method and system based on artificial intelligence that can provide real-time verification feedback.
[0026] Although existing text generation technologies have developed solutions in areas such as multi-candidate optimization, feedback loops, knowledge enhancement, and post-generation processing, the following technical problems remain unresolved, especially given the core requirement of ensuring real-time consistency between semantic logic and facts during the generation process. These problems are interconnected, forming a complex challenge for technical solutions: 1. Lack of Semantic Verification in the Generation Process: Existing solutions generally lack a mechanism for real-time, dynamic modeling of the semantic state of generated content during word-by-word text generation, and for providing immediate guidance and constraints to subsequent generation. They often rely on post-generation filtering and correction or pre-generation knowledge injection, leading to models easily forgetting previous settings, violating established logical relationships, or introducing details that contradict the overall narrative when generating long texts. The consistency between deep semantic logic and facts is difficult to guarantee. The core reason is the lack of a semantic verification architecture that runs parallel to the generation process, making it impossible to intercept risks "in progress." 2. The superficiality and singularity of semantic understanding: Existing solutions mostly rely on keyword matching, phrase-level semantic features, or fixed knowledge graphs for semantic capture, failing to achieve multi-dimensional semantic understanding of user needs, including "deep intent analysis + dynamic context adaptation + accurate extraction of explicit needs." By depending on static feature extraction, and without establishing a dynamic association mechanism between demand intent and context, scene, and user preferences, the generated semantic information does not adequately match the user's actual needs, and cannot provide accurate and comprehensive input for semantic verification during the generation process. 3. Rigidity of Generation Logic and Insufficient Adaptation to Requirements: Existing solutions often employ a generation process based on "fixed rules + single-dimensional optimization," lacking the ability to "layer-by-layer decomposition + dynamic adjustment" for complex requirements. This makes them unsuitable for complex requirements across scenarios and multiple dimensions (such as text generation that simultaneously demands professional accuracy and accessible expression). The generation logic is disconnected from the requirement structure, failing to establish a flexible generation framework of "requirement layering - strategy matching - dynamic iteration," resulting in poor initial text quality and increasing the cost of subsequent verification and optimization. 4. The problem of passive and inflexible scene adaptation: Existing domain adaptation solutions mostly achieve scene adaptation through fine-tuning of domain corpora and embedding of fixed rules. They cannot proactively perceive scene changes and dynamically adjust generation strategies and verification standards, resulting in low adaptation efficiency and poor flexibility. The core reason is the lack of an automatic recognition and generation strategy for scene features and a dynamic mapping mechanism for verification. This leads to a mismatch between semantic verification standards and generation requirements when facing scene migration or scene complexity, resulting in insufficient scene adaptability of the final output text. Solving the above problems faces three core challenges: First, how to design a semantic verification architecture that runs parallel to the text generation channel, construct a dynamic semantic representation model, clarify its mathematical expression and update mechanism, and achieve real-time semantic modeling and proactive risk interception during the generation process; second, how to establish a multi-dimensional semantic association model of "explicit needs - implicit intentions - contextual features" to achieve accurate capture from surface features to deep semantics, providing high-quality input for dynamic semantic modeling; and third, how to combine the flexible generation logic of demand layering with the real-time semantic verification mechanism, clarify the training method of the verification evaluation module and the adaptation rules of the generation strategy, achieve dynamic adaptation between the generation strategy and the verification standard, and maintain global semantic consistency. Existing technologies, due to their limitations in "separation of generation and verification," "static semantic extraction," and "rigid generation logic," and the lack of sufficient disclosure, cannot simultaneously solve the above problems, resulting in the text generation accuracy, logical consistency, and scenario adaptability failing to meet the actual needs of complex scenarios.
[0027] Example 1 like Figure 1 The diagram shows a flowchart of a text generation method with real-time verifiable feedback based on artificial intelligence. A first aspect of the present invention provides a text generation method with real-time verifiable feedback based on artificial intelligence, comprising: S101. Perform three-dimensional semantic analysis on the user input, considering explicit needs, implicit intentions, and contextual features, to obtain the three-dimensional semantic analysis results. S102. Based on the three-dimensional semantic parsing results and the generated context of the text generation channel, construct and update the dynamic semantic state diagram in real time; S103. Based on the text generation channel and the semantic understanding verification channel, execute text generation and semantic understanding verification in parallel; S104. The text generation channel generates candidate content based on a demand-layering strategy. S105. The semantic understanding verification channel performs dual verification of logical consistency and factual conformity on the candidate generated content based on the dynamic semantic state diagram, and generates a comprehensive semantic risk score and a differentiable guidance signal. S106. Adjust the probability distribution of the generation model based on the differentiable guiding signal, select and output the final text.
[0028] Addressing the shortcomings of existing text generation technologies, such as lack of semantic verification during the generation process, superficial semantic understanding, rigid generation logic, passive scenario adaptation, and insufficient disclosure, the core objective of this invention is to construct a full-process technical framework encompassing "multi-dimensional semantic parsing - dynamic semantic state modeling - real-time verification feedback - flexible generation adaptation." Through an integrated closed-loop architecture of "generation-understanding-verification," a dynamic semantic state graph is constructed and maintained in parallel during text generation (clarifying its mathematical expression and update mechanism). This enables real-time semantic modeling and logical and factual verification of the generated content, shifting error prevention from "post-generation correction" to "pre-generation prevention." Simultaneously, it utilizes a three-dimensional semantic framework of "explicit needs - implicit intentions - contextual features." The parsing results serve as the pre-input of the dynamic semantic state graph, ensuring the accuracy of semantic modeling. A demand-layering strategy is integrated into the initial prompt word construction of the text generation channel, improving the demand adaptability of the initial text generation. The training data construction method and differentiable interface implementation of the verification and evaluation module are clearly defined, and complete implementation examples for multiple scenarios are provided to ensure the technical solution is fully disclosed and reproducible. Furthermore, dynamic mapping between the generation strategy and verification standards is achieved through automatic scene feature recognition, ultimately outputting high-quality text that is logically rigorous, factually accurate, and highly consistent with user needs and scene characteristics. This overcomes the limitations of existing technologies in terms of logical consistency, factual accuracy, precision, and adaptability, improving the practicality and reliability of text generation technology in complex real-world scenarios.
[0029] like Figure 2 The diagram shown is a structural schematic of a text generation system with real-time verifiable feedback based on artificial intelligence. A second aspect of the present invention provides a text generation system 200 with real-time verifiable feedback based on artificial intelligence, comprising: The data support layer 201 is used to store and provide general corpora, domain knowledge graphs, scene features, user preferences, and factual knowledge; The three-dimensional semantic parsing module 202 is used to perform three-dimensional semantic parsing of user input, including explicit needs, implicit intentions, and contextual features, and output the three-dimensional semantic parsing results. The dynamic semantic state graph construction module 203 is used to construct and update the dynamic semantic state graph in real time based on the three-dimensional semantic parsing results and the generated text content. The real-time verification and evaluation module 204 is used to perform dual verification of logical consistency and factual conformity of the candidate generated content output by the text generation channel based on the dynamic semantic state diagram, and generate a comprehensive semantic risk score and a differentiable guidance signal. The flexible generation strategy module 205 is used to perform demand layering based on the three-dimensional semantic parsing results, formulate generation strategies, and construct initial prompt words. A pre-trained large language model 206 is used to generate candidate content based on the initial prompt words and adjust its output probability distribution according to the differentiable guidance signal fed back by the real-time verification and evaluation module. The dynamic scene adaptation module 207 is used to automatically identify the target scene and dynamically adjust the generation strategy of the flexible generation strategy module and the verification standard of the real-time verification and evaluation module.
[0030] To achieve the objective of the method described in the first aspect of this embodiment, the present invention adopts a technical solution of "dual-channel parallelism + multi-module collaboration + full-process closed loop." The core is the parallel collaborative work of the text generation channel and the semantic understanding verification channel. Through the linkage of the three-dimensional semantic parsing module, the dynamic semantic state graph construction module, the real-time verification and evaluation module, the flexible generation strategy module, and the dynamic scene adaptation module, combined with a user feedback iteration mechanism, the core pain points of existing technologies are addressed. The technical architecture of the present invention consists of five core functional modules, a data support layer, and two parallel channels. The modules form a closed loop through bidirectional data flow and feedback iteration. The overall architecture is as follows: Data support layer: includes a general corpus, a multi-domain knowledge graph (dynamically updated), a scene feature library, a user preference database, and a fact knowledge base, providing full-dimensional data input for the five core functional modules and two parallel channels; Two parallel channels, including: Text generation channel: Based on a pre-trained large language model, it integrates a flexible generation strategy module and is responsible for generating initial text based on the three-dimensional semantic parsing results and real-time verification feedback signals. It also optimizes the text based on the verification results and scene adaptation requirements, and outputs the final text. Semantic understanding verification channel: This is the core innovative channel of the present invention. It integrates a three-dimensional semantic parsing module, a dynamic semantic state graph construction module, and a real-time verification and evaluation module. It runs in parallel with the text generation channel and is responsible for performing multi-dimensional semantic parsing on user input, providing pre-input for the dynamic semantic state graph, updating the dynamic semantic state graph in real time during the text generation process, performing logical and factual verification on the generated candidate content, and generating guiding / constraining signals to be fed back to the text generation channel. It also includes five core functional modules, specifically: The 3D semantic parsing module serves as a pre-processing unit for the semantic understanding verification channel. It outputs the 3D semantic parsing results of "explicit needs - implicit intentions - contextual features", providing a basis for the construction of dynamic semantic state graphs and the formulation of flexible generation strategies. Dynamic semantic state graph construction module: Based on the three-dimensional semantic parsing results and the generated content of the text generation channel, it constructs and updates the dynamic semantic state graph in real time, which serves as the core basis for semantic verification, and clarifies its node / edge representation method and incremental update mechanism; Real-time verification and evaluation module: Based on the dynamic semantic state graph, it verifies the logical consistency and factual conformity of the candidate generated content of the text generation channel, clarifies the training data construction method of the verification and evaluation module, and generates a comprehensive semantic risk score and guidance / constraint signals; Flexible generation strategy module: It integrates a text generation channel, performs requirement layering based on the three-dimensional semantic parsing results, formulates differentiated generation strategies and constructs initial prompt words, and adjusts the generation strategy according to real-time verification feedback signals; Dynamic Scene Adaptation Module: It spans two parallel channels to automatically identify scene features and dynamically adjusts the flexible generation strategy and real-time verification evaluation criteria to ensure the scene adaptability of the text.
[0031] The operational relationships between the modules and channels are as follows: Data support layer → 3D semantic parsing module → Dynamic semantic state graph construction module + flexible generation strategy module → Semantic understanding verification channel + text generation channel working in parallel (real-time verification and evaluation → dynamic adjustment of generation strategy) → Dynamic scene adaptation module → Output the final text, while receiving user feedback → The data support layer forms an iterative closed loop to ensure the dynamic optimization of the technical solution.
[0032] Furthermore, the three-dimensional semantic parsing includes: The BERT-based semantic coding model is used to extract core keywords and explicit demand instructions from user input to determine the type of explicit demand. Explicit demand keywords are mapped to nodes in a multi-domain knowledge graph, and implicit intentions are mined through multi-hop reasoning and attention mechanisms. Extract contextual keywords, tone features, and length constraints from user input text to construct a contextual feature model; A standardized association matrix of the explicit requirements, implicit intentions, and contextual features is constructed and output as the result of three-dimensional semantic parsing.
[0033] The three-dimensional semantic parsing module enables multi-dimensional deep semantic capture, providing accurate semantic input for the overall solution. This module addresses the issues of superficial semantic understanding and single-dimensionality through "three-level semantic parsing + multi-dimensional association modeling," providing a comprehensive and accurate semantic foundation for constructing dynamic semantic state graphs. It also provides a basis for formulating flexible generation strategies. Specific implementation steps are as follows: Level 1: Explicit Requirement Extraction: Using an improved semantic coding model based on BERT, the user input text is segmented, part-of-speech tagging is performed, and syntactic analysis is conducted to extract core keywords, key phrases, and explicit requirement instructions (such as "professional document" and "popular expression"). A requirement type identification rule base is constructed (including 12 common types such as text generation, summarization, and question answering). The user's explicit requirement type is determined by keyword matching and semantic similarity calculation (cosine similarity threshold is set to 0.85).
[0034] Level 2: Implicit Intent Mining: Introducing an intent association network, supported by a multi-domain knowledge graph, mapping explicit demand keywords to knowledge graph nodes, and mining potential intents associated with nodes through multi-hop reasoning (maximum number of hops set to 3); using an attention mechanism to calculate the weight of potential intents (based on the association strength between intent and explicit demand, and historical matching degree in the user preference database), and selecting the top 3 core implicit intents.
[0035] Level 3: Contextual Feature Modeling: Extract contextual features from user input text, including scene keywords (such as "academic" and "marketing"), tone features (formal / colloquial), length constraints, target audience, etc.; construct an association matrix of "explicit needs - implicit intentions - contextual features", quantify the association strength of the three through matrix factorization (SVD) algorithm, and output standardized three-dimensional semantic parsing results (format: {explicit needs: [], implicit intentions: [(meaning...)}). Figure 1 , weight 1), ...], contextual features: []}).
[0036] Furthermore, the construction and real-time updating of the dynamic semantic state graph includes: Based on the core entities, concepts, and relationships in the 3D semantic parsing results, initialize the nodes and edges of the dynamic semantic state graph; Wherein, the node vector is represented as , The edge vector is represented as ; Incremental semantic parsing is performed on the generated text to extract new entities, relationships, and events; A graph attention network is used to maintain a dynamic semantic state graph, and node vectors are updated based on message passing formulas through a local subgraph incremental update mechanism. The message passing formula is expressed as follows: .
[0037] The dynamic semantic state graph construction module is the core module of the semantic understanding verification channel. Based on the 3D semantic parsing results and the generated context from the text generation channel, it constructs and updates the dynamic semantic state graph in real time through incremental semantic parsing and graph neural network maintenance. It clarifies the vector representation of nodes / edges, the GNN message passing formula, and the incremental update rules, achieving structured and vectorized semantic modeling of the generated content. Specific implementation steps include: Dynamic semantic state graph initialization: Based on the results of three-dimensional semantic parsing, the core keywords of explicit needs, the core entities / concepts in implicit intentions and contextual features are used as initial nodes, and the relationships between the elements are used as initial edges to construct the initial structure of the dynamic semantic state graph.
[0038] Node vector representation: ,in Pre-trained word embeddings for entities / concepts (based on BERT-base-uncased, 768 dimensions). The node attribute feature vector (such as entity type, intent weight, etc., with a dimension of 256) is represented by ⊕, which indicates vector concatenation. The final node vector has a dimension of 1024.
[0039] Edge vector representation: ,in Embedding for relation types (trained based on TransE, dimension 512). The relation confidence (0-1 standardized, dimension 1) results in a final edge vector dimension of 513.
[0040] Incremental semantic parsing: Employing a lightweight, neural network-based named entity recognition, relation extraction, and event extraction model, this method performs real-time parsing of each new word / sentence generated in the text generation channel, extracting newly added entities. ,property ,relation and events .
[0041] Dynamic semantic state graph update: A graph attention network (GAT, with 3 layers and 8 heads) is used to maintain and update the dynamic semantic state graph. A local subgraph incremental update mechanism is adopted (only the 1-hop neighborhood subgraph of newly added nodes is updated) to avoid the efficiency loss caused by recalculating the entire graph.
[0042] GNN message passing formula: ,in Let v be the set of 1-hop neighborhood nodes. σ represents the attention weights (calculated via the attention mechanism of GAT), W is the learnable weight matrix (1024×1024 dimensions), and σ is the activation function (GELU).
[0043] The state transition formula is expressed as: ; in, ; ; in , Let be the node set and edge set at time t, respectively. , These are the node vector set and edge vector set at time t+1, respectively.
[0044] Furthermore, the dual verification of logical consistency and factual conformity includes: Obtain the candidate word set predicted by the text generation channel and its original generation probability; A pre-trained multilayer perceptron classifier is used as the logical consistency evaluator. The target subgraph aggregation vector of the dynamic semantic state graph and the semantic embedding of candidate content are used as inputs to the logical consistency evaluator, and the logical consistency score is output. ; Output a fact-verification score through internal fact-checking and lightweight external searches. ; A weighted fusion algorithm is used to calculate the comprehensive semantic risk score: ; Based on the generation probability formula, the comprehensive semantic risk score is transformed into a differentiable guiding signal by adjusting the output of the Logits layer of the generation model; the generation probability formula is expressed as: .
[0045] Furthermore, the training data for the logical consistency evaluator is constructed by pairing logically positive samples with logically negative samples. The logically positive samples are logically consistent sentence pairs, and the logically negative samples are generated through entity substitution or attribute conflict injection. The training data used for the verification and evaluation of factual conformity includes: positive fact samples and negative fact samples; the positive fact samples are statements consistent with the factual knowledge base, and the negative fact samples are generated through entity substitution or data tampering.
[0046] This step, based on a dynamic semantic state diagram, performs dual verification of logical consistency and factual conformity before outputting candidate content in the text generation channel. It generates a comprehensive semantic risk score and feeds it back to the text generation channel, achieving proactive risk interception before generation. This module clarifies the training data construction method, comprehensive score calculation rules, and differentiable guidance signal implementation method for the verification and evaluation module, based on a dynamic semantic state diagram. It generates a comprehensive semantic risk score and feeds it back to the text generation channel, addressing the issues of missing and insufficiently disclosed semantic verification during the generation process. Specific implementation steps: Candidate content acquisition: Real-time reception of the next word / phrase candidate set predicted by the text generation channel based on the current context. and the original generation probability of each candidate. .
[0047] Construction of training data for the validation and evaluation module: Training data for the logical consistency evaluator: The data is constructed using pairs of positive and negative samples. Positive samples are logically consistent sentence pairs (e.g., "The mobile phone is priced at 5,000 yuan" + "The mobile phone is positioned in the high-end market"). Negative samples are generated through "entity substitution" and "attribute conflict injection" (e.g., "The mobile phone is priced at 5,000 yuan" + "The mobile phone is positioned in the entry-level market"). The ratio of positive to negative samples is 1:1.5, and the total number of samples is 100,000 pairs.
[0048] The training data for the factual conformity verification and evaluation module consists of positive samples that are consistent with the factual knowledge base (e.g., "IBM demonstrated a 1,000-qubit processor in 2023") and negative samples generated through "entity substitution" and "data tampering" (e.g., "Google released a 1,000-qubit processor in 2023"). The ratio of positive to negative samples is 1:2, and the total number of samples is 80,000.
[0049] Training process: The cross-entropy loss function is used, the batch size is set to 32, the training rounds are set to 20, and the learning rate is 1e-4.
[0050] Logical consistency evaluation: A pre-trained multilayer perceptron classifier (input dimension 2048 = 1024 × 2, hidden layer dimension 512, output dimension 1) is used as the logical consistency evaluator. Its input is the target subgraph aggregation vector of the dynamic semantic state graph. Semantic embeddings of candidate nouns / phrases obtained by aggregating the node vectors of the target subgraph using MeanPooling. (Dimension 1024), input vector is The evaluator outputs a logic consistency score. The lower the score, the greater the logical conflict between the candidate content and the existing dynamic semantic state diagram.
[0051] Fact conformity verification is performed: A dual-mode fact conformity verification evaluation module is used to evaluate the factual accuracy of candidate content in parallel and output a fact conformity score. The process includes: Internal fact-checking: Calculating the cosine similarity between the semantic embedding of candidate content and the fact node vectors in the dynamic semantic state graph. If the similarity is ≥0.8, it is directly judged as a match, with a score of 1.0; otherwise, it proceeds to external retrieval. Lightweight external retrieval: For candidates involving explicit entities or concepts, a rapid vector retrieval is triggered (cosine similarity threshold set to 0.8). Relevant fragments are obtained from a pre-loaded fact knowledge base, and the consistency between the candidate statement and the retrieved fragment is judged by a lightweight cross-encoder model (based on DistilBERT). The matching score is output as the result. .
[0052] Comprehensive semantic risk score and differentiable guidance signal: Comprehensive score calculation: A weighted fusion algorithm is used. A higher score indicates a lower semantic risk for the candidate content. The differentiable interface converts the comprehensive semantic risk score into a differentiable guiding signal, achieved by adjusting the output of the Logits layer of the generative model. The adjusted generation probability formula is as follows: ; in: The output is the raw Logits of the language model; λ is a parameter controlling the guiding strength, which is dynamically adjusted. ;in, is the initial value, and L is the current generated length (unit: tokens); The importance factor of candidate lemmas (calculated based on TF-IDF, ranging from [0.5, 1.5]).
[0053] Signal application: for high-risk ( Candidate words with a probability less than 0.3 are significantly reduced in probability of being selected using the above formula; for low-risk ( Candidate words with a probability greater than or equal to 0.8 are given a probability boost.
[0054] Furthermore, the demand stratification strategy includes: Based on the results of three-dimensional semantic parsing, the requirements are divided into a core layer, an adaptation layer, and a constraint layer, forming a hierarchical requirement structure. Based on the hierarchical requirement structure, the corresponding core layer reinforcement strategy, adaptation layer fusion strategy and constraint layer adaptation strategy are matched from the generation strategy library. The matched hierarchical generation strategy is transformed into initial prompt words and input into a pre-trained large language model; When the received real-time verification feedback signal indicates that the overall score of the candidate content is lower than the threshold, the generation strategy is dynamically adjusted.
[0055] This step integrates a text generation channel, performing requirement layering and dynamic strategy matching based on the results of 3D semantic parsing to construct initial prompt words. Simultaneously, it dynamically adjusts the generation strategy based on feedback signals from the real-time verification and evaluation module, addressing the issue of rigid generation logic. Specifically, this includes: Layered processing of requirements: Based on the results of three-dimensional semantic parsing, requirements are divided into a core layer (explicit requirements + high-weight implicit intentions), an adaptation layer (medium-low weight implicit intentions), and a constraint layer (contextual features + scene features), forming a layered requirement structure; a layered priority rule is defined: core layer priority > adaptation layer priority > constraint layer priority, to ensure that the generated text focuses on the core requirements.
[0056] Dynamic matching of generation strategies: A generation strategy library is constructed, containing three sub-strategies: "Core Layer Reinforcement Strategy," "Adaptation Layer Fusion Strategy," and "Constraint Layer Adaptation Strategy." The Core Layer Reinforcement Strategy uses "multi-round generation + optimal selection" (generating three candidate fragments and selecting based on semantic fit) for content corresponding to core needs. The Adaptation Layer Fusion Strategy uses "fragment embedding + semantic connection" (automatically supplementing logical connectors through a connector lexicon) for adaptation layer intents. The Constraint Layer Adaptation Strategy uses "format template matching + parameter adjustment" for context and scenario constraints (e.g., adjusting sentence complexity in academic scenarios and adjusting language persuasiveness in marketing scenarios). Based on the hierarchical requirement structure, a strategy matching algorithm (based on the mapping relationship between requirement types and strategies) outputs targeted hierarchical generation strategies.
[0057] Initial prompt word construction and generation strategy adjustment: A lightweight large language model (based on LLaMA-7B fine-tuning) is adopted, and the hierarchical generation strategy is transformed into model prompt words. Combined with the core features in the three-dimensional semantic parsing results, the initial text is generated. The length and structure of the initial text strictly follow the contextual feature requirements of the constraint layer (length error does not exceed ±10%). Feedback signals from the real-time verification and evaluation module are received in real time. If the overall score of the candidate content is generally low (average...), the system will take action. If the value is less than 0.4, the generation strategy will be adjusted, such as regenerating core layer candidate fragments or optimizing semantic connection methods, until low-risk candidate content is generated.
[0058] Furthermore, it also includes dynamic scene adaptation, specifically including: The target scene is automatically identified by calculating the similarity between the contextual features of the user input and the predefined scenes in the scene feature library. Based on the identified target scene, the exclusive generation strategy in the scene-strategy mapping table is invoked to adjust the strategy of the text generation channel; Based on the identified target scene, switch to the corresponding dedicated verification standard and adjust the verification evaluation standard of the semantic understanding verification channel.
[0059] This step spans both the text generation and semantic understanding verification channels. Through automatic scene feature recognition, it dynamically adjusts flexible generation strategies and real-time verification evaluation criteria to address the issue of passive scene adaptation. Specifically, it includes: Automatic scene feature recognition: The scene feature library contains 18 mainstream application scenarios (academic, marketing, office, medical, etc.), with 5-8 core features labeled for each scenario (e.g., academic scenario: rigorous sentence structure, professional terminology ≥30%, clear logic; marketing scenario: strong language appeal, short sentences ≥70%). Each scenario is also configured with its own verification and evaluation criteria (e.g., medical scenario prohibits absolute statements, factual verification requires matching to a medical knowledge base). A scene feature matching algorithm (Jaccard similarity, threshold set to 0.7) is used to automatically identify the target scenario by calculating the similarity between the scene keywords and contextual features in the user-input text and the scene feature library. If no specific scenario is identified, the default is "general scenario".
[0060] Dual-channel strategy and dynamic adjustment of standards: For the text generation channel, based on the identified target scenario, the dedicated generation strategy in the scenario-strategy mapping table is invoked to optimize the initial text for scenario adaptation (e.g., adding professional terms for professional scenarios and replacing professional terms with colloquial expressions for popular scenarios); For the semantic understanding verification channel, based on the identified target scenario, dedicated real-time verification evaluation standards are switched (e.g., increasing the logical consistency evaluation weight to 0.7 for academic scenarios and strengthening the external retrieval scope of factual conformity for medical scenarios, covering the knowledge base of the "Clinical Practice Guidelines") to ensure that the verification standards match the scenario requirements.
[0061] Scene-adapted text optimization: The text that has been verified in real time and initially generated is finally optimized for scene adaptation, and intermediate text that conforms to scene characteristics and verification standards is output to ensure the scene adaptability and semantic consistency of the text.
[0062] Furthermore, it also includes feedback iteration, specifically including: Collect user feedback data on the final output text, including satisfaction ratings, error annotations, and scene effect data; Based on feedback data, update the user preference database, scenario feature database, fact knowledge base, and multi-domain knowledge graph; The model and algorithm are fine-tuned regularly based on updated data.
[0063] This invention constructs a full-process user feedback iteration mechanism, which transmits user feedback data back to the data support layer, and periodically fine-tunes the models and algorithms of each module to achieve continuous optimization of the technical solution. Specific steps include: Feedback data collection: Collect user feedback data on the final text, including satisfaction ratings, modification suggestions, actual usage scenarios, logical / factual error annotations, click-through rate / conversion rate, and other scenario-based performance data.
[0064] Data support layer update: Input feedback data into the data support layer to update the user preference database (records user preferences for specific scenarios and generation styles), scenario feature database (supplements new scenario features and optimizes existing scenario feature annotations), fact knowledge base (supplements new fact information and corrects erroneous information), and multi-domain knowledge graph (dynamically updates nodes and relationships).
[0065] Model and algorithm fine-tuning: Based on updated data, the intent mining model of the 3D semantic parsing module, the strategy matching algorithm of the flexible generation strategy module, the logical consistency evaluator of the real-time verification and evaluation module, and the factual conformity verification and evaluation module are fine-tuned regularly (once a week by default). At the same time, the initial value and adjustment coefficient of the guidance strength parameter λ are dynamically optimized to improve the accuracy of semantic parsing, the adaptability of generation strategy, and the accuracy of verification and evaluation.
[0066] Dynamic semantic state graph optimization: Based on the updated knowledge graph and fact knowledge base, the weight settings of nodes and edges in the dynamic semantic state graph are optimized to improve the accuracy of semantic modeling.
[0067] A third aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the real-time verifiable feedback text generation method based on artificial intelligence as described in the first aspect.
[0068] Example 2 The impact of quantum computing on the development of artificial intelligence: essay generation (academic scenario, long text + logical reasoning requirements). This embodiment addresses the long text generation requirements in an academic scenario, demonstrating the core process of the present invention: dual-channel parallel operation, dynamic semantic state graph evolution, and real-time verification feedback. The system is deployed on a server equipped with a GPU-accelerated computing unit, and the software is implemented based on the PyTorch deep learning framework.
[0069] Data support layer initialization and model parameter configuration: Data support layer: Loading a general corpus (academic paper corpus), a knowledge graph in the fields of quantum computing and artificial intelligence, an academic scene feature library (rigorous sentence structure, professional terminology accounting for ≥30%, and clear logic), a general factual knowledge base (including factual information in the field of science and technology), and a user preference database (academic text preferences are logically coherent and factually accurate). Model parameter configuration: 3D semantic parsing module: BERT hidden layer dimension 768, cosine similarity threshold 0.85, maximum number of hops for intent mining 3; Dynamic semantic state graph construction module: GAT layer number 3, head number 8, node vector dimension 1024, edge vector dimension 513, incremental update range is 1-hop neighborhood; Real-time verification and evaluation module: The logical consistency evaluator is a multilayer perceptron (input dimension 2048), the factual conformity verification cosine similarity threshold is 0.8, and the guiding strength parameter... ; Flexible generation strategy module: LLaMA-7B fine-tuning model, learning rate 2e -5 The number of candidate fragments generated in the core layer is 3, and the coherence detection threshold is 9. Dynamic scene adaptation module: Jaccard similarity threshold 0.7, academic scene professional terminology ≥30%, long sentences ≥60%.
[0070] The specific execution steps are as follows: Step 1: User Input and Data Input The user entered the text: "Please discuss how quantum computing will affect the development of artificial intelligence, requiring rigorous logic and accurate facts, with a word count of approximately 800." The data support layer outputs corresponding data to each module (academic corpus, knowledge graph of quantum computing + AI, academic scene features, and factual information in the field of science and technology).
[0071] Step 2: 3D semantic parsing module processing: Explicit Needs Extraction: Extract core keywords such as "quantum computing", "artificial intelligence", "development impact", "logical rigor", "factual accuracy", and "800 words", and determine the need type as "academic essay generation"; Implicit Intent Mining: Through 3-hop reasoning of the knowledge graph, the core implicit intents were mined as "Analyzing the accelerating effect of quantum computing on AI model training", "Explaining the advantages of quantum computing in AI data processing", and "Looking forward to the development trend of the integration of quantum computing and AI" (weights of 0.5, 0.3, and 0.2 respectively). Contextual feature modeling: Extract contextual features such as "academic scene", "logical rigor", "accurate facts" and "approximately 800 words", and construct and output three-dimensional semantic parsing results.
[0072] Step 3: Initialize the dynamic semantic state graph: Based on the results of three-dimensional semantic parsing, “quantum computing”, “artificial intelligence”, “model training”, and “data processing” are used as initial nodes, and “impact”, “acceleration”, and “optimization” are used as initial edges to construct the initial structure of the dynamic semantic state graph, including node vectors and edge vectors.
[0073] Step 4: Dual-channel parallel operation (generation + verification) Text generation channel: The flexible generation strategy module is layered according to requirements (core layer: analyzing the acceleration effect of quantum computing on AI model training; adaptation layer: explaining the advantages of data processing + looking forward to the integration trend; constraint layer: academic scenario + 800 words + logical / factual accuracy), matching generation strategy (multi-round generation + optimal selection in the core layer), constructing an initial Prompt and inputting it into the LLaMA-7B model, the model generates a candidate word set ("quantum", "computation", "undoubtedly", "firstly", etc.) and the original Logits output; Semantic understanding verification channel: The dynamic semantic state graph construction module performs incremental semantic parsing on user input, through... The dynamic semantic state graph is updated; the real-time verification and evaluation module verifies the candidate lexical units, giving a comprehensive score of 0.95 for "quantum" and 0.7 for "undoubtedly", and generating a guiding signal. Feedback is sent to the text generation channel; The text generation channel adjusts the Logits output according to the guiding signal and calculates... Select and output "quantum", and this term will be appended to the generated text; Repeat the above process to generate the subsequent word element "Computation is a disruptive technology that can efficiently process complex data through the superposition and entanglement properties of qubits". The dynamic semantic state graph is updated in real time with the generated content, adding nodes and relationships such as "qubit", "superposition property", "entanglement property" and "data processing".
[0074] Step 5: Real-time verification feedback (logical contradiction interception) When the text generation channel generates the candidate term "classical bit" and intends to output "quantum computing is based on linear operations of classical bits": the logical consistency evaluator of the real-time verification and evaluation module, based on the current dynamic semantic state graph (including nodes such as "quantum computing uses qubits" and "qubit nonlinear computation"), inputs... The system outputs a logical consistency score of 0.1; the factual conformity verification and evaluation module confirms through external retrieval that "quantum computing and classical bits are not related by linear operations," outputting a factual conformity score of 0.05; and the overall semantic risk score is 0.6. 0.1 + 0.4 0.05 = 0.08, generating the bootstrap signal Logits. adjust =0.7 (1+0.1 5) 0.08 1.1 = 0.0308 (Current generation length L = 500, λ = 0.7) (1+0.5)=1.05), the text generation channel significantly reduces the generation probability of "classical bit", regenerates the candidate word "qubit", and outputs "quantum computing is based on nonlinear operation of qubit", thus achieving forward interception of logical contradictions.
[0075] Step 6: Dynamic scene adaptation module processing: Automatic scene feature recognition: The user input context features are calculated to have a Jaccard similarity of 0.85 > 0.7 with the scene feature library, and are identified as "academic scene". Dual-channel adjustment: Invoking academic scenario-specific generation strategies (supplementing professional terminology and increasing the proportion of long sentences) and verification standards (increasing the weight of logical consistency assessment to 0.7). Scene adaptation optimization: The generated text is supplemented with professional terminology (such as "quantum gate" and "tensor computation") and logical connectors are optimized (such as "in addition", "therefore", and "in summary") to ensure that it conforms to the characteristics of academic scenarios.
[0076] Step 7: Final text output and feedback iteration: Output an academic essay of approximately 800 words, with rigorous logic and accurate facts; user feedback indicates that the text contains no logical or factual errors and that all cited factual information is accurate. This feedback data is sent back to the data support layer to update the user preference database (academic texts tend to prefer this generation style), and the model parameters are fine-tuned periodically.
[0077] Implementation effectiveness verification: The academic papers generated in this embodiment have been professionally evaluated, and the core indicators are as follows: Logical consistency: No logical contradictions, complete logical chain, professional assessment score of 9.2 out of 10. Factual accuracy: All factual information is consistent with reliable sources, with no factual errors, and the factual accuracy rate is 100%; Needs matching degree: 98% (all explicit needs and implicit intentions are covered); Scene adaptability: 99% (fully conforms to the language style and structural requirements of academic scenarios); Generation efficiency: It takes 3.5 seconds from user input to final text output, which meets the requirements for real-time generation.
[0078] Example 3 Marketing copy generation for mid-range mobile phone camera functions (marketing scenarios, short text + scenario adaptation + appeal requirements).
[0079] Data support layer initialization and model parameter configuration: Data support layer: Loading a general corpus (marketing copywriting corpus), a dual-domain knowledge graph of mobile phone products and marketing promotion, a marketing scenario feature library (strong language appeal, short sentences accounting for ≥70%, no professional terminology), a mobile phone industry factual knowledge base (including mid-range mobile phone pricing / configuration standards), and a user preference database (marketing copywriting that highlights camera functions increases click-through rate by 30%). Model parameter configuration: 3D semantic parsing module: BERT hidden layer dimension 768, cosine similarity threshold 0.85, maximum number of hops for intent mining 3; Dynamic semantic state graph construction module: 2 GAT layers, 4 heads, 1024 node vector dimensions, 513 edge vector dimensions, and incremental update range of 1-hop neighborhood (adapted to low resource scenarios on the client side). Real-time verification and evaluation module: The logical consistency evaluator is a lightweight multilayer perceptron, with a factual conformity verification cosine similarity threshold of 0.8 and a guiding strength parameter. ; Flexible generation strategy module: LLaMA-7B fine-tuning model, core layer candidate fragment generation number 3, length error not exceeding ±10%; Dynamic scene adaptation module: Jaccard similarity threshold 0.7, marketing scene short sentences account for ≥70%, professional terminology replacement rate 100%.
[0080] The specific implementation steps include: Step 1: User Input and Data Input The user entered the text: "Write a promotional copy for a mid-range mobile phone that focuses on its camera function, targeting young users, using simple and engaging language, with about 50 words." The data support layer outputs corresponding data to each module (marketing corpus, mobile product knowledge graph, marketing scenario characteristics, mobile phone camera function / mid-range pricing factual information).
[0081] Step 2: 3D semantic parsing module processing Explicit Needs Extraction: Extract core keywords such as "mid-range mobile phone", "camera function", "promotional copy", "young users", "popular and persuasive", and "around 50 words", and determine the need type as "marketing copy generation"; Implicit Intent Mining: Through 3-hop reasoning using the knowledge graph, the core implicit intents were mined as "highlighting the selling points of night scene photography / portrait mode", "incorporating trendy internet slang", and "emphasizing cost-effectiveness" (weights of 0.6, 0.3, and 0.1 respectively). Contextual feature modeling: Extract contextual features such as "marketing scenario", "young users", "popular expression", "strong appeal" and "around 50 words", and construct and output standardized three-dimensional semantic parsing results.
[0082] Step 3: Initialize the dynamic semantic state graph Based on the results of 3D semantic parsing, "mid-range mobile phone", "camera function", "young users", "night scene photography", "portrait mode", and "cost-effectiveness" are taken as initial nodes, and "main features", "target", "highlight", and "possess" are taken as initial edges; the node vectors are arranged according to... structure( For BERT keyword embedding in the marketing field, For node attributes such as "mid-range = price 1500-3000 yuan", the edge vectors are... Construct and complete the initial DSG construction.
[0083] Step 4: Flexible generation strategy module processing: Demand layering: Core layer (explicit needs + highlighting the selling points of photography), Adaptation layer (incorporating trendy language + emphasizing cost-effectiveness), Constraint layer (marketing scenarios + young users + 50 characters + popular and persuasive). Generate strategy matching: The core layer generates three candidate clips highlighting the photography function (focusing on night scene, portrait, and high pixel), the adaptation layer embeds trendy terms such as "xxxx" and "blindly shoot" and adds the cost-effectiveness statement of "mid-range price flagship experience", and the constraint layer calls the marketing scenario short sentence template; Initial Prompt Construction: The hierarchical generation strategy is transformed into a Prompt input LLaMA-7B model to generate initial text candidates: "This mid-range phone has amazing camera features! It takes clear night shots, has built-in beauty filters for portraits, boasts 50-megapixel resolution for super-clear images, and is affordable. Young people should definitely buy it!"
[0084] Step 5: Dual-channel parallel verification and generation The text generation channel feeds back the candidate set of lexical units from the initial text to the semantic understanding verification channel to obtain the original Logits output of each lexical unit; The dynamic semantic state graph construction module performs incremental semantic parsing on the initial text, adding nodes such as "50 million pixels," "clear night scene," and "affordable price," and using the GNN message passing formula: Complete the local subgraph update (only update the 1-hop neighborhood of the newly added node); The real-time verification and evaluation module performs dual verification: Logical consistency: Verify that there is no conflict between "mid-range phone" and "affordable price", and that "camera function" matches "50 million pixels". Output a logical consistency score of 0.98. Factual accuracy: Internal fact-checking confirms that "50-megapixel camera is a mainstream configuration for mid-range phones", resulting in a factual accuracy score of 0.95. Overall rating: Generate a guiding signal (Importance factor of trendy terminology I = 1.3); Text generation channel according to formula Adjust the probability and select the initial text (no low-risk candidates, no strategy adjustment required).
[0085] Step 6: Dynamic Scene Adaptation Module Processing Automatic scene feature recognition: The Jaccard similarity between the user input context features and the scene feature library is calculated to be 0.82 > 0.7, accurately identifying it as a "mobile marketing scene"; Dual-channel strategy adjustment: Utilize mobile marketing-specific generation strategies (supplementing scenario-based marketing phrases such as "center stage in WeChat Moments"), while maintaining the verification standard of "no technical jargon and conforming to the language habits of young users"; Scene adaptation optimization: The initial text is optimized with short sentences and supplemented with wording to output the final copy.
[0086] Step 7: Final text output and feedback iteration: Final text output: "This mid-range phone takes amazing photos! The 50-megapixel camera makes every shot a masterpiece, with clear night scenes and portrait beautification. It offers flagship-level experience at a mid-range price. Young people, go for it without hesitation! It's sure to be the star of your social media feed!" (50 characters) User feedback indicates that this copywriting has increased click-through rates by 45% compared to traditional copywriting. This feedback data is fed back to the data support layer to update the user preference database (copywriting that highlights multi-scenario applications of photography and uses trendy terms has the best effect). The intent weight calculation model of the deep semantic analysis module is fine-tuned weekly.
[0087] Verify the implementation effect: The marketing copy generated in this example has been tested in actual deployments, and the core metrics are as follows: Logical consistency and factual accuracy: 100% (no logical contradictions, all product information conforms to the facts of the mid-range mobile phone industry); Needs matching rate: 96% (all explicit needs and implicit intentions are covered); Scenario adaptability: 98% (fully conforms to the language style and communication needs of mobile marketing scenarios); User click-through rate: 45% higher than traditional marketing copy, 20% higher than the industry average; Generation efficiency: It takes 1.2 seconds from user input to final text output, meeting the rapid generation needs of marketing scenarios.
[0088] Example 4 Product description generation for high-end medical equipment (medical professional scenarios, requiring precision, rigorous logic, and accurate facts).
[0089] This embodiment addresses the text generation needs in a medical professional scenario, focusing on demonstrating DSG's ability to intercept logical conflicts between "high-end positioning, core parameters, and price," verifying the practicality of the solution in a professional vertical scenario. The system is deployed on a dedicated cloud server for the medical industry, meeting data security and professional requirements.
[0090] Data support layer initialization and model parameter configuration: Data support layer: Loading a medical equipment professional corpus, a knowledge graph of the high-end imaging equipment field, a medical professional scenario feature library (rigorous expression, no absolute terms, standardized professional terminology, parameters consistent with facts), a medical equipment factual knowledge base (including core parameters / pricing standards of high-end CT equipment), and a user preference database (hospitals' procurement side focuses on "accurate parameters + complete qualifications + matching positioning"); Model parameter configuration: 3D semantic parsing module: BERT medical domain fine-tuning model (BioBERT), cosine similarity threshold 0.9, maximum number of hops for intent mining 2 (more accurate for medical scenarios). Dynamic semantic state graph construction module: GAT layer number 3, head number 6, node vector dimension 1024, edge vector dimension 513, incremental update range 1-hop neighborhood; Real-time verification and evaluation module: The weight of the logical consistency evaluator has been increased to 0.7; the factual compliance verification is integrated with the knowledge base of the "Medical Equipment Industry Standards"; and the guidance strength parameter has been improved. ; Flexible generation strategy module: LLaMA-7B medical field fine-tuning model, core layer candidate fragment generation quantity 2 (professional scenarios pursue accuracy rather than diversity), length error not exceeding plus or minus 5%; Dynamic scene adaptation module: Jaccard similarity threshold 0.8, medical scene professional terminology standardization rate 100%, absolute expressions such as "cure rate 100%" are prohibited.
[0091] The specific implementation steps include: Step 1: User Input and Data Input The user inputs the text: "Write a product description for a high-end 64-slice spiral CT scanner, targeting hospital procurement, highlighting its core advantages of accurate imaging and rapid scanning, with rigorous wording, no absolute terms, and approximately 300 words." The data support layer outputs corresponding data to each module (medical equipment corpus, high-end CT knowledge graph, medical professional scenario characteristics, core parameters of 64-slice spiral CT / high-end pricing facts).
[0092] Step 2: 3D semantic parsing module processing Explicit Requirement Extraction: Extract core keywords such as "high-end 64-slice spiral CT", "product description", "hospital procurement", "precise imaging", "rapid scanning", "rigorous expression", "no absolute terms", and "300 words", and determine the requirement type as "generation of professional product descriptions for medical equipment"; Implicit intent mining: Through two-hop reasoning of the medical knowledge graph, the core implicit intents were mined as "clarifying core parameters (scanning speed ≤ 0.5s / circle, resolution ≥ 0.3mm)", "labeling industry qualifications", and "matching high-end positioning (pricing ≥ 2 million)" (all with a weight of 0.33). Contextual feature modeling: Extract contextual features such as "medical professional scenario", "hospital procurement end", "precise expression", "no absolute terms" and "around 300 words", and output three-dimensional semantic analysis results.
[0093] Step 3: Initialize the dynamic semantic state graph Based on the results of 3D semantic parsing, "high-end 64-slice spiral CT", "precise imaging", "fast scanning", "scanning speed ≤ 0.5s / circle", "resolution ≥ 0.3mm", "price ≥ 2 million", and "hospital procurement end" are used as initial nodes, and "possess", "core advantages", "positioned as", and "oriented" are used as initial edges. The node vectors are concatenated using BioBERT word embedding and medical equipment parameter attribute vectors, and the edge vectors strengthen the confidence of the relationship between "positioning-parameter" and "parameter-price", thus completing the initial construction of DSG.
[0094] Step 4: Flexible Generation Strategy Module Processing Demand Layering: Core Layer (High-end CT + Precision Imaging + Rapid Scanning + Core Parameters), Adaptation Layer (Industry Qualifications Labeled + Hospital Procurement Targeted), Constraint Layer (Medical Professional Scenarios + Rigorous Expression + No Absolutes + 300 Words). Generate strategy matching: The core layer focuses on the precise expression of core parameters and advantages, the adaptation layer embeds qualification information such as "National Class III Medical Device Certificate", and the constraint layer strictly follows the medical professional expression norms; Initial Prompt Construction: Input the finely tuned LLaMA-7B model to generate initial text candidates with logical conflicts: "This high-end 64-slice spiral CT equipment is positioned as a high-end procurement model for hospitals. It has a scanning speed of 0.4s / circle, a resolution of 0.25mm, precise imaging without deviation, a price of 1.8 million, and has a Class III medical device certificate. It is suitable for clinical examinations in hospitals at all levels." Step 5: Dual-channel parallel verification and logic conflict interception (core step) The text generation channel feeds back the initial candidate word set to the semantic understanding verification channel to obtain the original Logits of key candidate words such as "priced at 1.8 million" and "precise imaging without deviation"; The dynamic semantic state graph construction module performs incremental semantic parsing on the initial text, adding nodes such as "scanning speed 0.4s / circle", "resolution 0.25mm", "price 1.8 million", and "three types of certificates" to complete the local subgraph GNN update; The real-time verification and evaluation module performs dual verification, accurately identifying and blocking two issues: Question 1: Logical conflict between "high-end positioning" and "pricing of 1.8 million": Logical consistency assessment, input the aggregation vector of the subgraph "high-end 64-slice spiral CT" in DSG and the semantic embedding of "pricing of 1.8 million", the model is based on the relationship of "high-end CT pricing ≥ 2 million" in the knowledge graph, and outputs a logical consistency score of 0.2; Fact compliance verification: Through a search of the medical equipment fact knowledge base, it was confirmed that "1.8 million is the pricing standard for mid-range CT", and a fact compliance score of 0.15 was output. Overall rating: (Low risk); Question 2: "Precise imaging without deviation" is an absolute term. Logical consistency assessment: Matching the "no absolute terms" constraint in the medical scenario, output a logical consistency score of 0.1; Factual compliance verification: If there is no corresponding factual support, output a factual compliance score of 0.0; Overall rating: (High risk); Differentiable guidance signal generation and strategy adjustment: The system generates extremely low guidance signals for terms like "priced at 1.8 million" and "precise imaging without deviation," significantly reducing their generation probability. The generation strategy is adjusted in real time. The flexible generation strategy module regenerates the core layer fragment, correcting "priced at 1.8 million" to "priced at 2.2 million" and "precise imaging without deviation" to "precise imaging effect is excellent, meeting the needs of precise clinical diagnosis". The text generation channel is recalculated based on the corrected candidate fragments. This generates conflict-free initial text.
[0095] Step 6: Dynamic Scene Adaptation Module Processing Automatic scene feature recognition: The similarity score is 0.85 > 0.8, and the scene is identified as "high-end medical equipment product description scene". Dual-channel strategy adjustment: Utilize medical-specific strategies (supplementing procurement-side concerns such as "clinical application scope" and "equipment stability"), and strengthen verification standards to ensure "parameters are consistent with industry standards"; Scene adaptation optimization: The revised initial text was standardized with professional terminology and sentence structure adjustments, redundant expressions were removed, and the word count was controlled to around 300 words.
[0096] Step 7: Final Text Output and Feedback Iteration The final text output reads: "This high-end 64-slice spiral CT scanner is positioned as a high-end clinical procurement model for hospitals. Its core advantages are precise imaging and rapid scanning, with a scanning speed of 0.4s / circle and a spatial resolution of 0.25mm. It delivers excellent imaging results, meeting the precise diagnostic needs of multiple sites, including the chest and abdomen. Priced at 2.2 million RMB, the equipment has obtained the National Class III Medical Device Registration Certificate. It boasts strong operational stability and is suitable for clinical examinations and diagnoses in tertiary hospitals and large general hospitals, providing reliable imaging support for clinical diagnosis and treatment." (298 words). The medical industry expert assessment confirms no logical / factual errors or absolute terms. Feedback data is sent back to the data support layer to update the medical equipment factual knowledge base and scenario feature database.
[0097] Verify the implementation effect: The product specifications generated in this embodiment have been evaluated by medical industry experts and hospital procurement departments, and the core indicators are as follows: Logical consistency and factual accuracy: 100% (successfully intercepted logical conflicts; all parameters / pricing / positioning conform to high-end CT industry standards). Demand matching accuracy: 99% (all explicit needs and implicit intentions are accurately covered, matching the core concerns of the purchasing side); Scenario adaptability: 100% (rigorous expression, standardized professional terminology, no absolute terms, fully meets the requirements of medical professional scenarios); Professional recognition: 98 points (out of 100; experts believe it can be directly used for hospital procurement). Generation efficiency: It takes 4.8 seconds from user input to final text output, which meets the balance between accuracy and efficiency in medical professional text generation.
[0098] This embodiment can divide the method into functional modules based on the above method example. For example, each function can be assigned to a separate module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0099] When dividing each function into modules according to its corresponding functions, it should be noted that all relevant content of each step involved in the above method embodiment can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0100] This embodiment also provides a computer-readable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) storing computer program code. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to realize the AI-based text generation method and system with real-time verification feedback provided in the above embodiment.
[0101] This embodiment also provides a computer program product. When the computer program product is run on a computer, it causes the computer to perform the aforementioned related steps to realize the AI-based text generation method and system with real-time verification feedback provided in the above embodiment. The beneficial effects of the above embodiments can be found in the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0102] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0103] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. In the description of this disclosure, it should be understood that if terms such as "upper," "lower," "front," "rear," "left," and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, they are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the indicated position or element must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure.
[0104] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0105] The above are merely embodiments of this disclosure and are not intended to limit the scope of this disclosure. Various modifications and variations can be made to this disclosure by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of the claims of this disclosure.
Claims
1. A text generation method based on artificial intelligence with real-time verifiable feedback, characterized in that, The user input is subjected to three-dimensional semantic analysis of explicit needs, implicit intentions and contextual features to obtain the three-dimensional semantic analysis results; Based on the three-dimensional semantic parsing results and the generated context of the text generation channel, a dynamic semantic state graph is constructed and updated in real time. Based on the text generation channel and the semantic understanding verification channel, text generation and semantic understanding verification are performed in parallel. The text generation channel generates candidate content based on a demand-layering strategy; The semantic understanding verification channel, based on the dynamic semantic state diagram, performs dual verification of logical consistency and factual conformity on the candidate generated content, and generates a comprehensive semantic risk score and a differentiable guidance signal. The probability distribution of the generation model is adjusted based on the differentiable guiding signal, and the final text is selected and output.
2. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, The three-dimensional semantic parsing includes: The BERT-based semantic coding model is used to extract core keywords and explicit demand instructions from user input to determine the type of explicit demand. Explicit demand keywords are mapped to nodes in a multi-domain knowledge graph, and implicit intentions are mined through multi-hop reasoning and attention mechanisms. Extract contextual keywords, tone features, and length constraints from user input text to construct a contextual feature model; A standardized association matrix of the explicit requirements, implicit intentions, and contextual features is constructed and output as the result of three-dimensional semantic parsing.
3. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, The construction and real-time updating of the dynamic semantic state graph includes: Based on the core entities, concepts, and relationships in the 3D semantic parsing results, initialize the nodes and edges of the dynamic semantic state graph; Wherein, the node vector is represented as , The edge vector is represented as ; Incremental semantic parsing is performed on the generated text to extract new entities, relationships, and events; A graph attention network is used to maintain a dynamic semantic state graph, and node vectors are updated based on message passing formulas through a local subgraph incremental update mechanism. The message passing formula is expressed as follows: .
4. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, The dual verification of logical consistency and factual conformity includes: Obtain the candidate word set predicted by the text generation channel and its original generation probability; A pre-trained multilayer perceptron classifier is used as the logical consistency evaluator. The target subgraph aggregation vector of the dynamic semantic state graph and the semantic embedding of candidate content are used as inputs to the logical consistency evaluator, and the logical consistency score is output. ; Output a fact-verification score through internal fact-checking and lightweight external searches. ; A weighted fusion algorithm is used to calculate the comprehensive semantic risk score: ; Based on the generation probability formula, the comprehensive semantic risk score is transformed into a differentiable guiding signal by adjusting the output of the Logits layer of the generation model; the generation probability formula is expressed as: 。 5. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 4, characterized in that, The training data for the logical consistency evaluator is constructed by pairing logical positive samples with logical negative samples. The logical positive samples are logically consistent sentence pairs, and the logical negative samples are generated by entity substitution or attribute conflict injection. The training data used for the verification and evaluation of factual conformity includes: positive fact samples and negative fact samples; The positive fact samples are statements consistent with the fact knowledge base, while the negative fact samples are generated through entity replacement or data manipulation.
6. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, The demand stratification strategy includes: Based on the results of three-dimensional semantic parsing, the requirements are divided into a core layer, an adaptation layer, and a constraint layer, forming a hierarchical requirement structure. Based on the hierarchical requirement structure, the corresponding core layer reinforcement strategy, adaptation layer fusion strategy and constraint layer adaptation strategy are matched from the generation strategy library. The matched hierarchical generation strategy is transformed into initial prompt words and input into a pre-trained large language model; When the received real-time verification feedback signal indicates that the overall score of the candidate content is lower than the threshold, the generation strategy is dynamically adjusted.
7. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, It also includes dynamic scene adaptation, specifically including: The target scene is automatically identified by calculating the similarity between the contextual features of the user input and the predefined scenes in the scene feature library. Based on the identified target scene, the exclusive generation strategy in the scene-strategy mapping table is invoked to adjust the strategy of the text generation channel; Based on the identified target scene, switch to the corresponding dedicated verification standard and adjust the verification evaluation standard of the semantic understanding verification channel.
8. The text generation method based on artificial intelligence with real-time verifiable feedback according to claim 1, characterized in that, It also includes feedback iteration, specifically including: Collect user feedback data on the final output text, including satisfaction ratings, error annotations, and scene effect data; Based on feedback data, update the user preference database, scenario feature database, fact knowledge base, and multi-domain knowledge graph; The model and algorithm are fine-tuned regularly based on updated data.
9. A text generation system based on artificial intelligence with real-time verifiable feedback, characterized in that... The system includes: The data support layer is used to store and provide general corpora, domain knowledge graphs, scene features, user preferences, and factual knowledge; The three-dimensional semantic parsing module is used to perform three-dimensional semantic parsing of user input, including explicit needs, implicit intentions, and contextual features, and output the three-dimensional semantic parsing results. The dynamic semantic state graph construction module is used to construct and update the dynamic semantic state graph in real time based on the three-dimensional semantic parsing results and the generated text content. The real-time verification and evaluation module is used to perform dual verification of logical consistency and factual conformity of the candidate generated content output by the text generation channel based on the dynamic semantic state diagram, and generate a comprehensive semantic risk score and a differentiable guidance signal. The flexible generation strategy module is used to perform demand layering based on the three-dimensional semantic parsing results, formulate generation strategies, and construct initial prompt words. A pre-trained large language model is used to generate candidate content based on the initial prompt words, and adjust its output probability distribution according to the differentiable guidance signal fed back by the real-time verification and evaluation module. The dynamic scene adaptation module is used to automatically identify the target scene and dynamically adjust the generation strategy of the flexible generation strategy module and the verification criteria of the real-time verification and evaluation module.
10. A computer-readable storage medium, characterized in that, It stores instructions that, when executed by one or more processors, cause the processors to perform the AI-based text generation method with real-time verifiable feedback as described in any one of claims 1-8.
