Branch rollback and space constraint method and system based on state causal diagram, electronic device and storage medium

CN122777598APending Publication Date: 2026-09-18HANGZHOU DEEP PRINCIPLE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0003]针对现有技术存在的状态回滚时失败路径信息丢失导致后续探索重复进入无效空间、计算资源浪费的问题,本申请通过基于状态因果图的分支回滚与空间约束方法及系统,实现将失败路径转化为结构化约束并反向注入候选生成过程以裁剪搜索空间

Benefits of technology

[0023] The technical solution provided in this application deeply integrates the state rollback mechanism with the search space constraint mechanism, changing the traditional approach of simply discarding failed paths during rollback. Its core principle lies in utilizing the structured characteristics of state causal graphs to automatically extract state features representing the invalid exploration space from failed paths and transform them into computer-executable structured constraint rules. These rules then substantially intervene in the subsequent candidate object generation process through input masks, penalty terms, or boundary conditions. This mechanism enables the system to automatically memorize and utilize historical failure experiences to dynamically and precisely prune the search space without human intervention, effectively avoiding the repeated investment of computing resources in known invalid regions and significantly improving the execution efficiency and automation level of multi-branch exploration tasks. Simultaneously, the refined constraint object data structure and branch merging mechanism further enhance the system's robustness and the reliability of the exploration conclusions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122777598A_ABST
    Figure CN122777598A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer data processing and automated search, and provides a branch rollback and space constraint method and system based on a state causal diagram, an electronic device and a storage medium, which comprise the following steps: in a multi-branch exploration task execution process, in response to detecting that a current exploration branch meets a preset rollback triggering condition, determining a target rollback node and a failure path of the current exploration branch in a state causal diagram; extracting state features from the failure path based on the state causal diagram to generate invalid space constraints; and injecting the invalid space constraints into a subsequent candidate object generation process to prune a search space and generate a new exploration branch; the application converts the failure path into a structured constraint and reversely injects the structured constraint into the candidate generation process, thereby avoiding repeated exploration of known invalid space and improving exploration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of computer data processing and automated search technology, specifically to a branch rollback and spatial constraint method, system, electronic device, and storage medium based on state cause-effect graphs. Background Technology

[0002] In scenarios involving automated exploration, parameter optimization, or multi-agent collaboration in complex systems, computer systems typically need to maintain a state exploration process with multiple branches. When an exploration branch fails to reach its expected goal or triggers an anomaly, the system often needs to perform a rollback operation to restore the previous stable state and try new paths. Existing state management and version control technologies (such as distributed version control systems like Git) usually only focus on restoring valid states during rollbacks, discarding failed exploration paths as invalid data or only recording them as unstructured logs. In the field of automated search and optimization, conventional methods such as Bayesian optimization and genetic algorithms, while possessing iterative optimization capabilities, lack a structured memory mechanism for historical failed paths. Each iteration or restart involves resampling the entire search space, failing to proactively eliminate known invalid regions. The common drawback of these two technical approaches is that the state feature information contained in failed paths is not transformed into constraints that can be directly invoked by subsequent computation processes. This makes it easy for the system to re-enter known invalid parameter spaces or erroneous state regions when generating subsequent candidate objects or planning new tasks, resulting in redundant consumption of computational resources and a significant reduction in exploration efficiency. Therefore, there is an urgent need for a technical solution that can effectively retain and utilize failure path information during state rollback to optimize the subsequent search space. Summary of the Invention

[0003] To address the problem in existing technologies where the loss of failed path information during state rollback leads to repeated entry into invalid spaces and wasted computational resources, this application proposes a branch rollback and space constraint method and system based on state causal graphs. This method transforms failed paths into structured constraints and injects them back into the candidate generation process to prune the search space.

[0004] To achieve the above objectives, this application adopts the following technical solution: a branch rollback and spatial constraint method based on a state causal graph, comprising: during the execution of a multi-branch exploration task, in response to detecting that the current exploration branch meets a preset rollback trigger condition, determining the target rollback node of the current exploration branch in the state causal graph, and determining the failure path of the current exploration branch; based on the state causal graph, extracting state features from the failure path to generate invalid spatial constraints; injecting the invalid spatial constraints into the subsequent candidate object generation process to prune the search space, and generating a new exploration branch based on the pruned search space.

[0005] The above scheme, upon detecting a rollback trigger condition, not only locates the target rollback node but also clearly identifies the failure path. It then extracts state features from this path to generate invalid space constraints and actively injects these constraints into the subsequent candidate object generation process. This allows the system to automatically exclude or downgrade candidate objects in invalid regions based on historical failure experience, thereby achieving substantial pruning of the search space at the machine execution level. This avoids the system repeatedly exploring known invalid spaces and significantly reduces the ineffective consumption of computing resources.

[0006] As one implementation, the step of extracting state features from the failed path based on the state causal graph and generating invalid space constraints includes: parsing the execution logs and state snapshots in the failed path, extracting at least one of invalid parameter windows, state blocking regions, and error modes that caused the exploration failure; and converting the extracted invalid parameter windows, state blocking regions, or error modes into structured constraint rules as the invalid space constraints.

[0007] This implementation transforms unstructured or semi-structured failure traces into specific invalid parameter windows, state blocking regions, or error patterns by parsing underlying data such as execution logs and state snapshots. These are then further encapsulated into structured constraint rules, ensuring that failure features can be accurately identified and processed by the computer system. This provides a reliable data foundation for the precise trimming of the search space.

[0008] As one implementation, injecting the invalid spatial constraints into the subsequent candidate object generation process to prune the search space includes: injecting the invalid spatial constraints as at least one of the input mask of the generative model, the penalty term of the evaluation function, or the boundary condition of the search algorithm into the subsequent candidate object generation process; and in the subsequent candidate object generation process, filtering or downsizing candidate objects falling within the range defined by the invalid spatial constraints based on the injected input mask, the penalty term, or the boundary condition to prune the search space.

[0009] This implementation clarifies the specific technical means by which invalid space constraints intervene in candidate generation. Whether it is used as an input mask for the generation model, a penalty term for the evaluation function, or a boundary condition for the search algorithm, it reflects the substantial intervention of constraints on the computation process, ensuring that the pruning action is automatically completed within the algorithm, rather than merely remaining at the information display level, thereby guaranteeing the technical effect of search space optimization.

[0010] In one implementation, the structured constraint rule is instantiated as a constraint object containing the following data fields: a failure identifier field, configured to assign a globally unique identifier to track the source and version of the failure path; a scope field, configured to limit the parameter dimension, environment configuration, or state space range in which the constraint object takes effect; a reason indication field, configured to record the anomaly type, triggering condition, or dependency conflict that caused the exploration failure; a blocking region field, configured to precisely define the parameter combination or state transition path that is prohibited from exploration in the form of a continuous numerical range, a discrete enumeration set, or a logical expression; and a reusable rule field, configured to indicate the inheritance priority, attenuation coefficient, and propagation condition of the constraint object in cross-branch exploration or cross-task scheduling scenarios.

[0011] This implementation defines a refined data structure that includes failure flags, scope, reason prompts, blocking regions, and reusable rules. This enables invalid spatial constraints to have the ability to be passed across branches and tasks and to have lifecycle management capabilities. It enhances the versatility and reusability of constraint objects and avoids the problem of incorrect or missed pruning caused by ambiguous constraint definitions.

[0012] As one implementation, in the subsequent candidate object generation process, filtering or downweighting candidate objects falling within the range defined by the invalid space constraint based on the injected input mask, the penalty term, or the boundary condition includes: when the invalid space constraint is used as a penalty term of the evaluation function, applying a negative weight penalty to candidate objects falling within the invalid parameter range defined by the invalid space constraint when calculating the fitness score or objective function value of the candidate object, so that their ranking priority is lower than a preset threshold; when the invalid space constraint is used as a boundary condition of the search algorithm, directly eliminating candidate task nodes whose parameter combinations hit the invalid parameter range when the task scheduler generates the next round of exploration task queue, and updating the execution priority of the next round of exploration task queue; when the invalid space constraint is used as an input mask of the generation model, resetting the probability distribution weight corresponding to the invalid parameter range to zero during the sampling stage of candidate set generation, so as to prevent the generation of candidate objects falling within the range of the invalid space constraint.

[0013] This implementation provides specific computational execution logic for different injection methods, including applying negative weight penalties, directly eliminating task nodes, or resetting the probability distribution weights to zero. These operations directly affect the system's scheduler, evaluation function, or generative model, ensuring the mandatory execution of spatial pruning at the computational level and fundamentally preventing the generation or execution of invalid candidate objects.

[0014] As one implementation method, the process of constructing and updating the state causal graph includes: instantiating state objects in the multi-branch exploration task as graph nodes, instantiating state dependencies or verification data propagation relationships between the state objects as graph edges, and constructing the state causal graph; in response to receiving a new task execution result, parsing the task execution result to generate graph incremental data; writing the graph incremental data into the state causal graph, and updating the state attributes and confidence indices of the relevant graph nodes based on the verification conclusions contained in the graph incremental data.

[0015] This implementation constructs the underlying data foundation that supports branch rollback and spatial constraints. By graphing state objects and their dependencies and supporting incremental updates based on task execution results, the system can reflect the dynamic evolution of multi-branch exploration in real time and accurately, providing a complete contextual basis for determining the target rollback node and extracting failure features.

[0016] As one implementation, the method further includes a branch merging process: when at least two different exploration branches are detected to produce state-compatible verification conclusions, the verification data level and conflict rules corresponding to the at least two different exploration branches are obtained; based on the verification data level and the conflict rules, it is determined whether the at least two different exploration branches meet a preset merging condition; if the merging condition is met, the state dependency chains of the at least two different exploration branches are retained, the verification data features of both parties are extracted and fused, and a merged exploration branch containing the merged state attributes is generated.

[0017] This implementation complements the positive convergence mechanism in multi-branch exploration, ensuring that failed paths are effectively utilized while also guaranteeing the efficient fusion of compatible branches. By preserving the state dependency chains of both parties and fusing verification data features, it avoids information loss and improves the overall convergence speed and reliability of conclusions in complex exploration tasks.

[0018] Furthermore, this application also provides a branch rollback and spatial constraint system based on a state causal graph, comprising: a rollback triggering module, used to determine the target rollback node of the current exploration branch in the state causal graph and determine the failure path of the current exploration branch in response to detecting that the current exploration branch meets the preset rollback triggering conditions during the execution of a multi-branch exploration task; a constraint generation module, used to extract state features from the failure path based on the state causal graph and generate invalid spatial constraints; and a spatial pruning module, used to inject the invalid spatial constraints into the subsequent candidate object generation process to prune the search space and generate a new exploration branch based on the pruned search space.

[0019] The system achieves the technical effect corresponding to the method through the collaborative work of its various functional modules. Specifically, it solidifies the feature extraction and constraint injection process for failed paths at the system architecture level, ensuring the stable operation of the search space pruning mechanism and the efficient utilization of computing resources.

[0020] Furthermore, this application also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method described above.

[0021] In addition, this application also provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method described above.

[0022] Beneficial effects:

[0023] The technical solution provided in this application deeply integrates the state rollback mechanism with the search space constraint mechanism, changing the traditional approach of simply discarding failed paths during rollback. Its core principle lies in utilizing the structured characteristics of state causal graphs to automatically extract state features representing the invalid exploration space from failed paths and transform them into computer-executable structured constraint rules. These rules then substantially intervene in the subsequent candidate object generation process through input masks, penalty terms, or boundary conditions. This mechanism enables the system to automatically memorize and utilize historical failure experiences to dynamically and precisely prune the search space without human intervention, effectively avoiding the repeated investment of computing resources in known invalid regions and significantly improving the execution efficiency and automation level of multi-branch exploration tasks. Simultaneously, the refined constraint object data structure and branch merging mechanism further enhance the system's robustness and the reliability of the exploration conclusions. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the data structure of the state cause-effect graph in an embodiment of this application;

[0025] Figure 2 This is a flowchart illustrating the transformation of the task execution result into a graph increment in an embodiment of this application;

[0026] Figure 3 This is a flowchart illustrating the process of rolling back from the target rollback node and generating a new exploration branch, as described in this application embodiment.

[0027] Figure 4 This is a schematic diagram illustrating the failure path retention and reverse constraint of the search space in an embodiment of this application;

[0028] Figure 5 This is a branching diagram of the verification support, verification rebuttal, and insufficient verification states in an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0031] Example 1

[0032] like Figure 3 As shown, this embodiment provides a branch rollback and spatial constraint method based on state causal graphs. This method is automatically executed by the computer system's processor or task scheduler to optimize search efficiency and avoid redundant consumption of computing resources in multi-branch exploration tasks. The method mainly includes the following steps:

[0033] Step S101: During the execution of the multi-branch exploration task, in response to the detection that the current exploration branch meets the preset rollback trigger condition, the target rollback node of the current exploration branch in the state causal graph is determined, and the failure path of the current exploration branch is determined. Specifically, the rollback trigger condition is automatically determined by the system through real-time monitoring of the task execution status, rather than relying on manual intervention or subjective decision-making. For example, the task scheduler can continuously monitor the verification results of continuously generated candidate objects under the current branch. When the number of consecutive failures exceeds a preset threshold (such as 3 or 5 times), or when the convergence trend of the objective function shows abnormal oscillations, gradient vanishing, or other mathematical characteristics, the system determines that the current branch has fallen into a local invalid region, thereby automatically triggering the rollback mechanism. When determining the target rollback node, the system will backtrack upwards along the dependency edges of the state causal graph to locate the nearest ancestor node with stable state attributes and a confidence level higher than the preset baseline value as the rollback anchor point. At the same time, the system marks all state objects and their connecting edges from the target rollback node to the current termination node in the current exploration branch as failure paths. It is important to emphasize that the failure path here is not an unstructured text log or a simple error code record, but a structured data chain composed of specific node instances and edge instances in the state causal graph. It contains a complete parameter configuration snapshot, intermediate state transition records, and verification feedback data, which provides an accurate machine-readable foundation for subsequent feature extraction.

[0034] Step S102: Based on the state-causal graph, extract state features from the failed paths to generate invalid space constraints. In this stage, the system uses a graph traversal algorithm to analyze the node attributes and edge relationships on the failed paths, identifying key factors leading to exploration failure. For example, the system can extract invalid parameter windows that cause performance degradation or identify state blocking regions that trigger system anomalies by comparing the parameter differences of each node on the failed path with the correlation of the verification results. Subsequently, the system encapsulates and instantiates these extracted discrete state features into a standardized invalid space constraint object. This constraint object is a machine-readable rule data structure that internally defines prohibited parameter combinations, state transition logic, or environment configuration ranges. By transforming unstructured failure traces into structured constraint objects, the system enables historical failure experiences to be directly called and processed by subsequent algorithm modules, rather than merely serving as archived information for human review.

[0035] Step S103 involves injecting invalid space constraints into the subsequent candidate object generation process to prune the search space and generate new exploration branches based on the pruned search space. Specifically, the injection operation refers to the system passing invalid space constraints as control parameters to the generator before or during the invocation of the candidate object generator (such as a sampling algorithm, generative model, or task planning engine), thereby changing the generator's internal operating logic or output distribution. For example, the system can map the blocking region in the constrained object to the input mask of the generative model, or convert it into a negative penalty term of the evaluation function, or use it as a hard boundary condition for the search algorithm. This injection behavior directly causes changes in the geometry or topology of the search space, causing candidate objects that might have fallen into invalid regions to be filtered, downweighted, or not generated at all. Based on this pruned search space, the system automatically generates new exploration branches that naturally avoid known invalid regions at the beginning, thus achieving intelligent correction of the exploration direction. The new exploration branch can be a new path generated by resampling parameter configuration within the pruned search space starting from the target rollback node, or an independent exploration starting point replanned by the task scheduler in the global effective space.

[0036] Through the closed-loop execution of steps S101 to S103 described above, this embodiment transforms the traditional passive rollback into an active space constraint generation mechanism. The system no longer simply discards failed branches or merely retains them in logs, but instead transforms them into constraint rules that have substantial intervention capabilities in subsequent computation processes. This approach technically solves the problem of repeated trial and error caused by the lack of failure memory in multi-branch exploration tasks, significantly reduces the processor's wasted computing power in invalid parameter spaces, and improves the overall convergence speed and resource utilization efficiency of automated exploration tasks. It should be understood that although this embodiment describes the steps in a specific order, in other embodiments, as long as the core logic of extracting constraints from failed paths and reverse-pruning the search space is satisfied, the specific execution timing or module division of the steps can be adaptively adjusted without departing from the scope of protection of this application.

[0037] Example 2

[0038] Building upon Example 1, this example further details the specific implementation mechanism for extracting state features from failed paths and generating invalid space constraints based on state causal graphs. As one implementation method, extracting state features from failed paths and generating invalid space constraints based on state causal graphs includes: parsing execution logs and state snapshots in the failed paths to extract at least one of invalid parameter windows, state blocking regions, and error modes that led to exploration failure; and converting the extracted invalid parameter windows, state blocking regions, or error modes into structured constraint rules as invalid space constraints. Specifically, this process is not a simple text retrieval or manual induction, but rather a data mining and object instantiation operation automatically performed by the system's constraint generation module. The system first reads the execution logs and state snapshots associated with each state object on the failed path. The execution logs record the input parameters, intermediate variables, and return codes during task execution, while the state snapshots save the memory stack, environment variables, and output result tensors at the time of task termination. The processor identifies the key factors causing the verification failure from the aforementioned underlying data using a preset anomaly pattern matching algorithm or numerical difference analysis. For example, when all sampling points within a continuous parameter interval return timeout errors or the objective function value falls below the baseline, the system marks that parameter interval as an invalid parameter window; or, when it is found that a specific state transition sequence will inevitably trigger system crash or deadlock, the corresponding subset of the state space is marked as a state blocking region. Subsequently, the system encapsulates these discrete, unstructured fault traces into standardized structured constraint rule objects. These objects are stored in machine-readable data formats (such as JSON Schema, Protobuf, or custom binary structures), ensuring that subsequent space pruning modules can directly use them as operator inputs without secondary semantic parsing, thus guaranteeing the accuracy and computational efficiency of constraint propagation.

[0039] To support the effective flow and precise application of the aforementioned structured constraint rules in complex multi-branch exploration scenarios, this embodiment further defines a refined data structure for constraint objects. As one implementation method, structured constraint rules are instantiated as constraint objects containing the following data fields: a failure identifier field, configured to assign a globally unique identifier to track the source and version of the failure path; a scope field, configured to limit the parameter dimensions, environment configuration, or state space range in which the constraint object takes effect; a reason indication field, configured to record the anomaly type, triggering condition, or dependency conflict that caused the exploration failure; a blocking region field, configured to precisely define the prohibited parameter combinations or state transition paths in the form of a continuous numerical range, a discrete enumeration set, or a logical expression; and a reusable rule field, configured to indicate the inheritance priority, attenuation coefficient, and propagation conditions of the constraint object in cross-branch exploration or cross-task scheduling scenarios.

[0040] Specifically, the failure identifier field is not merely a simple sequence number, but a composite primary key (e.g., UUID v5 format) generated by the system, containing a timestamp, branch ID, and hash checksum. This identifier establishes a strong reference relationship between the constraint object and the original failure node in the state cause-effect graph, allowing the system to trace back to the specific failure scenario at any subsequent point in time, verifying the validity of the constraint or making corrections when necessary. This end-to-end tracing capability is crucial for debugging long-cycle automated exploration tasks, avoiding the risk of unintended pruning due to unclear constraint origins.

[0041] The scope field clearly defines the applicable boundaries of the constraint, preventing local failure experiences from being incorrectly generalized to the global search space. Internally, this field is typically implemented as a mask vector of the parameter space or a list of dimension indices. For example, if a failure is caused solely by the temperature parameter and unrelated to the pressure parameter, the scope field will explicitly mark the temperature dimension as "active" and the pressure dimension as "ignored." When the candidate object generator receives this constraint, it will only perform filtering or weighting operations on the active dimension, while maintaining the original sampling distribution on the ignored dimension. This fine-grained scope control maximizes the preservation of the effective search space and avoids missing potential optimal solutions due to over-constraints.

[0042] The cause field uses predefined enumeration types or structured labels to record the nature of the anomaly, rather than natural language descriptions. For example, the system might define "ERR_TIMEOUT" to indicate a computation timeout, "VAL_OUT_OF_RANGE" to indicate a physical quantity exceeding its bounds, and "DEP_CONFLICT" to indicate a missing prerequisite dependency. This encoded cause recording allows the system to automatically select the most appropriate pruning strategy based on the anomaly type. For example, for constraints of type "ERR_TIMEOUT," the system might tend to apply a soft penalty in the evaluation function, allowing for a small number of tentative breakthroughs; while for hard physical constraints like "VAL_OUT_OF_RANGE," the system would directly perform hard truncation during the generation phase. This adaptive processing mechanism based on cause type significantly improves the intelligence of spatial pruning.

[0043] The blocking region field is the core computational load of the constraint object, supporting various mathematical expressions to adapt to different parameter spaces. For continuous numerical parameters, the blocking region can be represented as a hyper-rectangle or a convex polyhedron, for example... For discrete parameters, they can be represented as an enumerated set of forbidden values; for complex logical dependencies, they can be represented as Boolean expressions or decision tree paths. During candidate generation, the system determines whether newly generated candidate points fall within the region through efficient geometric intersection tests or logical evaluation operations. This mathematical definition makes the time complexity of constraint checks controllable, maintaining real-time response even in large-scale high-dimensional search spaces.

[0044] The reusable rule field endows constraint objects with lifecycle management capabilities, enabling them to adapt to dynamically changing exploration environments. This field contains three sub-attributes: inheritance priority, decay coefficient, and propagation condition. Inheritance priority determines which constraint takes precedence when multiple constraints conflict; the decay coefficient (e.g., set to 0.95) automatically reduces the confidence or penalty weight of constraints when they are propagated across generations or branches, simulating the objective law that "failure experience gradually becomes invalid over time or with changing context," preventing outdated constraints from permanently blocking certain parameter areas; and the propagation condition limits the propagation of constraints only between state nodes that meet a specific similarity threshold. In cross-task scheduling scenarios, when a new exploration task shares at least some parameter dimensions with a historical task, the system automatically inherits the historical constraint objects to the constraint registry of the new task based on the dimension matching result of the scope field and the decay coefficient. This allows the new task to utilize historical failure experience from the startup phase, avoiding starting exploration from scratch. Through these rules, the system constructs a dynamically evolving constraint knowledge base that utilizes historical failure information while maintaining the openness and robustness of the exploration process.

[0045] In summary, this embodiment establishes a complete failure knowledge representation and transmission protocol within the computer system by transforming abstract failure features into standardized constraint objects containing five core fields. This protocol transforms the originally unstructured, human-readable fault logs into structured data assets that can be directly consumed, processed, and managed by algorithms. This not only provides a precise input source for the search space pruning mentioned in Embodiment 1, but also lays a solid data foundation for the various pruning execution logics to be described in subsequent embodiments, fundamentally solving the technical problems of low failure information utilization and constraint transmission distortion in traditional methods.

[0046] Example 3

[0047] Building upon the standardized invalid space constraint object constructed in Example 2, this example further details the specific mechanism for transforming this constraint object into executable instructions within the computer system, i.e., how to achieve substantial pruning of the search space. As one implementation method, invalid space constraints are injected into the subsequent candidate object generation process to prune the search space. This includes: injecting invalid space constraints as at least one of the following: an input mask for the generation model, a penalty term for the evaluation function, or a boundary condition for the search algorithm; and in the subsequent candidate object generation process, filtering or downsizing candidate objects falling within the range defined by the invalid space constraints based on the injected input mask, penalty term, or boundary condition to prune the search space. Specifically, this process is not a simple information prompt or manual decision-making assistance, but rather a low-level computational intervention automatically executed by the system's space pruning module. Figure 4 As shown, the system dynamically selects the most suitable injection strategy based on the algorithm type and running stage of the current exploration task, mapping abstract constraint rules into specific mathematical operators, scheduling instructions, or probabilistic control signals. This mapping allows historical failure experience to directly affect the generation or selection logic of candidate objects, thereby forcibly changing the topology or traversal order of the search space at the machine execution level, ensuring that computing resources are no longer allocated to known invalid regions.

[0048] To support the implementation of the above-mentioned pruning mechanism under different algorithm architectures, this embodiment provides specific computational execution logic for three typical injection methods. As one implementation method, in the subsequent candidate object generation process, based on the injected input mask, penalty term, or boundary conditions, candidate objects falling within the range limited by invalid spatial constraints are filtered or downweighted, including the following three specific scenarios:

[0049] In the first scenario, when the invalid space constraint is used as a penalty term in the evaluation function, a negative weight penalty is applied to candidate objects that fall within the invalid parameter range defined by the invalid space constraint when calculating the fitness score or objective function value of the candidate objects, causing their ranking priority to be lower than a preset threshold. Specifically, in exploration tasks based on evolutionary algorithms, Bayesian optimization, or reinforcement learning, the system will resolve the blocking regions in the constraint objects into mathematical penalty functions. For example, let the original objective function be... The system constructs a revised evaluation function. ,in For indicator functions, when candidate parameters When falling into the invalid region defined by the constraint object Otherwise, it is 0; The pre-set penalty coefficient typically has a value much larger than the normal fluctuation range of the objective function. During each iteration of evaluation, the processor automatically calls this correction function to calculate the score, causing candidate objects falling into invalid regions to receive extremely low fitness values ​​or extremely high loss values. This approach does not directly delete candidate points, but rather guides the search algorithm naturally away from invalid regions by changing the gradient direction or selection pressure of the optimization surface. Its technical effect lies in achieving a smooth transition between soft and hard constraints, avoiding permanent blockages caused by misjudgments, and ensuring a significant decrease in the algorithm's convergence speed near invalid regions. Thus, without compromising the algorithm's global search capability, it effectively suppresses the resampling of known failed paths.

[0050] In the second scenario, when invalid space constraints are used as boundary conditions for the search algorithm, candidate task nodes whose parameter combinations fall within the invalid parameter range are directly removed when the task scheduler generates the next round of exploration task queues, and the execution priority of the next round of exploration task queues is updated. Specifically, in distributed computing or high-throughput screening scenarios, the generation of candidate objects is often accompanied by the construction of large-scale task queues. In this case, the space pruning module intervenes in the verification stage before tasks are enqueued. The task scheduler reads the scope field and blocking region field in the constraint object and performs fast geometric intersection tests or logical matching operations on each task node to be scheduled. Once it is detected that the parameter configuration of a task node falls completely or partially into the invalid space, the scheduler will immediately perform a pruning operation, that is, not write the task into the execution queue, or mark its status as "SKIP" and remove it from the priority stack. At the same time, the scheduler will recalculate the concurrency and resource allocation strategy of the queue based on the number of remaining valid tasks. This hard truncation mechanism has the most direct technical effect. It completes the filtering before the computing tasks actually consume CPU / GPU resources, completely eliminating the occupation of the computing cluster by invalid tasks and significantly improving the effective throughput per unit time. Compared to the method of generating first and then filtering, this pre-verification mechanism reduces the overhead of memory copying and context switching, making it particularly suitable for simulation or experimental tasks with high computational costs.

[0051] In the third scenario, when invalid spatial constraints are used as input masks for the generative model, the probability distribution weights corresponding to the invalid parameter ranges are reset to zero during the sampling phase of candidate set generation to prevent the generation of candidate objects falling within the invalid spatial constraint range. Specifically, when using generative models such as variational autoencoders (VAEs), generative adversarial networks (GANs), or Gaussian processes for candidate recommendation, the system transforms the constrained object into a mask tensor of the latent or output space. During the model's forward propagation or sampling process, the processor multiplies this mask tensor element-wise with the probability density function output by the model. For parameter dimensions or regions marked as invalid by the constrained object, their corresponding probability weights are forcibly set to zero, ensuring that the cumulative distribution function of the sampler within that region remains unchanged, thus mathematically guaranteeing that the sampling point cannot fall into that region. For example, if the constraint indicates that "temperature > 300℃ and pressure < 1MPa" is an invalid combination, the system will then... The probability density of the corresponding rectangular region is set to 0, and the remaining regions are normalized. This source-blocking mechanism fundamentally reshapes the output distribution of the generative model, preventing overfitting or repeated trials on invalid patterns. Compared to post-processing filtering, input masking allows the generative model to focus on the effective space, improving the efficiency and diversity of generated samples while reducing the waste of inference computation caused by generating a large number of invalid samples.

[0052] It should be understood that the three execution logics mentioned above are not mutually exclusive and can be combined in a practical system according to the task stage or algorithm characteristics. For example, in the early stages of exploration, a penalty term can be used for soft constraints to maintain the search breadth, while in the later stages of exploration, boundary conditions or input masks can be used for hard constraints to improve convergence accuracy. Regardless of the method used, the core is to use the structured constraint object described in Example 2 to drive the computer system to automatically and forcibly modify the internal state of candidate generation or screening, thereby transforming failure experience into quantifiable computational efficiency improvements.

[0053] Example 4

[0054] Building upon the aforementioned embodiment that constructed a reverse constraint mechanism based on failed paths, this embodiment further details the underlying data structure supporting the operation of this mechanism and its dynamic maintenance method, as well as the forward convergence mechanism in the multi-branch exploration process. As one implementation method, the construction and updating process of the state causal graph includes: instantiating state objects in the multi-branch exploration task as graph nodes, instantiating state dependencies or verification data propagation relationships between state objects as graph edges, and constructing the state causal graph; responding to the receipt of newly added task execution results, parsing the task execution results to generate incremental graph data; writing the incremental graph data into the state causal graph, and updating the state attributes and confidence indices of relevant graph nodes based on the verification conclusions contained in the incremental graph data.

[0055] Specifically, such as Figure 1 As shown, the state-causal graph is not a static knowledge base, but a dynamic directed graph structure that reflects the real-time exploration state of the system. The graph nodes are internal computer representations of various state objects in a multi-branch exploration task. Each node contains machine-readable fields such as a globally unique identifier, type label, parameter snapshot, and metadata index. For example, a node representing a specific parameter configuration combination stores the corresponding input vector, environment version number, and generation timestamp; a node representing intermediate computation results stores the digest hash and precision index of the output tensor. Graph edges precisely depict the logical topology between nodes, including state dependency edges representing data flow and verification data propagation edges representing feedback relationships. Verification data propagation edges represent the reverse propagation path of verification conclusions from downstream result nodes to upstream causal nodes. For example, when the verification result of a parameter configuration combination (such as a performance index score) is used to update the confidence of its preceding dependent nodes, a verification data propagation edge is formed between them. This object-oriented graph structure enables the system to quickly locate the predecessor and successor relationships of any state in O(1) or O(logN) time complexity, providing an efficient indexing foundation for rollback and constraint extraction.

[0056] Regarding the dynamic maintenance of graphs, such as Figure 2As shown, the system employs an incremental update mechanism to handle high-frequency concurrent exploration tasks. When the task scheduler or external execution unit returns new task execution results, the processor does not directly modify the entire graph. Instead, it first parses the result into a standardized graph incremental data packet. This data packet contains the operation type (such as adding nodes, updating attributes, adding edges), the target object identifier, and the change payload. The system atomically persists the graph incremental data to the state causal graph through a transactional write interface, ensuring data consistency and traceability. More importantly, after the write is completed, the system automatically triggers the confidence propagation algorithm. Specifically, the processor reads the verification conclusions (such as verification passed, verification failed, partial support, etc., or continuous scores) contained in the graph incremental data, and combines them with a preset confidence evaluation model (such as the Bayesian update formula or the Dempster-Shafer evidence theory synthesis rule) to recalculate the confidence index of the affected nodes and their associated nodes. Taking Bayesian update as an example, the system follows the formula... Calculate the posterior confidence of the node, where This indicates the state assumption represented by the node (e.g., "this parameter configuration combination meets the target performance"). This indicates the newly received verification conclusion. This represents the current prior confidence level of the node. The likelihood probability of observing the verification conclusion under the premise that the state assumption holds (determined by the reliability level of the verification source). This refers to the updated posterior confidence score. For example, if a state object receives positive feedback from a highly reliable verification source, its confidence score will be increased by a predetermined weight; conversely, if it receives negative feedback or remains unverified for an extended period, its score will be reduced accordingly or it will be marked as a pending confirmation state. This data-driven automatic update mechanism enables the state causal graph to quantitatively characterize the credibility of each exploration path in real time, providing an objective calculation basis for subsequent rollback decisions and branch merging, and avoiding the subjective bias and lag caused by relying on human experience judgment.

[0057] In multi-branch parallel exploration scenarios, in addition to constraining failed paths, the system also needs to have the ability to automatically aggregate successful or compatible paths to improve overall convergence efficiency. As one implementation method, this approach also includes a branch merging process: when at least two different exploration branches are detected to produce state-compatible verification conclusions, the verification data levels and conflict rules corresponding to the at least two different exploration branches are obtained; based on the verification data levels and conflict rules, it is determined whether the at least two different exploration branches meet preset merging conditions; if the merging conditions are met, the state dependency chains of the at least two different exploration branches are retained, the verification data features of both parties are extracted and fused, and a merged exploration branch containing the fused state attributes is generated.

[0058] Specifically, state compatibility is determined automatically by the system, rather than through manual comparison. The processor periodically, or when triggered by specific events, scans the currently active exploration branches, identifying potentially compatible branches by calculating the similarity of state vectors of terminal nodes, parameter space overlap, or semantic embedding distance of validation conclusions. Once a candidate for merging is identified, the system retrieves the associated validation data levels (e.g., authority ratings of data sources, accuracy levels of validation methods, sample size, etc.) and pre-defined conflict rule sets (e.g., mutual exclusion constraints, priority strategies, timeliness windows, etc.). The system only determines that the merging conditions are met when the high-level validation data corroborates each other and there are no hard conflicts. This strict automated gating mechanism effectively prevents cross-contamination of erroneous information and ensures the robustness of the merged branch.

[0059] During the merging operation, the system employs a non-destructive fusion strategy. Unlike simple overwriting or deletion, the system fully preserves the state dependency chains of the original branches pointing to their respective historical ancestor nodes while generating the merged exploration branches. This means that the merged new branch logically has multiple parent nodes or virtual aggregate roots, and any subsequent backtracking operation on this new branch can trace back to the original context along multiple paths, ensuring the integrity of end-to-end auditing and fault location capabilities. Simultaneously, the processor mathematically fuses the verification data features of both sides, such as performing weighted averaging or variance merging on numerical indicators, and set intersection or voting on discrete labels, and writes the fused statistical features into the state attributes of the new branch. Through this automated branch merging mechanism, the system can quickly aggregate fragmented and effective information scattered across different exploration paths into high-confidence global knowledge, significantly reducing computational redundancy caused by repeatedly verifying the same or similar states, and accelerating the convergence process of multi-branch exploration tasks towards the optimal solution or stable state. It should be understood that the above graph construction, incremental update and branch merging processes are all completed collaboratively by the processor and memory inside the computer system. In essence, they are efficient management and optimization of the search space state, rather than a simple simulation of scientific research thinking or management processes.

[0060] Example 5

[0061] like Figure 1 As shown, this embodiment provides a branch rollback and spatial constraint system based on a state cause-effect graph. This system, together with method embodiment 1, forms a dual protection, focusing on implementing the technical solution from the perspective of system architecture and module interaction. The system includes a rollback trigger module, a constraint generation module, and a spatial pruning module. It should be understood that the above modules can be embodied as software functional units stored in memory and executed by a processor, or as dedicated hardware circuits (such as FPGA, ASIC), or combinations thereof, as long as they can realize the functional configuration and interconnection relationships of the modules described below.

[0062] The rollback trigger module, during the execution of a multi-branch exploration task, responds to the detection that the current exploration branch meets preset rollback trigger conditions, determines the target rollback node in the state causal graph for the current exploration branch, and identifies the failure path of the current exploration branch. Specifically, the rollback trigger module acts as the system's perception front-end, maintaining real-time communication with the task scheduler and state monitoring components through an event listening interface or polling mechanism. When it receives a system event indicating task anomalies, verification failures, or performance metrics exceeding limits, the module automatically triggers the rollback determination logic. In determining the target rollback node and failure path, the rollback trigger module does not directly process business data; instead, it sends a structured query request to the underlying graph storage engine to obtain a subgraph reference containing node ID sequences, edge attributes, and associated snapshot data. Subsequently, the module passes the encapsulated failure path identifier (e.g., a composite key containing the start node hash, end node hash, and path version number) to downstream modules via the internal high-speed bus or shared memory area. This design ensures the decoupling of rollback decisions from specific business logic, enabling the system to handle different types of exploration task exceptions in a unified manner, while ensuring that the failure information passed to subsequent modules is precise machine-readable data, rather than vague natural language descriptions.

[0063] The constraint generation module extracts state features from failed paths based on the state causal graph to generate invalid spatial constraints. Specifically, after receiving the failed path identifier from the rollback trigger module, the constraint generation module automatically loads the corresponding path context data. This module integrates a feature parsing engine and a rule instantiator, enabling it to extract key features such as invalid parameter windows and state blocking regions from execution logs, state snapshots, and verification feedback according to pre-configured strategies. More importantly, the constraint generation module transforms the extracted features into standard constraint objects conforming to the system's internal protocol (as described in Example 2), and publishes them to the system's constraint registry center or directly pushes them to the spatial pruning module through a standardized output interface. During this process, the constraint generation module is also responsible for validating and deduplicating the constraint objects to prevent the generation of erroneous constraint rules due to transient failures or data noise. By encapsulating feature extraction and object generation within independent modules, the system achieves a pipelined production of failure knowledge, allowing newly generated invalid spatial constraints to be reused by multiple downstream consumers (such as different search algorithms, visualization tools, or auditing services), greatly improving the utilization efficiency of system resources.

[0064] The spatial pruning module injects invalid spatial constraints into the subsequent candidate object generation process to prune the search space and generate new exploration branches based on the pruned search space. Specifically, the spatial pruning module is the control hub for the system's interaction with external exploration algorithms. This module interfaces with various types of candidate object generators (such as Bayesian optimizers, genetic algorithm engines, deep learning sampling models, or distributed task queue managers) through an adapter pattern. When a new invalid spatial constraint is received, the spatial pruning module automatically selects an appropriate injection strategy based on the currently active generator type. For example, for gradient-based optimizers, the module transforms the constraint into a differentiable penalty function and injects it through a callback interface; for discrete search algorithms, the module updates its internal blacklist or boundary mask; for generative models, the module directly modifies the sampling distribution parameters of its latent space. After completing the injection operation, the spatial pruning module also sends a priority adjustment instruction to the task scheduler to ensure that the exploration task of the new branch can obtain computing resources first. This proactive intervention mechanism enables historical failures to be transformed into substantial constraints on subsequent computation processes within milliseconds, fundamentally preventing the system from repeatedly investing in known ineffective spaces and significantly improving the convergence speed and resource output ratio of automated exploration tasks.

[0065] Through the collaborative work of the aforementioned modules, this embodiment constructs a closed-loop, automated state management and search optimization system. The modules interact via standardized data interfaces and control signals, achieving not only the technical effects described in the method embodiment but also providing excellent scalability and robustness at the system architecture level. For example, when new search algorithms need to be supported or new failure feature types are introduced, only the corresponding adapters or parsing plugins need to be upgraded, without reconstructing the entire system core. This provides a solid technical foundation for complex and ever-changing automated exploration scenarios.

[0066] Example 6

[0067] This embodiment provides an electronic device including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which, when executed, enables the at least one processor to perform the branch rollback and space constraint method based on state causal graphs as described in any of Embodiments 1 to 5. Specifically, the processor can be a computing unit with data processing capabilities, such as a central processing unit (CPU), graphics processing unit (GPU), field-programmable gate array (FPGA), or application-specific integrated circuit (ASIC), or a combination of multiple processors. The memory can include high-speed random access memory (RAM) or non-volatile memory, such as hard disk, solid-state drive, flash memory, or optical disk. In practical deployment, the electronic device can be a standalone server, workstation, personal computer, or a node device or edge computing terminal in a distributed computing cluster. When the processor reads and executes the instructions in the memory, a complete computational closed loop is achieved at the hardware level, extracting invalid space constraints from failed paths and pruning the search space. This allows multi-branch exploration tasks to run efficiently and automatically on physical devices, avoiding computational waste caused by improper hardware resource scheduling or missing software logic.

[0068] This embodiment also provides a computer-readable storage medium storing computer instructions for instructing a computer to execute the branch rollback and space constraint method based on state causal graphs as described in any one of embodiments 1 to 5. Specifically, the computer-readable storage medium can be a tangible, non-transient storage carrier, including but not limited to USB flash drives, portable hard drives, CD-ROMs, DVDs, magnetic tapes, disks, optical cards, semiconductor memories, etc., or a signal carrier capable of being transmitted and downloaded to a local device via wired or wireless networks. When the program code stored on this storage medium is loaded and executed by a computer, it can transform the abstract branch rollback strategy and space constraint algorithm into a specific machine operation sequence, thereby endowing general-purpose computing devices with specific state management and search optimization capabilities. It should be understood that regardless of the specific hardware form or storage medium type used, as long as it internally carries program instructions capable of implementing the method described in this application, it falls within the protection scope of this embodiment. Through the combination of the aforementioned electronic devices and storage media, the technical solution of this application can move beyond the purely theoretical level and be put into practical application in actual industrial R&D platforms, automated laboratory control systems, or cloud AI services, effectively improving the execution efficiency and resource utilization of complex exploration tasks.

[0069] Example 7

[0070] To further verify the effectiveness and practicality of the technical solutions described in the foregoing embodiments in real-world complex computational tasks, this embodiment provides a specific application scenario of a branch rollback and spatial constraint method based on state causal graphs in an AI-assisted scientific research platform. It should be understood that this embodiment is merely an illustrative example of the technical solutions of this application and not a limitation on its scope of protection. In this embodiment, taking the metal catalyst ligand optimization task as an example, it demonstrates how the system solves the problem of wasted computational resources in high-cost exploration tasks through automated state management and spatial pruning mechanisms.

[0071] In this application scenario, the AI-assisted scientific research platform is configured to execute multi-branch exploration tasks, aiming to find organometallic complexes that possess both high catalytic activity and high thermal stability. The system instantiates research elements such as "ligand structure," "reaction temperature," and "solvent type" as attribute values ​​of state objects, and instantiates performance indicators such as "catalytic conversion rate," "half-life," and "decomposition temperature" as metrics for validation data. The entire optimization process is automatically driven by the task scheduler, requiring no real-time manual intervention.

[0072] Specifically, in the initial stage of task execution, the system constructs an initial exploration branch based on prior knowledge or a generative model. This branch's corresponding state object includes the parameter combination of "specific phosphine ligand L1" and "reaction temperature 120℃," with the preset verification objective being "improving catalytic activity." However, as the task progresses, when the system receives simulation results or automated experimental feedback data for this parameter combination, the verification data shows that although the catalytic activity reaches the expected threshold, the thermal stability index is below the safety baseline (e.g., half-life less than 10 hours). At this point, the system's monitoring component automatically determines that the verification conclusion of the current exploration branch conflicts with the preset multi-objective optimization function, satisfying the preset rollback trigger condition. It is important to emphasize that this determination is entirely based on numerical comparison and logical rules, rather than the researcher's subjective evaluation, ensuring the objectivity and real-time nature of the rollback decision.

[0073] Upon detecting the rollback trigger condition, the system immediately suspends the generation of subsequent tasks in the current branch and backtracks upwards along the state cause-effect graph to locate the nearest ancestor node with stable state attributes that is unaffected by this failure as the target rollback node. Simultaneously, the system marks the path in the current branch from the target rollback node to the termination node as a failed path. Based on this, the constraint generation module automatically parses the execution logs and state snapshots on this failed path to identify the key factor combination that led to the stability failure. In this example, the system analysis revealed that the failure was not caused solely by ligand L1, nor solely by the 120°C temperature, but rather by the coupling of "ligand L1" with the specific parameter "temperature > 100°C". Accordingly, the system extracts the state feature of "insufficient stability at high temperatures" and transforms it into a structured invalid spatial constraint object.

[0074] The invalid space constraint object is instantiated internally by the computer as a data structure containing a precise mathematical definition. The blocking region field is assigned a logical expression: The system clearly defines the parameter subspace that is prohibited from exploration; the scope field limits the constraint to only apply to the "ligand selection" and "temperature optimization" parameter dimensions; and the reason field records the error code "STABILITY_FAILURE_HIGH_TEMP" so that subsequent algorithms can select the appropriate processing strategy based on the error type. This fine-grained object encapsulation transforms what was originally vague business experience into rule entities that can be precisely computed by machines.

[0075] Subsequently, the spatial pruning module injects this invalid spatial constraint into the subsequent candidate object generation process. In this embodiment, the system uses a Bayesian optimization algorithm as the candidate generator and transforms the aforementioned constraint object into a penalty term in the evaluation function. Specifically, when calculating the acquisition function value of a new round of candidate points, the system automatically adds a negative weight penalty term. When candidate points When the parameter combination hits the above-mentioned blocking region, Taking extremely large negative numbers (e.g., -1000) causes the overall score of the candidate point to be far below the preset threshold; while when the candidate point is located in the valid region... The value is zero. In this way, the system mathematically forces a reduction in the sampling probability of known invalid regions, causing the optimization algorithm to automatically avoid the combination of "ligand L1 + high temperature" in the next iteration, and instead explore the "ligand L1 + low temperature" region or other types of ligand molecules.

[0076] While the aforementioned rollback and spatial pruning processes continued, the system also achieved multi-path positive convergence through a branch merging mechanism. For example, after avoiding the invalid region of "ligand L1 + high temperature", the system proceeded in parallel along two exploration branches: the first branch explored the parameter combination of "ligand L1 + low temperature (80℃)", and the second branch explored the parameter combination of "phosphine ligand L2 + medium temperature (100℃)". After several rounds of iterative verification, both branches obtained verification conclusions that met the thermal stability requirements (half-lives both exceeded 15 hours), and the catalytic activity indicators were in similar ranges. At this point, the system detected that the verification conclusions of the two branches were compatible in the "high thermal stability" dimension by calculating the similarity of the state vectors of the terminal nodes of the two branches. Then, it retrieved the verification data levels of both parties (the first branch came from high-precision density functional simulation, and the second branch came from the actual measurement feedback of the automated experimental platform, both of which belong to high-reliability verification sources) and compared them with the preset conflict rule set. Since the validation conclusions of the two branches corroborate each other in terms of stability indices and there are no mutually exclusive constraints, the system determines that the merging condition is met. Therefore, it retains the state dependency chains of each branch, performs a weighted average on the catalytic activity values ​​of both branches, performs a merging operation on the stability variances, and generates a merged exploration branch that includes the fused state attributes. This merged branch inherits the complete validation context of both the "ligand L1 low-temperature route" and the "ligand L2 medium-temperature route," allowing subsequent optimizations to continue on a higher confidence level. This avoids repeatedly validating the same or similar parameter spaces on two independent branches, thus accelerating the overall convergence process.

[0077] Through the automated execution of the entire process described above, this embodiment demonstrates the core value of the technical solution in real-world R&D scenarios. The system not only successfully retains the failure memory regarding the instability of ligand L1 at high temperatures, but more importantly, it transforms this memory into a substantial constraint on subsequent computational processes. Compared to the repeated trial-and-error processes caused by the lack of structured failure records in traditional methods, the technical solution of this application enables the system to complete the closed loop from fault detection to spatial pruning within milliseconds, directly reducing ineffective investment in time-consuming simulations or expensive experiments. Statistics show that, under the same computing power budget, the platform using the method described in this embodiment significantly improves the yield of effective candidate molecules compared to the baseline platform without this method, fully demonstrating the significant technical effect of this solution in improving computing resource utilization and accelerating R&D convergence.

[0078] It should be understood that although this embodiment uses catalyst ligand optimization as an example for detailed description, the technical solution of this application is also applicable to other computer-aided research and development scenarios involving multi-parameter spatial exploration, such as battery material formulation screening, drug molecule design, alloy composition optimization, and semiconductor process parameter tuning. In these scenarios, as long as there are dependencies between state objects and feedback loops of verification data, the branch rollback and spatial constraint mechanisms described in this application can be used to improve search efficiency. Therefore, the specific parameter names, index types, and algorithm selections in this embodiment should be considered exemplary and not as limitations on the scope of protection of this application.

[0079] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A branch rollback and spatial constraint method based on state-cause-effect graphs, characterized in that, include: During the execution of a multi-branch exploration task, in response to the detection that the current exploration branch meets the preset rollback trigger condition, the target rollback node of the current exploration branch in the state cause-effect graph is determined, and the failure path of the current exploration branch is determined. Based on the state causal graph, state features are extracted from the failed paths to generate invalid space constraints, including: Analyze the execution logs and status snapshots in the failed paths to extract at least one of the invalid parameter windows, status blocking regions, and error modes that caused the exploration failure; The extracted invalid parameter window, the state blocking region, or the error mode are converted into structured constraint rules, which serve as the invalid spatial constraints. The invalid spatial constraints are injected into the subsequent candidate object generation process to prune the search space, and a new exploration branch is generated based on the pruned search space.

2. The method according to claim 1, characterized in that, The step of injecting the invalid space constraints into the subsequent candidate object generation process to prune the search space includes: The invalid spatial constraints are injected into the subsequent candidate object generation process as at least one of the following: the input mask of the generative model, the penalty term of the evaluation function, or the boundary condition of the search algorithm. In the subsequent candidate object generation process, based on the injected input mask, the penalty term, or the boundary conditions, candidate objects falling within the range defined by the invalid space constraints are filtered or downweighted to prune the search space.

3. The method according to claim 1, characterized in that, The structured constraint rules are instantiated as constraint objects containing the following data fields: The failure identifier field is configured to assign a globally unique identifier to track the source and version of the failed path; The scope field is configured to limit the parameter dimension, environment configuration, or state space range in which the constraint object takes effect; The reason field can be configured to record the exception type, triggering condition, or dependency conflict that caused the exploration to fail. The blocking region field can be configured to precisely define the combination of parameters or state transition paths that are prohibited from being explored, in the form of a continuous numerical range, a discrete enumeration set, or a logical expression. Reusable rule fields can be configured to indicate the inheritance priority, attenuation coefficient, and propagation conditions of the constraint object in cross-branch exploration or cross-task scheduling scenarios.

4. The method according to claim 2, characterized in that, In the subsequent candidate object generation process, filtering or downweighting candidate objects falling within the range defined by the invalid spatial constraints based on the injected input mask, the penalty term, or the boundary conditions includes: When the invalid space constraint is used as a penalty term in the evaluation function, when calculating the fitness score or objective function value of the candidate object, a negative weight penalty is applied to the candidate object that falls into the invalid parameter range defined by the invalid space constraint, so that its ranking priority is lower than a preset threshold. When the invalid spatial constraint is used as the boundary condition of the search algorithm, when the task scheduler generates the next round of exploration task queue, the candidate task nodes whose parameter combinations hit the invalid parameter range are directly eliminated, and the execution priority of the next round of exploration task queue is updated. When the invalid spatial constraints are used as the input mask of the generative model, during the sampling phase of candidate set generation, the probability distribution weights corresponding to the invalid parameter range are reset to zero to prevent the generation of candidate objects that fall within the range of the invalid spatial constraints.

5. The method according to claim 1, characterized in that, The process of constructing and updating the state cause-effect graph includes: The state objects in the multi-branch exploration task are instantiated as graph nodes, and the state dependencies or verification data propagation relationships between the state objects are instantiated as graph edges to construct the state causal graph. In response to receiving a new task execution result, the task execution result is parsed to generate graph incremental data; The incremental graph data is written into the state causal graph, and the state attributes and confidence indices of the relevant graph nodes are updated based on the verification conclusions contained in the incremental graph data.

6. The method according to claim 5, characterized in that, The method also includes a branch merging process: When at least two different exploration branches are detected to produce state-compatible verification conclusions, the verification data level and conflict rules corresponding to the at least two different exploration branches are obtained; Based on the verification data level and the conflict rules, determine whether the at least two different exploration branches meet the preset merging conditions; If the merging condition is met, the state dependency chains of the at least two different exploration branches are retained, the verification data features of both parties are extracted and fused, and a merged exploration branch containing the merged state attributes is generated.

7. A branch rollback and spatial constraint system based on state-cause-effect graphs, characterized in that, include: The rollback trigger module is used to determine the target rollback node of the current exploration branch in the state cause-effect graph and determine the failure path of the current exploration branch in response to the detection that the current exploration branch meets the preset rollback trigger conditions during the execution of a multi-branch exploration task. The constraint generation module is used to extract state features from the failed paths based on the state causal graph and generate invalid space constraints, including: parsing the execution logs and state snapshots in the failed paths, extracting at least one of invalid parameter windows, state blocking regions, and error modes that caused the exploration failure; and converting the extracted invalid parameter windows, state blocking regions, or error modes into structured constraint rules as the invalid space constraints. The spatial pruning module is used to inject the invalid spatial constraints into the subsequent candidate object generation process to prune the search space and generate new exploration branches based on the pruned search space.

8. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 6.