Product management document delivery method and device based on responsibility chain and context maintenance, equipment and medium

CN122779792APending Publication Date: 2026-09-18YUXIANG TECH (HANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611257360.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

但提示词模板与上下文键命名缺乏与阶段门控标识、审核扫描结果字段的系统化绑定,难以在自动化流水线中做可重复的质量关卡

Benefits of technology

[0018] This application first sets the product management document delivery process as a target number of responsibility chain stages, and configures a gate identifier for each of the responsibility chain stages. The responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary management, document review, and archiving. Each responsibility chain stage generates a corresponding product management document. A corresponding key path set is configured for each gate identifier. The key path set includes the outermost key name of the project context and nested paths formed by connecting parent and child key names according to preset punctuation marks. The project context is used to store the structured data produced by each responsibility chain stage. After the current responsibility chain stage is completed, the target corresponding to the gate identifier of the current responsibility chain stage is determined. The key path set is used to determine whether the outermost key name specified by the target key path set exists in the project context, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target key path set exists. If both exist, the product management document corresponding to the current responsibility chain stage is written into the project context. The next responsibility chain stage is determined based on the read responsibility chain stage transition table and the current responsibility chain stage. The current responsibility chain stage is updated to the next responsibility chain stage, and the updated current responsibility chain stage is executed. After execution reaches the archiving responsibility chain stage, the product management document in the project context is determined as the delivery document and output. It can be seen that this application, by encoding the business semantics, i.e., the seven-stage product management responsibility chain, into a constraint on the project context key, and by binding the gate identifier with the outermost key name and the nested field dot-matrix path in a two-layer manner, enables the gate determination to directly locate the specific missing field. Compared to existing technologies that only determine whether the preceding stage has been executed, this application can perform deterministic verification on the completeness of the structured data produced by the stage before the stage transition, thereby preventing automatic advancement based on incomplete data; compared to existing technologies that only return a boolean failure when gating fails, this application generates a list of missing keys and missing nested fields simultaneously in the same gating decision, so that operation and maintenance can locate the items to be filled without a full scan of the context, and it can be inferred that the manual location time for gating failure can be significantly shortened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122779792A_ABST
    Figure CN122779792A_ABST
Patent Text Reader

Abstract

The application discloses a product management document delivery method and device based on a responsibility chain and context maintenance, equipment and medium, relates to the technical field of automation workflow, and comprises the following steps: configuring a gate identification for each responsibility chain stage; configuring a key path set for the gate identification; after the current responsibility chain stage is executed, judging whether the outermost key name specified by the target key path set in the project context exists and whether each target sub-key name specified by the target nested path exists according to the target key path set of the current responsibility chain stage; if all exist, writing the product management document into the project context, determining the next responsibility chain stage, updating the current responsibility chain stage to the next responsibility chain stage, and executing the updated current responsibility chain stage; after the archiving responsibility chain stage is executed, the product management document is determined as a delivery document and is output. Therefore, the application significantly shortens the operation and maintenance positioning time and reduces the pseudo-ready risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated workflow technology, and in particular to a method, apparatus, device, and medium for delivering product management documents based on chain of responsibility and context maintenance. Background Technology

[0002] Large language models possess natural language understanding and generation capabilities and can be encapsulated as intelligent agents to perform multi-step tasks. Commonly known intelligent agent frameworks guide model behavior through system prompts, tool calls, and memory modules. However, in these frameworks, the agent's identity and behavioral boundaries are typically written in initialization scripts or fixed prompts, remaining unchanged throughout its lifecycle and making it difficult to adjust the focus of constraints as business processes shift. Furthermore, injecting all behavioral principles into the prompts at once can lead to lengthy prompts and principles irrelevant to the current stage interfering with the current task.

[0003] Common workflow engines describe business processes using task nodes, directed edges, and state variables. Stage transitions often rely on Boolean checks to determine whether preceding tasks were successfully completed. When gating functions fail, they typically return general errors or failure flags, rarely specifying which top-level keys or nested fields are missing from the project context. Operations personnel must manually check configurations and data item by item to pinpoint the time-consuming process.

[0004] Publicly known document review includes regular expression matching, keyword filtering, and semantic classification. In the field of contract and deliverable review, red, yellow, and green grading are commonly used to represent the severity of risks. These methods are often loosely coupled with business processes and frequently employ a single pass or fail conclusion, failing to simultaneously express critical compliance issues that must be blocked and non-blocking issues that only affect readiness. Therefore, it is difficult to separately block deliveries and quantify readiness levels within the same pipeline.

[0005] Commonly known large language model applications write intermediate results to session or project-level key-value stores for subsequent steps to retrieve. However, the prompt word templates and context key naming lack systematic binding with stage gating identifiers and audit scan result fields, making it difficult to implement repeatable quality checks in automated pipelines. Furthermore, common implementations use whether the large language model call throws an exception or whether the returned text is empty as the skill success criterion, without checking whether the pre-defined structured output object for the stage has actually been written to the project context. Therefore, in scenarios where communication is successful but the structured object is missing, the stage may still be mistakenly marked as complete, causing subsequent stages to continue based on non-existent structured data, creating a false-ready risk.

[0006] However, existing technologies have the following drawbacks: First, identity constraints cannot be differentiated according to the stages of the responsibility chain. The full-scale injection principle is both lengthy and introduces stage-irrelevant interference. Agents may leak internal cost logic during the quotation stage or include too many technical implementation details in the requirements document stage. Second, quality signals are not layered and bound to different stage gating. Serious compliance violations and insufficient readiness share the same failure conclusion, and the improvement space cannot be quantified during the review stage. Third, the integrity of the business link lacks a structured verification object that can be used as a gating input. The gating cannot determine whether the main link is complete based solely on the stage completion mark. Integrity gaps are only exposed during manual review. Fourth, gating failure only returns a boolean failure and does not distinguish between two types of repairable paths: missing top-level context keys and parent keys that exist but child keys are empty. Operations and maintenance need to perform a full scan of the context or repeatedly execute the stage. Fifth, even if skill communication is successful, there may still be a lack of structured contracts. There is no mechanism to automatically switch to backup skills and resubmit the gating judgment according to the stage, which leads to false successes penetrating to downstream stages.

[0007] It is evident that shortening the operation and maintenance positioning time and reducing the risk of false readiness are urgent problems to be solved. Summary of the Invention

[0008] In view of this, the purpose of this invention is to provide a product management document delivery method, apparatus, device, and medium based on chain of responsibility and context maintenance. This method binds the seven-stage chain of responsibility with gating identifiers, context keys, and nested field point-based paths in three layers, and synchronously outputs machine-readable structured diagnostics when gating fails. Compared to existing solutions that only return a boolean failure flag, this significantly shortens maintenance location time and reduces the risk of false readiness. The specific solution is as follows: Firstly, this application discloses a product management document delivery method based on chain of responsibility and context maintenance, including: The product management document delivery process is set to a target number of responsibility chain stages, and a gate control identifier is configured for each of the responsibility chain stages. The responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving. Each of the responsibility chain stages generates a corresponding product management document. Configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility. After the current chain of responsibility phase is completed, based on the target key path set corresponding to the gate identifier of the current chain of responsibility phase, determine whether the outermost key name specified by the target key path set in the project context exists, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target nested path corresponding to the target key path set exists. If both exist, the product management document corresponding to the current responsibility chain stage is written into the project context. The next responsibility chain stage is determined based on the read responsibility chain stage transition table and the current responsibility chain stage. The current responsibility chain stage is updated to the next responsibility chain stage, and the updated current responsibility chain stage is executed. After reaching the archiving responsibility chain stage, the product management documents in the project context are identified as delivery documents and output.

[0009] Optionally, after the scenario reconstruction chain of responsibility phase is completed, the following may also be included: Read the scene graph output data from the project context of the current chain of responsibility stage; The scene graph output data is subjected to a six-element integrity check; the six elements include triggering conditions, user roles, data flow, result confirmation, exception handling, and subsequent records. When any of the six elements has a field value that is missing or empty, the element is marked as a missing element, and a corresponding Chinese follow-up question text is generated for each missing element. Record the names of each missing element and the corresponding Chinese follow-up questions for that missing element as a list of missing element details; Write the missing element details list and the corresponding six-element integrity verification results into the project context of the current chain of responsibility phase; The triggering condition, the user role, and the data flow are first-level elements, while the result confirmation, the exception handling, and the subsequent records are second-level elements. The level of the blocking reason generated when the first-level element is missing is higher than the level of the blocking reason generated when the second-level element is missing.

[0010] Optionally, after the requirements document generation and chain of responsibility phase is completed, the following may also be included: Perform a redline scan on the product management documents generated at the current stage of the chain of responsibility; the redline scan includes matching at least one regular expression rule and counting the number of violations at a preset first level and a preset second level; the severity of the violation at the preset first level is higher than the severity of the violation at the preset second level. If both the number of violations at the preset first level and the number of violations at the preset second level are zero, then the red line scan is confirmed as true by the flag. Otherwise, the red line scan pass flag is identified as false, and the red line scan failure is written into the blocking reason; Perform functional acceptance verification on the product requirements document generated at the current stage of the chain of responsibility to check whether each functional requirement contains acceptance criteria, acceptance conditions, or a given-if-then-if structure. If so, then the function acceptance verification passed flag will be set to true; Otherwise, the "Functional Acceptance Verification Passed" flag will be marked as false. The key path set corresponding to the gate identifier in the chain of responsibility stage of the requirement document generation also includes nested paths for determining whether the red line scan pass flag and the function acceptance verification pass flag are true. Accordingly, after the document review responsibility chain phase is completed, it also includes: The readiness score of the audit report generated at the current stage of the responsibility chain is calculated based on preset scoring rules, and the readiness score is written into the project context of the current stage of the responsibility chain. The readiness score is a numerical score that quantifies whether the document quality has reached the level of delivery readiness. The preset scoring rules include: if there are a first number of preset first-level issues in the audit report, the current score is determined by the difference between the preset baseline value of the readiness score and the first number of first scores; if there are a second number of preset second-level issues in the audit report, the current score is determined by the difference between the current score and the second number of second scores; the current score is determined as the readiness score; wherein, the preset first level is higher than the preset second level; the first score is greater than the second score. If the redline scan pass flag in the project context corresponding to the current chain of responsibility stage is false, then the highest score of the readiness score of the audit report will be directly controlled to be less than the third score. The set of key paths corresponding to the gate identifier in the document review responsibility chain stage also includes nested paths used to check whether the ready score in the predetermined key path is greater than or equal to a preset score threshold.

[0011] Optionally, during the execution of the current phase of the chain of responsibility, the following may also be included: Invoke the main skill of the current chain of responsibility stage; the main skill is the large language model invocation task that generates the structured output object of the current chain of responsibility stage. After the main skill call returns, check whether the project context of the current chain of responsibility stage contains the pre-defined structured output object for the current chain of responsibility stage; If not, the backup skills of the current responsibility chain stage are sequentially invoked, the structured output of the backup skills is written into the project context of the current responsibility chain stage, and the process of the current responsibility chain stage continues to be executed; the backup skills are alternative large language model invocation tasks of a different type from the main skills. If neither the primary skill nor any of the backup skills in the current chain of responsibility phase have generated the structured output object pre-defined for the current chain of responsibility phase, then the operation marking the completion of the current chain of responsibility phase will not be executed, and a list of missing required field names in the structured output object pre-defined for the current chain of responsibility phase will be output.

[0012] Optionally, before executing the current chain of responsibility phase, the following may also be included: Obtain the input text of the current stage of the chain of responsibility, and determine whether the number of characters in the input text is less than a preset character threshold; If so, skip the skill call in the current chain of responsibility stage, set the input quality inadequate flag, and return the diagnostic result for the input quality inadequate type; Load the role constraint document; the role constraint document includes an identity description, a set of principles, a scope definition, and delivery criteria; wherein, the identity description is used to define the role positioning of the agent in the current chain of responsibility stage; the agent is a computer program entity that executes the tasks of the current chain of responsibility stage and generates structured output objects based on a large language model; the set of principles contains several behavioral guidelines; the scope definition is used to define the business boundaries processed in the current chain of responsibility stage; the delivery criteria are used to define the quality requirements of the outputs of the current chain of responsibility stage; Select a subset of target principles from the set of principles based on the Chinese keywords of the current chain of responsibility stage; Based on the target order, the identity description, the subset of target principles, the scope definition, and the delivery criteria are assembled into a prompt word. Based on the prompt word, the large language model is invoked to execute the task of the current chain of responsibility stage, and the structured output object returned by the large language model is written into the project context of the current chain of responsibility stage.

[0013] Optionally, after determining whether the outermost key name specified by the target key path set exists in the project context, and whether each target subkey name specified by the target nested path exists when the target parent key name specified by the target nested path corresponding to the target key path set exists, the method further includes: If any item is missing, the current chain of responsibility stage is maintained, and the target information and the blocking reason generated based on the target information and the gating identifier corresponding to the current chain of responsibility stage are output; the target information includes the outermost key name that is judged to be missing and the target nested path that is judged to be missing.

[0014] Optionally, the method further includes: If persistent storage of the project context at the current stage of the chain of responsibility is required, check the state of the encrypted environment variable switch; If the encryption environment variable switch is enabled and the symmetric encryption key exists, the project context of the current chain of responsibility stage is serialized to obtain a byte stream. The byte stream is then symmetrically encrypted based on the symmetric encryption key, and the corresponding encrypted byte stream is written to the persistent storage area. If the encryption environment variable switch is turned on, but the symmetric encryption key does not exist, a key missing error message will be returned directly. If the encrypted environment variable switch is turned off, the project context of the current chain of responsibility stage is directly serialized to obtain a byte stream, and the byte stream is written to the persistent storage area.

[0015] Secondly, this application discloses a product management document delivery apparatus based on chain of responsibility and context maintenance, comprising: The gating identifier configuration module is used to set the product management document delivery process to a target number of responsibility chain stages, and to configure gating identifiers for each of the responsibility chain stages; the responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving; each of the responsibility chain stages generates a corresponding product management document; The key path set configuration module is used to configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility. The judgment module is used to determine, after the current chain of responsibility stage is completed, whether the outermost key name specified by the target key path set in the project context exists, based on the target key path set corresponding to the gate identifier of the current chain of responsibility stage, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target nested path exists. The update module is used to, if all exist, write the product management document corresponding to the current responsibility chain stage into the project context, determine the next responsibility chain stage based on the read responsibility chain stage transfer table and the current responsibility chain stage, update the current responsibility chain stage to the next responsibility chain stage, and execute the corresponding updated current responsibility chain stage. The delivery document determination module is used to determine and output the product management documents in the project context as delivery documents after execution reaches the archiving responsibility chain stage.

[0016] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute computer programs to implement the steps of the product management document delivery method based on chain of responsibility and context maintenance, as described above.

[0017] Fourthly, this application discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the product management document delivery method based on chain of responsibility and context maintenance as described above.

[0018] This application first sets the product management document delivery process as a target number of responsibility chain stages, and configures a gate identifier for each of the responsibility chain stages. The responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary management, document review, and archiving. Each responsibility chain stage generates a corresponding product management document. A corresponding key path set is configured for each gate identifier. The key path set includes the outermost key name of the project context and nested paths formed by connecting parent and child key names according to preset punctuation marks. The project context is used to store the structured data produced by each responsibility chain stage. After the current responsibility chain stage is completed, the target corresponding to the gate identifier of the current responsibility chain stage is determined. The key path set is used to determine whether the outermost key name specified by the target key path set exists in the project context, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target key path set exists. If both exist, the product management document corresponding to the current responsibility chain stage is written into the project context. The next responsibility chain stage is determined based on the read responsibility chain stage transition table and the current responsibility chain stage. The current responsibility chain stage is updated to the next responsibility chain stage, and the updated current responsibility chain stage is executed. After execution reaches the archiving responsibility chain stage, the product management document in the project context is determined as the delivery document and output. It can be seen that this application, by encoding the business semantics, i.e., the seven-stage product management responsibility chain, into a constraint on the project context key, and by binding the gate identifier with the outermost key name and the nested field dot-matrix path in a two-layer manner, enables the gate determination to directly locate the specific missing field. Compared to existing technologies that only determine whether the preceding stage has been executed, this application can perform deterministic verification on the completeness of the structured data produced by the stage before the stage transition, thereby preventing automatic advancement based on incomplete data; compared to existing technologies that only return a boolean failure when gating fails, this application generates a list of missing keys and missing nested fields simultaneously in the same gating decision, so that operation and maintenance can locate the items to be filled without a full scan of the context, and it can be inferred that the manual location time for gating failure can be significantly shortened. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0020] Figure 1 This application discloses a flowchart of a product management document delivery method based on chain of responsibility and context maintenance. Figure 2 This application discloses a two-layer audit gating timing diagram; Figure 3 This is a schematic diagram of the structure of a product management document delivery system based on chain of responsibility and context maintenance disclosed in this application; Figure 4 This is a schematic diagram of a product management document delivery device based on chain of responsibility and context maintenance disclosed in this application. Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] One existing technology employs a multi-stage agent workflow using hard-coded system prompts, linear phase progression, optional unified document checks, and plaintext project context. This approach writes fixed system prompts, role descriptions, and tool lists into memory upon agent startup, with subsequent stages sharing the same prompts. It sequentially calls large language models or skills in a predetermined order, writing the output into the project context. Phase transitions only check if the preceding stage has been executed, without reading predetermined context keys or nested field paths bound to gating identifiers. After some stages, a compliance or format check is performed on the generated document, outputting pass or fail, without distinguishing between severe compliance blocking and delivery readiness deductions, and without structurally writing the check results into the gating fields. If the check fails, only a boolean failure or natural language error summary is returned to the user, without listing missing context keys, nested field paths, or a list of operable blocking reasons. Skill success is judged by whether the large language model call throws an exception or returns an empty text, with no automatic degradation mechanism for primary / backup skills. To address the aforementioned technical issues, this application discloses a product management document delivery method, apparatus, equipment, and medium based on chain of responsibility and context maintenance. This method can bind a seven-stage chain of responsibility with a three-layer structure of gating identifiers, context keys, and nested field point-based paths. When gating fails, it synchronously outputs machine-readable structured diagnostics. Compared to existing solutions that only return a boolean failure flag, this method significantly shortens maintenance location time and reduces the risk of false readiness.

[0023] To facilitate understanding of the embodiments of this invention, some terms used herein will be explained first. Intelligent agent refers to an automated software entity that uses a large language model as its core, invokes skills according to a predetermined business process, and reads and writes project context. Chain of responsibility refers to a processing flow consisting of multiple sequentially arranged business stages, each stage having predefined skill mappings, gating identifiers, and stage transition rules. Chain of responsibility stage refers to an ordered business link in the product management and delivery process. Gating identifier refers to the name of a quality checkpoint executed before a stage transition, bound to a specific chain of responsibility stage, used to determine whether entry into the subsequent stage is allowed. Project context refers to a globally shared key-value state set across stages, persisted in a data directory divided by project identifiers, for gating judgment and skill reading / writing. Declarative identity constraint refers to a method of parsing identity, principles, scope, delivery standards, and other information from a structured role constraint document and injecting corresponding constraints before each large language model invocation. Six elements refer to the six necessary elements for business link integrity verification: triggering conditions, user roles, data flow, result confirmation, exception handling, and subsequent recording. Red-line scanning refers to blocking detection of serious compliance risks in delivered documents; yellow-line scanning refers to non-blocking detection of delivery readiness issues, outputting a readiness score from zero to one hundred. Gated structured failure diagnosis refers to the synchronous return of structured information such as a list of missing context keys, a list of missing nested field paths, and a list of blocking reasons when gating fails. Output contract degradation refers to the process of automatically switching to a backup skill and retrying gating judgment when a pre-defined structured output object is not produced by the primary skill.

[0024] See Figure 1 As shown, this embodiment of the invention discloses a product management document delivery method based on chain of responsibility and context maintenance, including: Step S11: Set the product management document delivery process to a target number of responsibility chain stages, and configure gate control identifiers for each responsibility chain stage; the responsibility chain stage includes requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving; each responsibility chain stage generates a corresponding product management document.

[0025] In this embodiment, seven responsibility chain phases are used as unique phase identifier sources for the application programming interface (API), and each phase is bound to an independent gating identifier, forming a one-to-one mapping table between phases and gating. The phase enumeration values ​​include: requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review, and archiving. For example, the gating identifiers for the seven phases are as follows: the requirement mining phase is bound to a sufficient input quality gating; the scenario reconstruction phase is bound to a complete chain gating; the requirement document generation phase is bound to a red line passing gating; the quotation organization phase is bound to a quotation confirmation gating; the contract boundary phase is bound to a clear contract boundary gating; the document review phase is bound to a ready score passing gating; and the archiving phase is bound to an archiving confirmation gating. This mapping table is stored in the configuration area of ​​the responsibility chain module for read-only querying by the gating determination module.

[0026] It should be noted that the number and names of the chain of responsibility stages in this step can be implemented in several ways. One implementation is to target seven stages, with the names of each stage as described above. Another implementation is to further divide a stage into multiple sub-stages or merge adjacent stages, depending on the deployment environment. In this case, the target number changes accordingly, but enumeration is still used as the unique source of stage identifiers.

[0027] In this way, existing technologies hardcode the stage order into the script, while this application uses enumeration and mapping table as the single source of truth. Based on this, it can be inferred that when adding or adjusting gating, only the configuration items need to be added or modified without changing the orchestration main loop, thereby reducing the coupling cost of stage expansion.

[0028] Step S12: Configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility.

[0029] In this embodiment, a two-layer gating configuration data structure is formed by registering the top-level context key list and the nested field point path list required for each gating identifier. Specifically, the top-level keys include input quality fields, integrity verification objects, red line scan objects, quotation confirmation flags, contract boundary clarity flags, and readiness score values; the nested paths include integrity verification pass flags, red line scan pass flags, and functional acceptance verification pass flags, which are formed by connecting parent key names and child key names with preset punctuation marks. In one implementation, the preset punctuation marks are dots, for example, the pass flag for the red line scan object is represented as the red line scan point pass flag. The configuration is stored in the form of triples, that is, the gating identifier points to a decision function reference and points to a key path set, which is composed of the top-level key list and the nested path list.

[0030] It should be noted that there are multiple ways to implement the preset punctuation marks. In addition to the period, slashes, colons or other conventional separators can also be used, as long as they can unambiguously express the hierarchy between the parent key name and the child key name.

[0031] Step S13: After the current chain of responsibility phase is completed, based on the target key path set corresponding to the gate identifier of the current chain of responsibility phase, determine whether the outermost key name specified by the target key path set in the project context exists, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target nested path corresponding to the target key path set exists.

[0032] In this embodiment, after the responsibility chain module completes its current stage, it flattens the project context into a dictionary, reads the target key path set corresponding to the current stage's gate identifier, and then performs two types of judgments. The first type of judgment targets the outermost key name, traversing each top-level key in the target key path set. If the top-level key does not exist in the project context, it is added to the outermost key name that is judged to be non-existent. The second type of judgment targets nested paths, parsing the target parent key name and target child key name for each target nested path according to preset punctuation marks. First, it checks whether the target parent key name exists. If the target parent key name exists, it further checks whether each target child key name exists and whether its value is valid. If the target parent key name exists but the target child key name does not exist or its value is false, the complete target nested path is added to the target nested path that is judged to be non-existent.

[0033] It is worth emphasizing that in the second type of judgment, when the target parent key name exists but the target child key name is invalid, the complete dot-matrix path is written instead of just reporting a missing parent key. For example, when the red-line scan object has been written as the top-level key in the project context, but its flag child key is missing, this application writes the complete path of the red-line scan point through the flag into the target nested path that is judged to be non-existent, instead of just reporting a missing red-line scan object. Compared to existing technologies that only check whether the top-level key exists, this application provides finer-grained localization for scenarios where the parent key exists but the child key is missing. Based on this, it can be inferred that operations and maintenance can directly locate the specific subfield that needs to be completed without having to check each item in the parent object, thereby improving the recall rate of nested path diagnosis. In addition, the judgment function is implemented in the form of a pure function, with a flattened context dictionary as input and a boolean flag and diagnostic information as output, thus ensuring that the judgment result is reproducible under the same input.

[0034] Step S14: If both exist, write the product management document corresponding to the current responsibility chain stage into the project context, determine the next responsibility chain stage based on the read responsibility chain stage transition table and the current responsibility chain stage, update the current responsibility chain stage to the next responsibility chain stage, and execute the corresponding updated current responsibility chain stage.

[0035] In this embodiment, when both the outermost key name and the target subkey name exist, the current stage gating is considered successful. The product management document generated in the current stage is written into the project context, and the responsibility chain stage transition table is read to determine the next stage. The responsibility chain stage transition table is the single true source of the directed transition relationship between stages. It should be noted that stage transitions can be implemented in multiple ways. In one implementation, the transition is linear with a single exit, meaning each stage has only one successor. In another implementation, the requirements document generation stage has two exits, with its successor containing both the quotation organization and contract boundary identifiers. The host initiates stage execution requests separately, and both share the same project context persistent directory, thus advancing the quotation and contract boundary branches in parallel. Compared to existing technologies that only support linear advancement, this application supports parallel branch topology through a transition table-driven approach. Therefore, it can be inferred that the quotation and contract boundary can be expanded simultaneously after the requirements document is ready without blocking each other.

[0036] Additionally, after determining whether the outermost key name specified by the target key path set exists in the project context, and whether each target subkey name specified by the target nested path exists when the target parent key name specified by the target nested path corresponding to the target key path set exists, if any item does not exist, the current chain of responsibility stage is maintained, and the target information and the blocking reason generated based on the target information and the gating identifier corresponding to the current chain of responsibility stage are output; the target information includes the outermost key name that is determined to not exist and the target nested path that is determined to not exist.

[0037] In this embodiment, when the outermost key name or target subkey name is missing, the gating is deemed to have failed, the current stage is maintained and no further progress is made, and the subsequent stage list is empty, thus preventing automatic progress. Simultaneously, target information and the reason for the blockage are output. The target information consists of the aforementioned lists of the outermost key name and the nested target path that were determined to be non-existent; the reason for the blockage is generated based on the target information and the current stage gating identifier, using a format of gating name plus a human-readable description for easy interface display. It should be noted that missing top-level keys and missing nested fields are collected separately and not merged into a single string, allowing the host to generate completion lists for the two types of repairable paths separately. Compared to existing technologies that only return a boolean failure or a natural language error summary when gating fails, this application generates a structured diagnosis with three fields—a missing key list, a missing nested field path list, and a blockage reason list—simultaneously within the same gating determination. Based on this, it can be inferred that maintenance personnel can directly locate the item to be repaired based on the three diagnostic fields without needing to fully scan the context or repeatedly execute stages, thereby shortening the manual location time for gating failures.

[0038] Furthermore, the generation of the three diagnostic fields and the gating determination are completed within the same transactional call, avoiding the need to read intermediate context. In one implementation, when the gating configuration itself is not registered, the blocking reason list includes a description of the gating configuration not being registered, thereby distinguishing between configuration loss and data loss issues.

[0039] Step S15: After reaching the archiving responsibility chain stage, the product management documents in the project context are identified as delivery documents and output.

[0040] In this embodiment, once the chain of responsibility advances to the archiving stage and passes the archiving confirmation gate, the product management documents accumulated in each stage of the project context are identified as deliverable documents and output. Thus, the entire chain from requirement discovery to archiving is driven by stage-specific gating constraints at each decision point, progressing only when the gating is passed. This achieves fully automated quality assurance from vague requirements to deliverable project solutions without requiring manual item-by-item review. Compared to existing technologies that only determine whether the preceding stage has been executed during stage transitions, this method performs deterministic verification of the completeness of structured data before each stage transition and provides actionable diagnostics in case of failure. This indicates that the quality consistency of deliverable documents is improved, and the automated pipeline is less likely to degenerate into semi-automation due to missing intermediate data.

[0041] As can be seen, this application encodes the business semantics, i.e., the seven-stage product management responsibility chain, into constraints on the project context key, and performs a two-layer binding of the gating identifier with the outermost key name and nested field dot-mapping paths. This invention enables gating decisions to directly locate specific missing fields. Compared to existing technologies that only determine whether the preceding stage has been executed, this application can perform deterministic verification on the completeness of the structured data produced by the stage before the stage transition, thereby preventing automatic advancement based on incomplete data. Compared to existing technologies that only return a boolean failure when gating fails, this application simultaneously generates a list of missing keys and missing nested fields within the same gating decision, allowing maintenance personnel to locate the missing items without a full scan of the context. Therefore, it can be inferred that the manual location time for gating failures can be significantly shortened.

[0042] In one specific embodiment, after the scene reconstruction responsibility chain stage is completed, the embodiment of the present invention further includes a six-element integrity check of the scene graph output data, in order to transform the business link integrity from implicit information scattered in natural language into a structured Boolean signal that can be used as a gating input.

[0043] Specifically, this implementation reads the scene graph output data from the current stage project context and performs a six-element integrity check on the data. The six elements include triggering conditions, user roles, data flow, result confirmation, exception handling, and subsequent records. The check adopts a non-empty rule for each element, that is, for each element, it checks whether its corresponding field value exists or is empty; when any element's field value does not exist or is empty, the element is marked as a missing element, and a corresponding Chinese follow-up text is generated for each missing element. Then, the name of each missing element and its Chinese follow-up text are recorded as a missing element details list. The missing element details list and the corresponding six-element integrity check results are written into the current stage project context, where the integrity check pass flag is equal to the number of missing elements being zero. The written integrity check pass flag serves as the reading input for the link integrity pass gate in the scene restoration stage, that is, the nested path of the integrity check point pass flag in the key path set corresponding to the gate identifier in the aforementioned step S13.

[0044] Furthermore, the six elements are divided into different levels. Triggering conditions, user roles, and data flow are level 1 elements, while result confirmation, exception handling, and subsequent recording are level 2 elements. The blocking cause level generated when a level 1 element is missing is higher than the blocking cause level generated when a level 2 element is missing. Thus, the core and auxiliary elements of the main link are assigned different severity levels when missing, allowing the host to prioritize the completion accordingly.

[0045] It should be noted that there are several ways to generate Chinese follow-up questions. One approach is to pre-define a fixed follow-up question template for each element; for example, if a trigger condition is missing, one could ask what event or condition triggered the function. Another approach is to dynamically fill in the follow-up text by combining it with existing scene fragments, making the follow-up questions more relevant to the specific context. Furthermore, when the scene graph output data is entirely missing, as a boundary-based approach, all six elements are included in the missing list, thus providing a complete list of missing elements.

[0046] In this way, the six elements are mapped to structured verification objects and bound to the gating of the scenario reconstruction stage. From this, we can infer: First, the integrity of the link becomes an automatically judgeable Boolean signal rather than a manual check item; integrity gaps are exposed during the scenario reconstruction stage, rather than being discovered only during manual review in the audit stage. Second, since the gating in the requirements document stage relies on the integrity verification pass flag, the requirements document stage will no longer deduce the functional scope based on incomplete scenarios. This shifts the change costs caused by missing scenarios from the audit stage to the scenario reconstruction stage, reducing the scale of rework later. Compared to the general solution of direct scoring by a large language model, this implementation method uses rule-based element-by-element non-empty verification, whose judgment results are deterministic and reproducible in continuous integration, resulting in a stronger compliance audit chain.

[0047] In one specific embodiment, after the requirement document generation responsibility chain stage is completed, the embodiment of the present invention also includes a redline scan of the product management document and a functional acceptance verification of the product requirement document, thereby expanding the requirement document stage gate control from a single compliance dimension to a dual-dimensional verification of compliance scanning and functional acceptability.

[0048] Specifically, the redline scan matches at least one regular expression rule to the product management documents generated in the current stage, counts the number of violations at the preset first level and the number of violations at the preset second level, where the severity of the first-level violation is higher than that of the second-level violation. If both the first-level and second-level violations are zero, the redline scan is marked as true; otherwise, it is marked as false, and the reason for failure is written as the blocking reason. For example, the rule categories for the redline scan may include four types: internal pricing leakage, sensitive information, over-promising, and technical detail leakage, and the detection is performed on the body of the delivered document using line-by-line regular expression matching.

[0049] Meanwhile, the functional acceptance verification checks each item in the product requirement document generated at the current stage to see if each functional requirement contains acceptance criteria, acceptance conditions, or a given-if-then structure. If it does, the functional acceptance verification pass flag is set to true; otherwise, it is set to false. It should be noted that the key path set corresponding to the gate identifier in the requirement document generation stage also includes nested paths used to determine whether both the red line scan pass flag and the functional acceptance verification pass flag are true. That is, in the aforementioned step S13, in addition to the outermost key existence judgment, the gate also needs to judge the two nested paths of the red line scan point pass flag and the functional acceptance verification point pass flag respectively. If either one is false, the gate fails, and the blocking reason list describes the compliance gap and the acceptability gap respectively.

[0050] It should be noted that the rule set for redline scanning can be implemented in several ways. One approach is to use a fixed, full rule set that applies consistently across all stages. Another approach is to select subsets of the rule set based on stage identifiers, thereby applying different sets of sensitivity patterns to different stages. Similarly, the criteria for functional acceptance testing can also be implemented in various ways. Besides checking for the presence of acceptance standards, acceptance conditions, or a given-if-then-if structure, it can also check whether each functional requirement is bound to measurable acceptance metrics.

[0051] Compared to existing technologies that perform only a single compliance or format check on the document without distinguishing dimensions, this implementation method requires both compliance scanning and functional acceptability to pass during the requirements document stage gating. Therefore: First, regular expression red lines can only detect prohibited words and sensitive patterns, and cannot guarantee that every functional requirement has an acceptable standard. With the addition of functional acceptance verification, situations where the red lines pass but functional items lack acceptance standards will be blocked by the gating. Second, because acceptability gaps are exposed and blocked at the requirements document stage, customer acceptance disputes are moved from the review stage to the requirements document stage, thereby reducing the probability of disputes at the delivery end due to missing acceptance standards. Compared to returning compliance check results in natural language, this implementation method binds the two pass flags to the gating in a nested path format, allowing the check results to be directly consumed by the gating.

[0052] In one specific embodiment, after the document review responsibility chain phase is completed, such as Figure 2 As shown, the embodiments of the present invention also include calculating the readiness score of the review report based on preset scoring rules, and using the readiness score to drive the document review stage gating, thereby quantifying the delivery readiness from a binary conclusion of pass or fail into a continuous value.

[0053] Specifically, the readiness score is a numerical score that quantifies whether a document's quality has reached the level of delivery readiness. The preset scoring rules include: starting with a preset readiness score baseline value, if the review report contains a first number of preset first-level issues, the difference between the baseline value and the first number of first scores is determined as the current score; if the review report contains a second number of preset second-level issues, the difference between the current score and the second number of second scores is determined as the current score; the final current score is determined as the readiness score. The preset first-level level is higher than the preset second-level level, and the first score is greater than the second score. For example, the baseline value is one hundred, five points are deducted for each first-level issue, and two points are deducted for each second-level issue. The calculated readiness score is written into the current stage project context as the input for the readiness score compliance gate control during the document review stage.

[0054] Furthermore, if the red line scan pass flag in the current project context is false, the highest ready score in the audit report is directly controlled to be less than the third score. For example, the third score is forty; that is, regardless of the original score calculated according to the deduction rules, the ready score is clamped to below forty when the red line fails to pass. The key path set corresponding to the document audit stage gating identifier also includes nested paths used to check whether the ready score is greater than or equal to a preset scoring threshold. For example, the preset scoring threshold is eighty. Thus, although the yellow line scan is a non-blocking write, the audit gating still forces the reading of this numerical threshold, forming a two-layer semantic structure where warnings can accumulate and audits have hard thresholds.

[0055] In this way, the review stage of this application has quantifiable room for improvement. Documents with only formatting or readiness defects can enter the repair loop and be evaluated for improvement through further deduction of points, rather than being directly judged as fatal obstacles. Secondly, by clamping the readiness score below the third score when the red line is not passed, it can intercept the situation where a high readiness score masks serious compliance issues. Even if a document has an original score higher than the threshold due to good readiness, as long as it fails the red line, its readiness score will be clamped below the threshold and it will not pass the review gate. Thus, samples that fail the red line but have an original score higher than the yellow line will still fail at the review gate. Compared to conflating the review conclusion with the compliance conclusion into a single failure indicator, this application assigns serious compliance issues and readiness defects to different judgment semantics and different stages of gate control, avoiding mutual masking between the two.

[0056] In one specific embodiment, during the execution of the current chain of responsibility phase, the present invention also includes structured output contract determination and degradation of primary and backup skills to intercept silent failures where communication is successful but the structured object is missing.

[0057] Specifically, during the execution of the current stage, the primary skill for that stage is invoked. The primary skill is the large language model invocation task that generates the structured output object for the current stage. After the primary skill invocation returns, it checks whether the pre-defined structured output object exists in the current stage's project context. If it does not exist, the backup skills for the current stage are invoked sequentially, and their structured outputs are written into the current stage's project context. The current stage's process continues, and the backup skills are alternative large language model invocation tasks of a different type from the primary skill. If neither the primary skill nor any of the backup skills in the current stage generate the pre-defined structured output object, the operation marking the completion of the current stage is not performed, and a list of missing required field names in the pre-defined structured output object is output. For example, the requirement mining stage requires the requirement mining structured output object to be non-empty, and the scene reconstruction stage requires the scene graph output object to be non-empty.

[0058] In one specific embodiment, the field composition and type constraints of the structured output objects for each of the aforementioned seven chain of responsibility stages (requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review, and archiving) are shown in Tables 1 to 7 below. The field names of the required fields in each table constitute the source of the outermost key name or nested path checked by the key path set corresponding to the gate identifier in step S13 above; the "Type" column declares the value type of each field; the field names, types, and meanings listed in the tables are the pattern definitions that are jointly based on the prompt word format constraint section field list and the structured parsing field verification steps.

[0059] 1. The required fields and type constraints corresponding to the structured output object name "Requirement Mining Structured Output Object" are shown in Table 1: Table 1 Required fields and type constraints of structured output objects from requirement mining

[0060] Optional fields (example): Original input summary (string), extracted entity list, confidence level (numerical), list of used skill names, etc.

[0061] Writing and Gating: The entire object is written to the structured output object key of the requirements mining; simultaneously, the input quality is written to the top-level input quality key for reading in step S13. If parsing fails, the above key is not written, and if both primary and backup fail, the missing field names such as input quality, clarification question list, and role analysis list are added to the list of missing required field names.

[0062] 2. The required fields and type constraints for the structured output object name "Scene Graph Output Object" are shown in Table 2: Table 2 Required fields and type constraints for scene graph output objects

[0063] Derived gating object: After the scene graph is written, perform a six-element integrity check to generate an integrity check object, which must contain a Boolean pass flag; if an element is missing, write a list of missing element details (including element name and Chinese follow-up text). Step S13 reads the nested path integrity check pass flag.

[0064] 3. Requirements document generation phase: Structured output / phase deliverables: Product management requirements document body (text), and structured result objects written by rule scanning, as shown in Table 3: Table 3. Structured fields related to gating

[0065] The gating red line requires both of the above-mentioned passing flags to be true. The main body of the requirements document itself can be written into the context as a deliverable; gating does not depend on whether the natural language of the main body looks complete, but on the above-mentioned structured flags.

[0066] 4. The required fields and type constraints for the structured output object name "Quote Structure Object" are shown in Table 4: Table 4 Required fields and type constraints for quotation structure objects

[0067] 5. The required fields and type constraints corresponding to the structured output object name "Contract Boundary Phase" are shown in Table 5: Table 5 Required Fields and Type Constraints at Contract Boundary Stages

[0068] 6. The required fields and type constraints corresponding to the structured output object name "Document Review Stage" are shown in Table 6: Table 6 Required fields and type constraints during the document review stage

[0069] Gating readiness score meets the standard: readiness score value ≥ preset score threshold (Example 80).

[0070] 7. The required fields and type constraints for the structured output object name "Archiving Stage" are shown in Table 7: Table 7 Required fields and type constraints during the archiving phase

[0071] In this embodiment, the archiving confirmation flag can be given directly by a structured JSON field, or set by the orchestration layer after the valid delivery list / archiving description of the archiving skill output.

[0072] Additionally, when it is necessary to output a list of missing required field names from the structured output object predefined for the current chain of responsibility stage, it should be generated according to the following rules: Retrieve the set of required fields from the current stage field definition table; Each parsed object (or all objects if none exist) is checked: if the key does not exist, the value is a null reference, the type does not match, or the enumeration is out of bounds, the field name is added to the list. During the scene reconstruction stage, the names of missing elements determined by the integrity check among the six elements can also be added to the list; This list, along with the list of missing outermost key names, the list of missing nested paths, and the list of blocking reasons from step S13, is returned to the host for display and completion.

[0073] It is worth emphasizing that in this implementation, contract determination takes precedence over the communication layer success flag. Even if the main skill's large language model call returns success and non-empty text at the communication layer, if the pre-defined structured output object for the stage is not written into the project context, the contract is still considered unsatisfactory, and the backup skill is triggered. This prevents silent failures where the communication layer returns success but the structured object is missing from being mistakenly judged as stage completion. The existence of the structured output object can be checked using key existence in constant time complexity. After degradation, the gating check is called again, and the number of contract failures can be written into the stage output for auditing.

[0074] In addition, the determination of structured output objects can be carried out by either a lightweight key existence determination or by performing full schema verification on the stage structured output. The latter has stricter constraints on type and required fields, but the schema maintenance cost increases as the stage objects expand.

[0075] In this way, this application shifts the success criterion for skills to whether the structured output contract is satisfied. Therefore, scenarios where communication is successful but the structured object is missing will be identified as contract failure, preventing the stage from being mistakenly marked as complete and avoiding the risk of pseudo-readiness in subsequent stages based on non-existent structured data. Furthermore, when the contract is not satisfied, an automatic fallback path of sequentially calling backup skills is provided. Based on this, it can be inferred that in scenarios where the main skill's structured output is missing, a structured object satisfying the contract may still be produced after fallback by the backup skill, thus increasing the final pass rate of gating in such scenarios. When both the main and backup skills fail, a list of missing required field names is output, distinguishing between skill execution anomalies and missing structured contracts, facilitating manual completion or adjustment of skill prompts.

[0076] In one specific embodiment, before executing the current chain of responsibility phase, the present invention further includes short input skip decision and declarative identity constraint injection to avoid ineffective computational consumption of extremely short inputs and to make each large language model call carry behavioral constraints that match the semantics of the current phase.

[0077] Specifically, before the execution phase, the input text for the current phase is obtained, and it is determined whether the number of characters in the input text is less than a preset character threshold. If it is less, the skill call for the current phase is skipped, an input quality insufficiency flag is set, and a diagnostic result for the input quality insufficiency type is returned. For example, the preset character threshold is fifty characters. As a boundary implementation method, when the length of the input text is exactly equal to the threshold, it is treated as not less than the threshold, and the skill call is still executed.

[0078] When the input text is not less than a threshold, a role constraint document is loaded. This document includes an identity description, a set of principles, a scope definition, and delivery criteria. The identity description defines the role of the agent in the current stage. The agent is a computer program entity that executes the current stage's tasks and generates structured output objects based on a large language model. The set of principles contains several behavioral guidelines. The scope definition defines the business boundaries of the current stage's processing. The delivery criteria define the quality requirements of the current stage's output. Subsequently, a subset of target principles is selected from the set of principles based on the current stage's Chinese keywords. The identity description, the subset of target principles, the scope definition, and the delivery criteria are then assembled into a prompt based on the target order. Based on this prompt, the large language model is invoked to execute the current stage's tasks, and the returned structured output objects are written into the current stage's project context. For example, the target order is: identity description first, followed by the subset of target principles, the scope definition, and the delivery criteria, separated from the skill text by a separator line. In one implementation, the number of scope definition entries is controlled to be no more than twenty-four, and the subset of target principles is controlled to be no more than ten per stage. When invoking a large language model based on prompt words to execute the task of the current stage of the chain of responsibility, in addition to assembling the identity description, subset of target principles, scope definition, and delivery criteria into a prompt word prefix in the order of the targets, a structured output format constraint segment for the current stage is also appended to the prompt word. This format constraint segment includes at least: Output carrier constraints: The large language model is required to return a predefined structured output object for the current stage as machine-parseable structured text; in a preferred embodiment, the structured text is a JSON (JavaScript Object Notation) object. One of the following two valid return formats is allowed: Form A: The entire reply consists of a single JSON object; Form B: The reply text can be a natural language description, but a unique Markdown fence code block must be given at the end of the text. The code block language tag is json, and the code block contains only the JSON object and no other text.

[0079] Field list constraint: The prompt word explicitly lists the required field names, meanings, and value types / enumerations of the structured output objects at the current stage, and declares that "the above required fields cannot be omitted when only natural language summaries are output".

[0080] Integrity constraint: When multiple skills are called sequentially within the same chain of responsibility phase, each round of calling must return a complete structured output object (including the merged result of fields confirmed in previous rounds). It is prohibited to return only the incremental fields of the current round, so as to avoid the loss of required fields due to overwriting in the next round.

[0081] Connection with delivery standards: The delivery standards section declares quality requirements; the format constraints section declares resolvable shapes. After being concatenated and injected, they are separated from the skill text by a separator line.

[0082] Therefore, those skilled in the art can clearly understand that structured output objects are not generated solely by the model "consciously," but rather their format is constrained by three types of constraints: the carrier form, the field list, and the completeness of the prompt words.

[0083] In addition, after the large language model calls and returns text, the proxy orchestration module performs a structured parsing pipeline on the returned text before deciding whether to write it into the project context and whether to trigger backup skills. The specific steps are as follows: 1. Try the following strategies sequentially on the returned text, and stop when any strategy successfully yields a JSON value: Strategy 1 (Fence Extraction): Identify Markdown fence code blocks (optional language tag JSON) using regular expressions, extract the code block text, and then deserialize it into JSON. Strategy 2 (Full-text deserialization): Directly deserialize the full text after removing leading and trailing whitespace into JSON; Strategy 3 (Balanced scanning): Locate the first object start character "{" or array start character "[" in the text, scan backwards with a depth counter to the paired end character, extract the complete fragment, and then deserialize.

[0084] If all three strategies fail, it is determined that the current round of calls has not produced the structured output object that was intended for the current stage.

[0085] 2. If a JSON object is obtained, then according to the field definitions of the current stage, validate whether the required fields exist, whether the types are valid, and whether the enumeration values ​​belong to the predefined collection: Validation passed: Write the object to the predefined top-level key bound to the current stage in the project context, and synchronously write the derived keys required by the gating as needed (e.g., synchronously write the input quality fields in the requirement mining object to the top-level input quality key). If the validation passes (there are identifiable core required fields, but some fields are not in a standardized format): In an optional, relaxed implementation, the known aliases and common formats are normalized and mapped (e.g., the string-formatted triggering conditions are normalized to objects containing the "condition" subfield) and then validated again; if it still does not meet the requirements, it is considered as not generated. Verification failed or extraction failed: Do not write unstructured natural language into the predefined structured output key.

[0086] 3. If the main skill communication is successful and the returned text is not empty, but the text is still not written to the predetermined structured output object after the above two steps, the contract is deemed not satisfied, and the backup skill is called in sequence and the parsing pipeline is repeated. If neither the main skill nor any of the backup skills are written into the predefined object, the current stage is not marked as completed, and a list of missing required field names in the predefined structured output object of the current stage is output. The gating judgment reads the key path set values ​​after they are written into the project context, rather than the original natural language text. Therefore, when the large language model returns unstructured natural language and cannot extract legal structured objects, this application will not misjudge it as a stage completion. Instead, it will trigger a backup skill downgrade based on the parsing failure judgment, or explicitly provide a list of missing required field names when both the primary and backup fail, so that manual completion or adjustment of skill prompt words can be made. This avoids the risk of pseudo-readiness in subsequent stages based on non-existent structured data.

[0087] It should be noted that there are several ways to filter the target principle subset from the principle set. One approach is to maintain a mapping table between stages and Chinese keywords, and then filter each principle in the principle set based on its Chinese keyword substring. Principles matching the keywords of the current stage are included in the target principle subset. Another approach is to vectorize the principle entries and perform nearest neighbor searches based on the embeddings of the current stage description to filter the principle subset. This method can capture synonymous expressions, but it involves a trade-off between computational overhead and the clarity of stage boundaries. The format of the role constraint document can also be varied, such as a markup language document, a YAML (YAML Ain't Markup Language, a readable data serialization format) document, or other structured data files. Furthermore, when the role constraint document is missing, one approach is to use an empty principle subset and log a warning level, allowing execution to continue without interrupting the process even when the document is missing.

[0088] This application, on the one hand, skips skill calls directly for short inputs, thus avoiding the waste of large language model computing power and the generation of unreliable outputs for extremely short inputs that are insufficient to support credible outputs. On the other hand, each call only injects a subset of principles that match the Chinese keywords of the current stage. Therefore, since the target principle subset is significantly smaller than the full set of principles, the token consumption of the principles carried in the prompt words is compressed, thereby reducing prompt word token consumption. Simultaneously, since principles irrelevant to the current stage are no longer injected, interference with the current task is reduced, and the probability of cross-stage behavior drift is lowered. For example, it can reduce situations where agents leak internal cost logic during the quotation stage or include too many technical implementation details in the requirements document stage. Compared to schemes that express stage constraints through formal contracts, this implementation adopts Chinese keyword substring matching oriented towards business semantics, eliminating the need to write and verify complex contract expressions, and is more in line with the informal business rules in the product management field.

[0089] In one specific embodiment, the present invention further includes optional symmetric encrypted persistence of the project context, which enables static data protection as needed without changing the chain of responsibility logic, and the encryption and gating orchestration logic are orthogonal.

[0090] Specifically, when persistent storage of the current project context is required, the status of the encryption environment variable switch is checked. If the encryption environment variable switch is on and the symmetric encryption key exists, the current project context is serialized to obtain a byte stream, symmetrically encrypted using the symmetric encryption key, and then written to the persistent storage area. If the encryption environment variable switch is on but the symmetric encryption key does not exist, a key missing error message is returned directly. If the encryption environment variable switch is off, the project context is serialized directly to obtain a byte stream and written to the persistent storage area. Thus, the existence of the encryption switch and the key jointly determine the write path, resulting in a fast failure rather than silent rollback to plaintext when the switch is on but the key is missing.

[0091] Furthermore, the read path can be compatible with historical plaintext through heuristic branching based on the first byte. In one implementation, the serialized plaintext begins with a specific structured object start character, while the first byte of the ciphertext is not equal to the start character of that structured object. During reading, if the first byte is the start character of the structured object, the plaintext parsing branch is followed; otherwise, the decryption branch is followed, thus supporting data directory migration that mixes plaintext and ciphertext. Both the gating module and the snapshot module only read the plaintext context dictionary in memory and do not directly access the ciphertext file on disk. That is, the encryption module is located at the persistence boundary and does not change the chain of responsibility logic.

[0092] It should be noted that encryption granularity can be implemented in several ways. One approach is to encrypt the global context file at a single-file level, while keeping the phased files in plaintext; another approach is to encrypt all context files. Distinguishing error types for plaintext parsing failures and ciphertext decryption failures facilitate problem localization.

[0093] Compared to existing technologies that lack static encryption or rely solely on disk-level encryption, this implementation places encryption at the project context persistence boundary and controls it via an environment variable switch. Based on this, we can infer that: First, static data protection can be enabled or disabled independently without changing the chain of responsibility logic and gating orchestration, thereby enabling static encryption for the project data directory in the production environment, while the development environment can maintain plaintext for easy debugging; Second, since a key missing error is directly returned and plaintext is refused to be written when the switch is enabled but the key is missing, the event of maintenance personnel mistakenly believing that encryption has been achieved when plaintext is actually written to disk can be avoided. That is, when the key is missing, static files will not be generated and the gating module will still work normally in memory.

[0094] To further illustrate the processing methods of the embodiments of the present invention under various typical scenarios and boundary conditions, several typical embodiments are given below.

[0095] In a typical implementation scenario, a diagnostic scenario is presented where the parent key exists but the child key is missing. The red-line scanned object has been written as the top-level key into the project context, but its flag child key is missing. When the gating module parses the nested path of the red-line scan point through the flag, it finds that the parent key exists but the child key is invalid. It then writes the complete path of the red-line scan point through the flag into the target nested path that is determined to be non-existent, instead of simply reporting that the red-line scanned object is missing. The technical advantage is that operations and maintenance personnel can directly locate the specific sub-field that needs to be completed, without having to check each item within the red-line scanned object, providing finer-grained location compared to solutions that only check the top-level key.

[0096] Typical Implementation Example 2: A scenario where the red line is passed but the yellow line is not. The serious and high-level violation counts of the requirement document are both zero, the red line scan passes (true), but the document has multiple low-to-medium level formatting and readiness issues, and the original yellow line readiness score is 85. Since the document review stage requires a readiness score of at least 80, it is considered passed in this case. In contrast, if the red line scan passes (false), the readiness score is capped at 40, and the review gate fails. The technical effect is that it prevents a high yellow line score from masking serious red line compliance issues, and allows high-quality documents with only readiness flaws to enter the repair loop instead of being directly blocked.

[0097] Typical Implementation Example 3: Scenario where both primary and backup skills fail. During the requirement mining phase, both the primary skill and all backup skills return unstructured natural language, failing to produce a structured output object for requirement mining. In this case, the contract judgment is not satisfied, the phase is not marked as complete, and a list of missing contract fields is returned to the host. The technical effect is that it distinguishes between skill execution anomalies and missing structured contracts, facilitating manual completion or adjustment of skill prompts.

[0098] Typical Implementation Example 4: Short Input Skip Scenario. The original requirement text is less than fifty characters long. In this case, the skill call is skipped, the input quality field is directly set to insufficient, and an input quality insufficiency type diagnosis is returned. The technical effect is to avoid wasting computing power on extremely short inputs and generating unreliable output.

[0099] Typical Implementation Example 5: Scenario where encryption is enabled but the key is missing. In the production environment, encryption is enabled, but the symmetric key environment variable is empty. In this case, the persistence module refuses to write to the global context file, returning a missing key error. The gating module continues to function normally in memory, but static files are not generated. The technical effect is to prevent maintenance personnel from mistakenly believing the data is encrypted when it is actually written to disk in plaintext, and this process is orthogonal to the gating orchestration logic.

[0100] Regarding performance and scalability, the embodiments of this invention also have the following characteristics. First, gating diagnosis only traverses the predetermined top-level keys and nested paths. Its time complexity is linearly related to the gating configuration scale, but decoupled from the total number of keys in the project context, thus preventing the overhead of gating decisions from expanding as the number of context keys increases. Second, redline scanning iterates line by line, and is expected to complete the task in seconds for requirement documents with tens of thousands of lines. Third, the stage principle subset filtering compresses the full principle to no more than ten items per stage, thereby reducing the consumption of prompt tokens. Fourth, the symmetric encryption writing of the global context is a single operation, and the time consumption for megabyte-level contexts on the embodiment hardware is in the milliseconds, and the responsibility chain stage switching does not block encryption.

[0101] It should be noted that, without departing from the purpose of the invention, the module number, step sequence, and threshold parameters can be adjusted according to the deployment environment. The functional limitations in the claims should be understood as alternative implementations that can achieve the same technical effect. When the host concurrently calls read-only query and stage write operations, the memory context is isolated at the granularity of the project identifier to avoid the read-only snapshot reading the unpersisted intermediate state, thereby ensuring the consistency of read-only queries. In addition, boundary paths such as empty input, empty module list, zero-byte file, full skill failure, gate failure, subprocess timeout, rate limit, missing key, and digest mismatch all return structured information. Silent success or silent plaintext rollback is prohibited. Each variant can construct a corresponding fixture in the integration test and assert by checking the context predefined key, diagnostic three fields, or encrypted first byte characteristics.

[0102] Furthermore, the embodiments of the present invention can provide several alternative implementation schemes to achieve the same inventive objective. As one alternative implementation scheme, the top-level context key and nested field path conditions can be compiled into a rule set of an external rule engine. The gate module then parses the violation list and maps it to a three-field diagnostic output, thereby supporting visual editing of the gate conditions by non-developers. As another alternative implementation scheme, a large language model can output a structured score for the demand chain. After threshold determination, the score is written to an integrity verification key for gate reading, thereby improving fault tolerance for unstructured input. As a third alternative implementation scheme, principle entries can be vectorized and embedded according to stage descriptions for nearest neighbor retrieval to inject prompt words and capture synonymous expressions. The above alternative implementation schemes and the aforementioned implementation methods can be selected or combined according to actual needs, and all are within the protection scope of the present invention.

[0103] See Figure 3As shown, the overall system framework provided in this embodiment of the invention includes: an agent orchestration module 101, a responsibility chain module 102, a declarative identity injection module 103, a project context management module 104, a six-element integrity verification module 105, a red line scanning module 106, a yellow line scanning module 107, a skill registration and scheduling module 108, a protocol host interface 109, a persistence and functional acceptance extension module 110, and a large language model service 111. The proxy orchestration module 101 coordinates skill scheduling and review triggering order. Its inputs include stage execution requests and project identifiers, and its outputs include stage outputs and gating result references. It returns a structured error code when all skills fail and skips skills when there is a short input. The responsibility chain module 102 reads the double-key configuration and performs gating judgment. Its inputs include a flattened context dictionary and the current stage, and its outputs include a gating pass flag, a successor list, and a diagnosis field. When the gating configuration is missing, it includes "gating configuration not registered" in the blocking reason. The declarative identity injection module 103 is used to select a subset of principles based on the Chinese keyword substring of the current stage. When the role constraint document is missing, it uses an empty subset of principles and records a warning-level log. The context management module 104 is used for phased and global partition read / write operations, and throws recoverable errors without polluting the gating keys when the disk is read-only; the six-element integrity verification module 105 is used to perform non-empty rules on each element of the scene graph output and distinguish severity levels; the red line scanning module 106 is used to perform line-by-line regular expressions on the main text of the delivery document and count the severity and high-level counts; the yellow line scanning module 107 is used to calculate the readiness score and clamp the upper limit to forty when the red line is not passed; the skill registration and scheduling module 108 is used to execute primary and backup skills sequentially and perform contract judgment; the protocol host interface 109 is used to return the gating diagnostic fields to the host for display via the protocol tool; the persistence and functional acceptance extension module 110 is used for persistence write-back and structured verification of functional acceptance.

[0104] See Figure 4 As shown, this embodiment of the invention discloses a product management document delivery device based on chain of responsibility and context maintenance, comprising: The gating identifier configuration module 11 is used to set the product management document delivery process to a target number of responsibility chain stages and configure gating identifiers for each of the responsibility chain stages; the responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving; each of the responsibility chain stages generates a corresponding product management document; The key path set configuration module 12 is used to configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and the child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility. The judgment module 13 is used to determine, after the current chain of responsibility stage is completed, whether the outermost key name specified by the target key path set in the project context exists, based on the target key path set corresponding to the gate identifier of the current chain of responsibility stage, and whether each target subkey name specified by the target nested path exists when the target parent key name specified by the target nested path corresponding to the target key path set exists. The update module 14 is used to write the product management document corresponding to the current responsibility chain stage into the project context if both exist, determine the next responsibility chain stage based on the read responsibility chain stage transfer table and the current responsibility chain stage, update the current responsibility chain stage to the next responsibility chain stage, and execute the corresponding updated current responsibility chain stage. The delivery document determination module 15 is used to determine the product management documents in the project context as delivery documents and output them after execution to the archiving responsibility chain stage.

[0105] Since the embodiments of the device part correspond to the embodiments described above, please refer to the embodiments described in the method part for the embodiments of the device part, and will not be repeated here.

[0106] As can be seen, this application encodes the business semantics, i.e., the seven-stage product management responsibility chain, into constraints on the project context key, and performs a two-layer binding of the gating identifier with the outermost key name and nested field dot-mapping paths. This invention enables gating decisions to directly locate specific missing fields. Compared to existing technologies that only determine whether the preceding stage has been executed, this application can perform deterministic verification on the completeness of the structured data produced by the stage before the stage transition, thereby preventing automatic advancement based on incomplete data. Compared to existing technologies that only return a boolean failure when gating fails, this application simultaneously generates a list of missing keys and missing nested fields within the same gating decision, allowing maintenance personnel to locate the missing items without a full scan of the context. Therefore, it can be inferred that the manual location time for gating failures can be significantly shortened.

[0107] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0108] Figure 5This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the product management document delivery method based on chain of responsibility and context maintenance disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be a computer.

[0109] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0110] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0111] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the product management document delivery method based on chain of responsibility and context maintenance, which is executed by the electronic device 20 according to any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0112] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned product management document delivery method based on chain of responsibility and context maintenance. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0113] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0114] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0115] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0116] Finally, 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. 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. Without further limitations, 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 said element.

[0117] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A product management document delivery method based on chain of responsibility and context maintenance, characterized in that, include: The product management document delivery process is set to a target number of responsibility chain stages, and a gate control identifier is configured for each of the responsibility chain stages. The responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving. Each of the responsibility chain stages generates a corresponding product management document. Configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility. After the current chain of responsibility phase is completed, based on the target key path set corresponding to the gate identifier of the current chain of responsibility phase, determine whether the outermost key name specified by the target key path set in the project context exists, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target nested path corresponding to the target key path set exists. If both exist, the product management document corresponding to the current responsibility chain stage is written into the project context. The next responsibility chain stage is determined based on the read responsibility chain stage transition table and the current responsibility chain stage. The current responsibility chain stage is updated to the next responsibility chain stage, and the updated current responsibility chain stage is executed. After execution reaches the archiving responsibility chain stage, the product management documents in the project context are identified as delivery documents and output.

2. The product management document delivery method based on chain of responsibility and context maintenance according to claim 1, characterized in that, After the scenario reconstruction responsibility chain phase is completed, it also includes: Read the scene graph output data from the project context of the current chain of responsibility stage; The scene graph output data is subjected to a six-element integrity check; the six elements include triggering conditions, user roles, data flow, result confirmation, exception handling, and subsequent records. When any of the six elements has a field value that is missing or empty, the element is marked as a missing element, and a corresponding Chinese follow-up question text is generated for each missing element. Record the names of each missing element and the corresponding Chinese follow-up questions for that missing element as a list of missing element details; Write the missing element details list and the corresponding six-element integrity verification results into the project context of the current chain of responsibility phase; The triggering condition, the user role, and the data flow are first-level elements, while the result confirmation, the exception handling, and the subsequent records are second-level elements. The level of the blocking reason generated when the first-level element is missing is higher than the level of the blocking reason generated when the second-level element is missing.

3. The product management document delivery method based on chain of responsibility and context maintenance according to claim 1, characterized in that, After the requirements document generation and responsibility chain phase is completed, the following also includes: Perform a redline scan on the product management documents generated at the current stage of the chain of responsibility; the redline scan includes matching at least one regular expression rule and counting the number of violations at a preset first level and a preset second level; the severity of the violation at the preset first level is higher than the severity of the violation at the preset second level. If both the number of violations at the preset first level and the number of violations at the preset second level are zero, then the red line scan is confirmed as true by the flag. Otherwise, the red line scan pass flag is identified as false, and the red line scan failure is written into the blocking reason; Perform functional acceptance verification on the product requirements document generated at the current stage of the chain of responsibility to check whether each functional requirement contains acceptance criteria, acceptance conditions, or a given-if-then-if structure. If so, then the function acceptance verification passed flag will be set to true; Otherwise, the "Functional Acceptance Verification Passed" flag will be marked as false. The key path set corresponding to the gate identifier in the chain of responsibility stage of the requirement document generation also includes nested paths for determining whether the red line scan pass flag and the function acceptance verification pass flag are true. Accordingly, after the document review responsibility chain phase is completed, it also includes: The readiness score of the audit report generated at the current stage of the responsibility chain is calculated based on preset scoring rules, and the readiness score is written into the project context of the current stage of the responsibility chain. The readiness score is a numerical score that quantifies whether the document quality has reached the level of delivery readiness. The preset scoring rules include: if there are a first number of preset first-level issues in the audit report, the current score is determined by the difference between the preset baseline value of the readiness score and the first number of first scores; if there are a second number of preset second-level issues in the audit report, the current score is determined by the difference between the current score and the second number of second scores; the current score is determined as the readiness score; wherein, the preset first level is higher than the preset second level; the first score is greater than the second score. If the redline scan pass flag in the project context corresponding to the current chain of responsibility stage is false, then the highest score of the readiness score of the audit report will be directly controlled to be less than the third score. The set of key paths corresponding to the gate identifier in the document review responsibility chain stage also includes nested paths used to check whether the ready score in the predetermined key path is greater than or equal to a preset score threshold.

4. The product management document delivery method based on chain of responsibility and context maintenance according to claim 1, characterized in that, The current phase of the chain of responsibility also includes: Invoke the main skill of the current chain of responsibility stage; the main skill is the large language model invocation task that generates the structured output object of the current chain of responsibility stage. After the main skill call returns, check whether the project context of the current chain of responsibility stage contains the pre-defined structured output object for the current chain of responsibility stage; If not, the backup skills of the current responsibility chain stage are sequentially invoked, the structured output of the backup skills is written into the project context of the current responsibility chain stage, and the process of the current responsibility chain stage continues to be executed; the backup skills are alternative large language model invocation tasks of a different type from the main skills. If neither the primary skill nor any of the backup skills in the current chain of responsibility phase have generated the structured output object pre-defined for the current chain of responsibility phase, then the operation marking the completion of the current chain of responsibility phase will not be executed, and a list of missing required field names in the structured output object pre-defined for the current chain of responsibility phase will be output.

5. The product management document delivery method based on chain of responsibility and context maintenance according to claim 1, characterized in that, Before executing the current phase of the chain of responsibility, the following is also included: Obtain the input text of the current stage of the chain of responsibility, and determine whether the number of characters in the input text is less than a preset character threshold; If so, skip the skill call in the current chain of responsibility stage, set the insufficient input quality flag, and return the diagnostic result for the insufficient input quality type; Load the role constraint document; the role constraint document includes an identity description, a set of principles, a scope definition, and delivery criteria; wherein, the identity description is used to define the role positioning of the agent in the current chain of responsibility stage; the agent is a computer program entity that executes the tasks of the current chain of responsibility stage and generates structured output objects based on a large language model; the set of principles contains several behavioral guidelines; the scope definition is used to define the business boundaries processed in the current chain of responsibility stage; the delivery criteria are used to define the quality requirements of the outputs of the current chain of responsibility stage; Select a subset of target principles from the set of principles based on the Chinese keywords of the current chain of responsibility stage; Based on the target order, the identity description, the subset of target principles, the scope definition, and the delivery criteria are assembled into a prompt word. Based on the prompt word, the large language model is invoked to execute the task of the current chain of responsibility stage, and the structured output object returned by the large language model is written into the project context of the current chain of responsibility stage.

6. The product management document delivery method based on chain of responsibility and context maintenance according to claim 1, characterized in that, After determining whether the outermost key name specified by the target key path set in the project context exists, and whether each target subkey name specified by the target nested path exists when the target parent key name specified by the target nested path corresponding to the target key path set exists, the method further includes: If any item is missing, the current chain of responsibility stage is maintained, and the target information and the blocking reason generated based on the target information and the gating identifier corresponding to the current chain of responsibility stage are output; the target information includes the outermost key name that is judged to be missing and the target nested path that is judged to be missing.

7. The product management document delivery method based on chain of responsibility and context maintenance according to any one of claims 1 to 6, characterized in that, Also includes: If persistent storage of the project context at the current stage of the chain of responsibility is required, check the state of the encrypted environment variable switch; If the encryption environment variable switch is enabled and the symmetric encryption key exists, the project context of the current chain of responsibility stage is serialized to obtain a byte stream. The byte stream is then symmetrically encrypted based on the symmetric encryption key, and the corresponding encrypted byte stream is written to the persistent storage area. If the encryption environment variable switch is turned on, but the symmetric encryption key does not exist, a key missing error message will be returned directly. If the encrypted environment variable switch is turned off, the project context of the current chain of responsibility stage is directly serialized to obtain a byte stream, and the byte stream is written to the persistent storage area.

8. A product management document delivery device based on chain of responsibility and context maintenance, characterized in that, include: The gating identifier configuration module is used to set the product management document delivery process to a target number of responsibility chain stages, and to configure gating identifiers for each of the responsibility chain stages; the responsibility chain stages include requirement mining, scenario reconstruction, requirement document generation, quotation organization, contract boundary, document review and archiving; each of the responsibility chain stages generates a corresponding product management document; The key path set configuration module is used to configure a corresponding key path set for each gate identifier; the key path set includes the outermost key name of the project context and nested paths formed by connecting the parent key name and child key name according to preset punctuation marks; the project context is used to store the structured data produced at each stage of the chain of responsibility. The judgment module is used to determine, after the current chain of responsibility stage is completed, whether the outermost key name specified by the target key path set in the project context exists, based on the target key path set corresponding to the gate identifier of the current chain of responsibility stage, and whether each target subkey name specified by the target nested path exists if the target parent key name specified by the target nested path exists. The update module is used to, if all exist, write the product management document corresponding to the current responsibility chain stage into the project context, determine the next responsibility chain stage based on the read responsibility chain stage transfer table and the current responsibility chain stage, update the current responsibility chain stage to the next responsibility chain stage, and execute the corresponding updated current responsibility chain stage. The delivery document determination module is used to determine and output the product management documents in the project context as delivery documents after execution reaches the archiving responsibility chain stage.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program to implement the steps of the product management document delivery method based on chain of responsibility and context maintenance as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on a computer-readable storage medium, which, when executed by a processor, implements the steps of the product management document delivery method based on chain of responsibility and context maintenance as described in any one of claims 1 to 7.