A system and method for complex requirements modeling, verification, and execution based on finite state transducers
Patent Information
- Application Number
- CN202610863292.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-10-13
AI Technical Summary
[0005]本发明要解决的技术问题是意图漂移与上下文崩溃,纠错成本高,需求修改引发全局崩溃
1、零技术基础下的精准需求表达:传统需求沟通中,非技术背景的业务方常因不理解技术术语和实现细节而难以准确传达意图,本发明通过智能对话引导和可视化FST图谱,将复杂的技术概念转化为直观的节点与连接关系,用户无需理解状态机、API接口或数据库设计等专业概念,仅需用自然语言描述业务目标,系统即可自动拆解为结构化的需求图谱,这种"业务语言-形式化模型"的无损转换,使产品运营、业务经理等非技术角色能够精确表达完整需求框架,彻底消除"需求沟壑";
Smart Images

Figure CN122903440A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence program synthesis, requirements engineering, and formal methods, specifically to a system and method for complex requirements modeling, verification, and execution based on finite state converters. Background Technology
[0002] Currently, "conversation-driven" AI applications, represented by Open Claw and Claude Code, mainly focus on the implementation phase; they complete software engineering or automation tasks through natural language interaction.
[0003] However, these tools reveal significant limitations during the requirement specification phase: 1. Intent drift and context collapse: In long-range dialogues, the attention mechanism of LLM shifts as tokens increase, causing the initial constraints to be forgotten; existing linear dialogue models lack an "anchor mechanism" to solidify the original requirements. As the dialogue progresses, newly generated tokens dilute the weight of the initial instructions, causing the AI to forget the core boundaries initially set; research shows that in complex engineering tasks (such as more than 50 rounds of interaction), the model often produces contradictory logic due to the lack of stable internal states. 2. "Black box" decision-making and unreliable reasoning chains: In the pure dialogue mode, the decomposition path of the requirements is hidden in the probability prediction, and the reasoning logic is hidden in the massive parameter calculation. Users can only see the results and cannot examine the process. When errors occur, users cannot locate which derivation node has a problem, resulting in extremely high error correction costs. 3. Lack of formal verification mechanism: Existing tools mainly use the Harness strategy to patch the output results, which is essentially still "implementation-oriented"; on the demand side, there is a lack of an intermediate formal expression that can transform the user's vague intentions into "verifiable, transferable, and traceable" expressions.
[0004] 4. Changing a requirement in a conversation often requires restarting the conversation; otherwise, the context will become chaotic, potentially causing a global crash. Summary of the Invention
[0005] The technical problem this invention aims to solve is intent drift and context collapse, which are characterized by high error correction costs and global crashes caused by requirement modifications.
[0006] To solve the above-mentioned technical problems, the technical solution provided by the present invention is: a complex requirement modeling, verification and execution system based on a finite state converter, wherein the execution system includes a hierarchical requirement parsing execution system, a context anchoring maintenance execution system, a formal verification execution system, a visual interactive guidance execution system and an executable specification generation execution system; Layered Requirement Parsing and Execution System: Transforms user natural language requirements into structured FST through a three-layer parsing mechanism; Context anchoring and maintenance execution system: Through the context maintenance mechanism, the initialization node will serve as the global root constraint throughout the process, avoiding the problems of intent drift and context loss in long-term dialogues; Formal verification execution system: Through a three-layer verification mechanism, it ensures the integrity and consistency of the generated structured FST and guarantees its executableness; Visualized interactive guided execution system: Through multi-round dialogue with the user, the system gradually refines the input and output parameters of each node and improves the state transition conditions; Executable Specification Generation and Execution System: Converts verified FSTs into executable technical specifications.
[0007] Furthermore, the three-layer parsing mechanism includes Semantic layer parsing: Using a domain-specific semantic parser, the core entities, operations, and constraints in the requirements are identified; Logical layer decomposition: Based on the semantic parsing results, heuristic rules and knowledge graphs are used to decompose complex requirements into a sequence of executable subtasks. Each subtask corresponds to an intermediate state node in FST, and the dependencies between tasks constitute state transition edges. Parameter layer refinement: Detailed input and output specifications are generated for each subtask node, including data types, formats, constraints, etc. The system guides users to clarify these parameters through multiple rounds of dialogue to ensure the feasibility of the requirements.
[0008] Furthermore, the context maintenance mechanism includes Root node anchoring: The initial state node serves as the global context anchor, and all subsequent state transitions must verify that its input and output parameters satisfy the initial constraints. Local context isolation: Each node dialogue maintains its own local context to avoid cross-node information interference. When a user modifies a node, the system only recalculates the affected path branches, rather than overturning the entire process. Dependency-aware updates: A demand dependency graph is introduced to track data flow and control flow dependencies between nodes. When a user modifies a parameter, the system automatically identifies and prompts the downstream nodes that may be affected.
[0009] Furthermore, the three-layer verification mechanism includes Syntax verification: Verify whether the FST structure conforms to the formal definition, including state integrity and transition integrity; Semantic verification: Check the consistency of data flow between nodes to ensure that the output of the upstream node can meet the input requirements of the downstream node. Static analysis is performed using a type system and predicate logic. Runtime verification: During the requirements execution phase, test cases are generated and executed to verify whether the actual behavior of FST meets expectations; when deviations are found, the system provides correction suggestions and updates FST.
[0010] Furthermore, the user guidance strategy includes Progressive display: Based on the user's cognitive load, the FST structure is displayed step by step. In the initial stage, only key nodes and main paths are displayed, and detailed parameter configurations are expanded when the user is more deeply involved. Conflict visualization: When user modifications cause conflicting requirements, the system highlights the conflicting nodes and paths, providing visual comparison and solutions; Template-driven generation: Predefined FST templates are provided for common demand patterns; after the user selects a template, the system guides the user through a dialog to fill in specific parameters, greatly reducing the complexity of the build process.
[0011] Furthermore, the executable specification generation strategy includes Code framework generation: Automatically generate the corresponding code framework, interface definition and data model based on the FST node type and technology stack selection; Test environment configuration: Based on FST's input / output specifications, test cases, mock data, and integration test environment configuration are automatically generated; Deployment manifest generation: Based on FST's resource requirements, generate containerized deployment configurations and infrastructure, i.e., code templates.
[0012] Furthermore, an execution method for a complex requirement modeling, verification, and execution system based on finite state converters includes the following steps: S1. Requirements Input Stage: Users input their natural language requirements, and the system performs three-level parsing to generate the initial FST skeleton; S2. Dialogue Guidance Phase: The system engages in multiple rounds of dialogue with the user, gradually refining the input and output parameters of each node and improving the state transition conditions; S3. Verification and Revision Phase: Perform formal verification, identify and resolve conflicts, and allow users to make interactive revisions through a visual interface; S4. Specification Generation Phase: The validated FST is converted into an executable technical specification to support subsequent automated development.
[0013] The advantages of this invention compared to the prior art are: 1. Precise Requirement Expression Without Technical Background: In traditional requirement communication, business stakeholders without technical backgrounds often struggle to accurately convey their intentions due to a lack of understanding of technical terminology and implementation details. This invention, through intelligent dialogue guidance and a visualized FST graph, transforms complex technical concepts into intuitive nodes and connections. Users do not need to understand professional concepts such as state machines, API interfaces, or database design; they only need to describe their business objectives in natural language, and the system can automatically decompose them into a structured requirement graph. This lossless conversion between "business language" and "formal model" enables non-technical roles such as product operations and business managers to accurately express the complete requirement framework, completely eliminating the "requirement gap." 2. Reduced Cognitive Load and Developer-Friendliness: This invention transforms the traditional high-cognitive-load model of "conceptualization followed by documentation" into a lightweight interactive model of "progressive guidance." Users do not need to think about all the technical details at once, but rather clarify the parameters of each node layer by layer under the guidance of the system. The visual graph provides instant feedback, and the impact range of any node adjustment is displayed in real time, allowing users to easily express and verify their ideas. More importantly, each node of the generated FST graph clearly defines the input and output format, data type, and technical constraints. After being converted into standard JSON, it can be directly digested and understood by developers without secondary interpretation or guessing user intentions, greatly reducing the conversion loss from requirements to implementation.
[0014] 3. Structured Knowledge Accumulation and Demand Evolution: FST's formal expression provides a structured foundation for demand knowledge management. Historical demand maps can be categorized, stored, retrieved, and analyzed to form an organizational-level demand pattern library. The system identifies common demand patterns based on historical data, providing reference templates for new product design. This structuring provides data support for abstracting general solutions from a large number of specific demands, supports the knowledge accumulation and continuous evolution of demands, and promotes the systematic upgrade of product architecture. Attached Figure Description
[0015] Figure 1 This is an interface diagram of the input original task in a complex requirement modeling, verification and execution system and method based on finite state converters according to the present invention.
[0016] Figure 2 This is the interface diagram of the system following up based on the FST logic template.
[0017] Figure 3 It generates the initialization requirement graph.
[0018] Figure 4 It is a graphical interface for opening the GUI page and modifying the attributes of any node or edge.
[0019] Figure 5 This is an interface image showing suggestions and modifications provided by AI.
[0020] Figure 6 This is a screenshot summarizing the entire process.
[0021] Figure 7 The topology diagram will be converted into a JSON structure for storage as an interface diagram. Detailed Implementation
[0022] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0023] A complex requirement modeling, verification, and execution system based on a finite state converter is provided. The execution system includes a hierarchical requirement parsing execution system, a context anchoring maintenance execution system, a formal verification execution system, a visual interactive guidance execution system, and an executable specification generation execution system.
[0024] An execution method for a complex requirement modeling, verification, and execution system based on finite state converters includes the following steps: S1. Requirements Input Stage: Users input their requirements in natural language. The hierarchical requirements parsing and execution system uses a three-layer parsing mechanism to transform the user's natural language requirements into a structured FST, generating an initial FST skeleton. Semantic layer parsing: Using a domain-specific semantic parser, the core entities, actions, and constraints in the requirements are identified. For example, in the requirement of "e-commerce page migration", the entity is identified as "page", the action is "migration", and the constraints may include "keep the original layout" and "adapt to mobile devices".
[0025] Logical layer decomposition: Based on the semantic parsing results, heuristic rules and knowledge graphs are used to decompose complex requirements into a sequence of executable subtasks; each subtask corresponds to an intermediate state node in FST, and the dependencies between tasks constitute state transition edges.
[0026] Parameter layer refinement: Detailed input and output specifications are generated for each subtask node, including data types, formats, constraints, etc. The system guides users to clarify these parameters through multiple rounds of dialogue to ensure the feasibility of the requirements.
[0027] S2. Dialogue Guidance Phase: The execution system adopts a context maintenance mechanism through context anchoring to conduct multiple rounds of dialogue with the user, gradually refine the input and output parameters of each node, improve the state transition conditions, and use the initialization node as a global root constraint throughout the process to avoid the problems of intent drift and context loss in long-term dialogues. The context maintenance mechanism includes Root node anchoring: The initial state node serves as the global context anchor, and all subsequent state transitions must verify that its input and output parameters satisfy the initial constraints. Local context isolation: Each node dialogue maintains its own local context to avoid cross-node information interference. When a user modifies a node, the system only recalculates the affected path branches, rather than overturning the entire process. Dependency-aware updates: A Requirement Dependency Graph (RDG) is introduced to track data flow and control flow dependencies between nodes. When a user modifies a parameter, the system automatically identifies and prompts potentially affected downstream nodes.
[0028] S3. Verification and Rectification Phase: Formal verification is performed using a three-layer verification mechanism through the formal verification execution system to identify and resolve conflicts; The three-layer verification mechanism includes: Syntax verification: Verify whether the FST structure conforms to the formal definition, including state integrity (each state must have explicit inputs and outputs) and transition integrity (each transition must have explicit triggering conditions and target states). Semantic verification: Check the consistency of data flow between nodes to ensure that the output of the upstream node can meet the input requirements of the downstream node. Static analysis is performed using a type system and predicate logic. Runtime verification: During the requirements execution phase, test cases are generated and executed to verify whether the actual behavior of FST meets expectations; when deviations are found, the system provides correction suggestions and updates FST.
[0029] Furthermore, the system guides users to interactively modify the visual interface through a visually interactive execution system. The user guidance strategy includes Progressive display: Based on the user's cognitive load, the FST structure is displayed step by step. In the initial stage, only key nodes and main paths are displayed, and detailed parameter configurations are expanded when the user is more deeply involved. Conflict visualization: When user modifications cause conflicting requirements, the system highlights the conflicting nodes and paths, providing visual comparison and solutions; Template-driven generation: Predefined FST templates are provided for common requirement patterns (such as CRUD operations, data migration, report generation, etc.). After the user selects a template, the system guides them through a dialog box to fill in the specific parameters, significantly reducing the complexity of the build process.
[0030] S4. Specification Generation Phase: The validated FST is converted into an executable technical specification through an executable specification generation system, supporting the automation of subsequent development.
[0031] The executable specification generation strategy includes: Code framework generation: Based on the FST node type and technology stack selection, the corresponding code framework, interface definition and data model are automatically generated; for example, the "User Authentication" node is converted into the corresponding API endpoint and database table structure; Test environment configuration: Based on FST's input / output specifications, test cases, mock data, and integration test environment configuration are automatically generated; Deployment manifest generation: Based on FST's resource requirements (compute, storage, network, etc.), generate containerized deployment configurations and Infrastructure as Code templates.
[0032] Through the above design method, this invention realizes the end-to-end transformation from vague user requirements to precise executable technical specifications, providing a reliable requirements engineering foundation for AI-driven software development.
[0033] Example 1 This invention operates by combining "dialogue-guided generation" with "visual intervention".
[0034] Combined with appendix Figure 1 When a user creates a task, they are first required to enter the original task, such as "a system for migrating e-commerce pages".
[0035] After creation, the system obtains the initial state and initiates a dialog that provides relevant suggestions for fulfilling the original requirement.
[0036] Combined with appendix Figure 2 and attached Figure 3 The AI won't directly ask "What videos do you want?" Instead, it will follow up with questions based on the FST logic template: "Scope of migration? Target platform? Core concerns?" After the user confirms, the AI will generate an initial requirements graph in the background.
[0037] Combined with appendix Figure 4 Based on the above requirement graph, you can click on any node or edge to open the GUI page for modification, including the node's function, input data format and name, output format and name, etc. Combined with appendix Figure 5Users can also click on any node or edge to start a dialogue and modify only that node or edge. Modifications will affect all paths containing that node or edge; furthermore, if the new modifications conflict with the existing graph, the AI will provide a warning and suggested modifications.
[0038] In addition, combined with the appendix Figure 6 The content of the starting node also summarizes the work of the entire process.
[0039] Combined with appendix Figure 7 Once completed, the topology diagram will be converted into a JSON structure for future retrieval. It should be noted that in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0040] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0041] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A complex requirement modeling, verification, and execution system based on finite state converters, characterized in that: The execution system includes a layered requirements parsing execution system, a context anchoring maintenance execution system, a formal verification execution system, a visual interactive guidance execution system, and an executable specification generation execution system; Layered Requirement Parsing and Execution System: Transforms user natural language requirements into structured FST through a three-layer parsing mechanism; Context anchoring and maintenance execution system: Through the context maintenance mechanism, the initialization node will serve as the global root constraint throughout the process, avoiding the problems of intent drift and context loss in long-term dialogues; Formal verification execution system: Through a three-layer verification mechanism, it ensures the integrity and consistency of the generated structured FST and guarantees its executableness; Visualized interactive guided execution system: Through multi-round dialogue with the user, the system gradually refines the input and output parameters of each node and improves the state transition conditions; Executable Specification Generation and Execution System: Converts verified FSTs into executable technical specifications.
2. The complex requirement modeling, verification, and execution system based on finite state converters according to claim 1, characterized in that: The three-layer parsing mechanism includes Semantic layer parsing: Using a domain-specific semantic parser, the core entities, operations, and constraints in the requirements are identified; Logical layer decomposition: Based on the semantic parsing results, heuristic rules and knowledge graphs are used to decompose complex requirements into a sequence of executable subtasks. Each subtask corresponds to an intermediate state node in FST, and the dependencies between tasks constitute state transition edges. Parameter layer refinement: Detailed input and output specifications are generated for each subtask node, including data types, formats, constraints, etc. The system guides users to clarify these parameters through multiple rounds of dialogue to ensure the feasibility of the requirements.
3. The complex requirement modeling, verification, and execution system based on finite state converters according to claim 1, characterized in that: The context maintenance mechanism includes Root node anchoring: The initial state node serves as the global context anchor, and all subsequent state transitions must verify that its input and output parameters satisfy the initial constraints. Local context isolation: Each node dialogue maintains its own local context to avoid cross-node information interference. When a user modifies a node, the system only recalculates the affected path branches, rather than overturning the entire process. Dependency-aware updates: A demand dependency graph is introduced to track data flow and control flow dependencies between nodes. When a user modifies a parameter, the system automatically identifies and prompts the downstream nodes that may be affected.
4. The complex requirement modeling, verification, and execution system based on finite state converters according to claim 1, characterized in that: The three-layer verification mechanism includes Syntax verification: Verify whether the FST structure conforms to the formal definition, including state integrity and transition integrity; Semantic verification: Check the consistency of data flow between nodes to ensure that the output of the upstream node can meet the input requirements of the downstream node. Static analysis is performed using a type system and predicate logic. Runtime verification: During the requirements execution phase, test cases are generated and executed to verify whether the actual behavior of FST meets expectations; when deviations are found, the system provides correction suggestions and updates FST.
5. A complex requirement modeling, verification, and execution system based on a finite state converter according to claim 1, characterized in that: The user guidance strategy includes Progressive display: Based on the user's cognitive load, the FST structure is displayed step by step. In the initial stage, only key nodes and main paths are displayed, and detailed parameter configurations are expanded when the user is more deeply involved. Conflict visualization: When user modifications cause conflicting requirements, the system highlights the conflicting nodes and paths, providing visual comparison and solutions; Template-driven generation: Predefined FST templates are provided for common demand patterns; after the user selects a template, the system guides the user through a dialog to fill in specific parameters, greatly reducing the complexity of the build process.
6. The complex requirement modeling, verification, and execution system based on finite state converters according to claim 1, characterized in that: The executable specification generation strategy includes Code framework generation: Automatically generate the corresponding code framework, interface definition and data model based on the FST node type and technology stack selection; Test environment configuration: Based on FST's input / output specifications, test cases, mock data, and integration test environment configuration are automatically generated; Deployment manifest generation: Based on FST's resource requirements, generate containerized deployment configurations and infrastructure, i.e., code templates.
7. An execution method for a complex requirement modeling, verification, and execution system based on finite state converters, characterized in that, Includes the following steps: S1. Requirements Input Stage: Users input their natural language requirements, and the system performs three-level parsing to generate the initial FST skeleton; S2. Dialogue Guidance Phase: The system engages in multiple rounds of dialogue with the user, gradually refining the input and output parameters of each node and improving the state transition conditions; S3. Verification and Revision Phase: Perform formal verification, identify and resolve conflicts, and allow users to make interactive revisions through a visual interface; S4. Specification Generation Phase: The validated FST is converted into an executable technical specification to support subsequent automated development.