Incremental control method, device and electronic equipment for flow interface structure component tree

CN122363801APending Publication Date: 2026-07-10XIAN SECLOVER INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAN SECLOVER INFORMATION TECH CO LTD
Filing Date
2026-05-09
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies struggle to render and respond in advance when the structural data is not yet fully output when outputting large model streaming interface structures, and cannot simultaneously meet the local stability update requirements during subsequent structural corrections.

Method used

Incremental semantic segmentation is performed by obtaining the original structural description token stream, intermediate states are updated in real time using fault-tolerant parsing context, candidate component subtrees are generated, and stability control is performed to generate the target stable interface.

Benefits of technology

It enables the early parsing and visualization of the interface structure, reducing the user's perceived latency, and maintaining stability during the continuous completion of the streaming intermediate structure, avoiding the repeated destruction and reconstruction of components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363801A_ABST
    Figure CN122363801A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, and electronic device for incremental control of a streaming interface structure component tree. The method includes: acquiring an original structure description token stream and performing incremental semantic segmentation on the original structure description token stream to generate a structure control unit token stream; updating the intermediate state of the current interface structure component tree through a real-time maintained fault-tolerant parsing context to obtain the updated intermediate state; judging the current target node based on the fault-tolerant parsing context to generate a candidate component subtree; and performing stability control on each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the structure control unit token stream to generate a target stable interface. This solution can preprocess the interface when a large model is continuously streaming and the structure data is not yet fully output, and it also effectively accommodates the local stability update requirements during subsequent structure corrections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus and electronic device for incremental control of a streaming interface structure component tree. Background Technology

[0002] With the rapid development of large-scale model technology, solutions that automatically generate interface description data based on natural language and dynamically parse and render the interface on the front end have been widely used in scenarios such as smart forms and low-code deployment. Large-scale models can generate structured data such as interface layout, component types, and interaction logic according to user intent, significantly improving interface development efficiency and dynamic interaction capabilities.

[0003] In such systems, large models often use a streaming approach to incrementally output interface structure descriptions. Before the structure data is fully output, the front-end runtime often needs to deal with a large amount of intermediate structure information, making it difficult to directly render and respond in advance.

[0004] Therefore, the current mainstream solutions either wait for the complete structural data to be generated before parsing it in a unified manner, or perform segmented rendering based on the smallest closable structural unit. However, neither of these solutions can effectively process the interface in advance when the large model is continuously streaming and the structural data has not yet been fully output, nor can they adequately meet the local stability update requirements during subsequent structural corrections. Summary of the Invention

[0005] This application aims to at least solve the technical problems existing in the prior art. To this end, the first aspect of this application proposes an incremental control method for a flow interface structure component tree, the method comprising: Obtain the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The intermediate state of the current interface structure component tree is updated by maintaining a fault-tolerant resolution context in real time, resulting in the updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates, and binding relationship caches. The intermediate state is used to control the continued generation of the interface. The current target node is judged based on the fault-tolerant parsing context, and a candidate component subtree is generated; the candidate component subtree is used for pre-rendering of local areas of the interface; Based on the fault-tolerant parsing context and the Token flow of the structural control unit, stability control is performed on each candidate node in the candidate component subtree to generate the target stable interface.

[0006] In one possible implementation, the current target node is judged based on the fault-tolerant resolution context, and a candidate component subtree is generated, including: Obtain the intermediate state corresponding to the current target node based on the fault-tolerant parsing context; Based on the intermediate state, determine whether the current target node meets the preset candidate generation conditions, and obtain the judgment result; If the current target node is determined to meet the preset candidate generation conditions based on the judgment result, the current target node will be regarded as a candidate node; Candidate component nodes are created based on the component type of the uniquely determined candidate nodes. The corresponding key display attributes are written into the node instance, and a candidate component subtree is generated by combining the current parent-child hierarchy.

[0007] In one possible implementation, the preset candidate generation conditions are that the component type of the current target node has been uniquely determined, the mounting position of the parent node can be confirmed, the completeness rate of key display attributes reaches a preset threshold, and no type conflict or hierarchical change occurs within the cycle of multiple consecutive structure control unit Token flows.

[0008] In one possible implementation, the method further includes: If the judgment result determines that the current target node has not met the preset candidate generation conditions, a preset intermediate state placeholder mechanism is adopted to retain the attribute placeholder, event placeholder and data binding placeholder corresponding to the current target node respectively, and a pending closure mark is attached to the current target node.

[0009] In one possible implementation, stability control is performed on each candidate node in the candidate component subtree based on the fault-tolerant resolution context and the token flow of the structural control unit to generate a target stable interface, including: After evaluating the stability of each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the token flow of the structural control unit, a stability checkpoint is established; wherein, the stability checkpoint is used to record the state of the candidate component subtree that has been determined and will not change in the current stage. The instantiation process of candidate nodes is controlled based on stable checkpoints, and the impact of the newly arrived structural component tree on the already generated candidate component subtrees is determined during the continuous input of the token stream of the structural control unit. If the newly arrived structural component tree has overturned the candidate component subtree based on the impact results, a local rollback reconstruction is performed based on the candidate component subtree and the stability checkpoint, and the node path of the candidate component node is updated with the minimum disturbance increment. When the original structure description token stream output ends or no new structure control unit token stream is received within a consecutive preset time window, the current streaming interface structure is determined to have entered the final consistency convergence stage, and the target stable interface is generated.

[0010] In one possible implementation, after evaluating the stability of each candidate node in the candidate component subtree based on the fault-tolerant resolution context and the token flow of the structural control unit, stability checkpoints are established, including: For each candidate node, the continuous change state of the candidate node is obtained based on the fault-tolerant parsing context and the token flow of the structural control unit; among which, the continuous change state includes the continuous consistency of component type, the continuous stability of key attributes, the fluctuation of parent-child hierarchy relationship, and the degree of change of child node set. Candidate nodes are scored based on their continuously changing states to generate node stability. When the node stability reaches the preset checkpoint establishment threshold, a stability checkpoint is established for the candidate node.

[0011] In one possible implementation, a local rollback reconstruction is performed based on the candidate component subtree and stability checkpoints, including: Obtain the node path of the candidate node, and search upwards based on the node path to find the parent node that has most recently established a stable checkpoint; Using the stable checkpoint corresponding to the parent node as the recovery starting point, release the candidate component subtrees that have been overturned and are below the candidate nodes on the node path; The interface structure and component state of the nodes above the candidate nodes and other sibling nodes on the node path remain unchanged, and a new candidate component subtree is regenerated based on the new structure control unit Token flow.

[0012] A second aspect of this application discloses a flow interface structure component tree incremental control device, the device comprising: The acquisition module is used to acquire the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The update module is used to update the intermediate state of the current interface structure component tree through a fault-tolerant resolution context maintained in real time, and obtain the updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates and binding relationship caches. The intermediate state is used to control the continued generation of the interface. The judgment module is used to judge the current target node based on the fault-tolerant parsing context and generate a candidate component subtree; the candidate component subtree is used for pre-rendering of local areas of the interface. The generation module is used to perform stability control on each candidate node in the candidate component subtree based on the fault-tolerant resolution context and the token flow of the structure control unit, and generate the target stable interface.

[0013] In one possible implementation, the above-mentioned determination module is specifically used for: Based on the fault-tolerant resolution context, the current target node is evaluated, and a candidate component subtree is generated, including: Obtain the intermediate state corresponding to the current target node based on the fault-tolerant parsing context; Based on the intermediate state, determine whether the current target node meets the preset candidate generation conditions, and obtain the judgment result; If the current target node is determined to meet the preset candidate generation conditions based on the judgment result, the current target node will be regarded as a candidate node; Candidate component nodes are created based on the component type of the uniquely determined candidate nodes. The corresponding key display attributes are written into the node instance, and a candidate component subtree is generated by combining the current parent-child hierarchy.

[0014] In one possible implementation, the preset candidate generation conditions are that the component type of the current target node has been uniquely determined, the mounting position of the parent node can be confirmed, the completeness rate of key display attributes reaches a preset threshold, and no type conflict or hierarchical change occurs within the cycle of multiple consecutive structure control unit Token flows.

[0015] In one possible implementation, the above-described device is further used for: If the judgment result determines that the current target node has not met the preset candidate generation conditions, a preset intermediate state placeholder mechanism is adopted to retain the attribute placeholder, event placeholder and data binding placeholder corresponding to the current target node respectively, and a pending closure mark is attached to the current target node.

[0016] In one possible implementation, the above-mentioned generation module is specifically used for: After evaluating the stability of each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the token flow of the structural control unit, a stability checkpoint is established; wherein, the stability checkpoint is used to record the state of the candidate component subtree that has been determined and will not change in the current stage. The instantiation process of candidate nodes is controlled based on stable checkpoints, and the impact of the newly arrived structural component tree on the already generated candidate component subtrees is determined during the continuous input of the token stream of the structural control unit. If the newly arrived structural component tree has overturned the candidate component subtree based on the impact results, a local rollback reconstruction is performed based on the candidate component subtree and the stability checkpoint, and the node path of the candidate component node is updated with the minimum disturbance increment. When the original structure description token stream output ends or no new structure control unit token stream is received within a consecutive preset time window, the current streaming interface structure is determined to have entered the final consistency convergence stage, and the target stable interface is generated.

[0017] In one possible implementation, the above-mentioned determination module is further used for: For each candidate node, the continuous change state of the candidate node is obtained based on the fault-tolerant parsing context and the token flow of the structural control unit; among which, the continuous change state includes the continuous consistency of component type, the continuous stability of key attributes, the fluctuation of parent-child hierarchy relationship, and the degree of change of child node set. Candidate nodes are scored based on their continuously changing states to generate node stability. When the node stability reaches the preset checkpoint establishment threshold, a stability checkpoint is established for the candidate node.

[0018] In one possible implementation, the above-mentioned determination module is further used for: Obtain the node path of the candidate node, and search upwards based on the node path to find the parent node that has most recently established a stable checkpoint; Using the stable checkpoint corresponding to the parent node as the recovery starting point, release the candidate component subtrees that have been overturned and are below the candidate nodes on the node path; The interface structure and component state of the nodes above the candidate nodes and other sibling nodes on the node path remain unchanged, and a new candidate component subtree is regenerated based on the new structure control unit Token flow.

[0019] A third aspect of this application provides an electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the incremental control method for the streaming interface structure component tree as described in the first aspect.

[0020] The fourth aspect of this application proposes a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the incremental control method for the streaming interface structure component tree as described in the first aspect.

[0021] The embodiments of this application have the following beneficial effects: The incremental control method for a streaming interface structure component tree provided in this application includes: acquiring the original structure description token stream, performing incremental semantic segmentation on the original structure description token stream to generate a structure control unit token stream, updating the intermediate state of the current interface structure component tree through a real-time maintained fault-tolerant parsing context to obtain the updated intermediate state, judging the current target node based on the fault-tolerant parsing context to generate a candidate component subtree, and performing stability control on each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the structure control unit token stream to generate a target stable interface. This solution generates candidate component subtrees in advance based on the intermediate state, thereby achieving early parsing and early visualization of the interface structure, reducing the user's perceived delay while waiting for the complete interface to be generated; furthermore, by performing stability control, the streaming intermediate structure can maintain high runtime stability during continuous completion, avoiding repeated destruction and reconstruction of components due to frequent structure completion. Attached Figure Description

[0022] Figure 1 A block diagram of a computer device provided in an embodiment of this application; Figure 2 A flowchart illustrating the steps of an incremental control method for a flow-type interface structure component tree provided in this application embodiment; Figure 3 A flowchart illustrating the steps for generating a candidate component subtree is provided in an embodiment of this application. Figure 4 A flowchart illustrating the steps for stability control provided in this application embodiment; Figure 5 A flowchart illustrating the steps for establishing a stable checkpoint is provided in this application embodiment; Figure 6 A flowchart illustrating the steps for establishing a stable checkpoint is provided in this application embodiment; Figure 7 This is a structural block diagram of a flow interface structure component tree incremental control device provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of 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 embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0024] The existing technology has the following main problems: 1. Dependency structure closure: The component tree construction process can only begin after the structure is complete or the smallest closure unit has appeared.

[0025] 2. Lack of intermediate state fault tolerance: When there is an unclosed structure, missing fields, or type drift, it is impossible to continue generating reusable partial component subtrees.

[0026] 3. Component tree structure oscillation: When intermediate nodes are modified by subsequent tokens, instantiated components are prone to repeated destruction and reconstruction, causing subtrees to be remounted.

[0027] 4. Poor state continuity: User input state, local component state, and asynchronous request state are easily lost due to factor tree reconstruction.

[0028] 5. Lack of local reversible recovery mechanism: When the inference of the preorder structure is overturned by the subsequent token, the existing technology can usually only refresh the entire data and cannot perform local recovery on the target component subtree.

[0029] In view of this, this application proposes a method, device and electronic device for incremental control of streaming interface structure component tree. This solution can preprocess the interface when the large model is continuously streaming and the structure data has not yet been fully output, and can well take into account the local stability update requirements during subsequent structure correction.

[0030] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values ​​may in practice be based on additional conditions or beyond the stated values.

[0031] The incremental control method for the component tree of the flow interface structure provided in this application can be applied to computer devices (electronic devices). The computer device can be a server or a terminal. The server can be a single server or a server cluster composed of multiple servers. This application does not specifically limit this. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices.

[0032] Taking a computer device as an example, Figure 1 A block diagram of a server is shown, such as Figure 1As shown, the server may include a processor and memory connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. When the computer program is executed by the processor, it implements a streaming interface structure component tree incremental control method.

[0033] Those skilled in the art will understand that Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the server to which the present application is applied. Optionally, the server may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0034] It should be noted that the execution subject of the embodiments of this application can be a computer device or a streaming interface structure component tree incremental control device. The following method embodiments will be described with a computer device as the execution subject.

[0035] Figure 2 This document presents a flowchart illustrating the steps of an incremental control method for a flow-based interface structure component tree, as provided in an embodiment of this application. Figure 2 As shown, the method includes the following steps: Step 202: Obtain the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream.

[0036] The large model can respond to user natural language requests by outputting the original structural description data of the interface in a streaming, token-by-token manner. This original structural description data can be represented using JSON, JSON-like languages, HTML, XML, or a custom component description language, and is used to describe component types, node attributes, hierarchical relationships, layout information, and interactive behaviors. The original structural description token stream output by the large model can be written to a streaming buffer in the order of output for subsequent use.

[0037] After obtaining the original structure description token stream, incremental semantic segmentation can be performed on the original structure description token stream to generate a structure control unit token stream. Specifically, incremental semantic segmentation can be performed based on preset structure semantic rules to generate a minimum structure control unit, thereby obtaining the structure control unit token stream.

[0038] The preset structural semantic rules can be determined based on different control effects on the component tree topology, node instantiation timing, event side effects, and external data dependencies. The resulting structural control unit token flow can include component type identifier token, tag start / end token, attribute key token, child node hierarchy control token, event description token, and data source binding token.

[0039] The component type identifier token identifies the component type, tag type, or component class instance type corresponding to the current node, determining the instantiation category of the candidate component node. The tag start / end token identifies the interface lifecycle boundary and maintains the parent-child stack and unclosed node set. The attribute key-value token describes the node style, layout parameters, display text, input prompts, and other key attributes, and is used in subsequent node stability assessments to calculate key attribute stability rates. The child node hierarchy control token controls the entry, exit, and mounting path switching of child nodes to maintain the parent-child hierarchy in the component tree. The event description token describes the node's interactive behavior, event listening targets, and event triggering logic, serving as the basis for delayed event binding control. The data source binding token describes the data dependencies between the node and asynchronous data sources, API requests, two-way bound variables, or proxy tool results.

[0040] This allows for differentiated updates to the fault-tolerant resolution context at runtime based on different types of tokens. Specifically, the component type identifier token is used to drive type inference for candidate component nodes; the tag start / end token is used to update unclosed node paths; the attribute key-value token is used to update the attribute candidate cache; the child node hierarchy control token is used to update the current parent node mounting position; and the event description token and data source binding token are used to control the delayed execution strategy of node instantiation.

[0041] Step 204: Update the intermediate state of the current interface structure component tree through the real-time maintained fault-tolerant resolution context to obtain the updated intermediate state.

[0042] The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates, and binding relationship caches. Intermediate states are used to control the continued generation of the interface.

[0043] Upon receiving the Token stream from the aforementioned structure control unit, the runtime does not wait for all structures to be complete before processing. Instead, it continuously maintains a current interface parsing state to record where the parsing has progressed, which structures are not yet finished, and which information is still being supplemented. This allows the runtime to continue generating the interface even when the structure is not closed. Here, "not closed structure" means that the structure data has not yet been completely output.

[0044] Specifically, the runtime maintains a parsing context that updates in real time with the token, used to describe the intermediate state of the current component tree. This context can be understood as a "runtime draft recorded as it is parsed," and its content includes at least: First, record the current location path being generated, that is, the hierarchical position of the current node in the interface structure, which is used to determine where the new node should be attached.

[0045] Secondly, maintain a parent-child hierarchy stack to indicate which parent node the current parser is under. For example, entering... <form>When a node is pushed onto the stack, subsequent child nodes are attached to it by default, allowing the structure to continue building even before the end tag is encountered.

[0046] At the same time, it records which nodes have started but not yet ended; for example, nodes that have appeared but not yet ended.< / form> If a node has not yet been reached, it will be marked as "unclosed", but it is still allowed to continue generating substructures downwards.

[0047] For attribute information, the runtime caches the attributes that have already been received, as well as attribute fields that have not yet been fully received. For example, if an attribute value is to be assembled from multiple structural control unit tokens, it is temporarily stored and then completed later.

[0048] When the component type is not yet clear, the runtime can temporarily record multiple possible type candidates, and the final type will be determined after the subsequent structure control unit Token adds more information.

[0049] In addition, event binding information and data source binding relationships are also cached at runtime and will not take effect immediately. They will be processed uniformly after the structure is stable.

[0050] During operation, different types of structure control unit tokens will trigger different update behaviors. For example, when receiving new component or tag start information, the current hierarchy is updated; when receiving attribute information, the current node attributes are supplemented; when receiving child node hierarchy change information, the current mounting position is adjusted; when receiving event or data binding information, it is cached first and not executed immediately.

[0051] Based on this, the system can continue to generate interfaces without waiting for the entire structure to be fully closed. This method allows the runtime to maintain a usable intermediate parsing state while the structure is continuously being generated and is not yet complete, thus supporting the early generation of subsequent candidate component subtrees without interrupting the processing flow due to incomplete structure.

[0052] Step 206: Based on the fault-tolerant resolution context, judge the current target node and generate candidate component subtrees.

[0053] Among them, the candidate component subtree is used for pre-rendering of local areas of the interface. The candidate component subtree refers to the intermediate component data that is pushed out in advance based on the current parsing context when the original structure description data has not been completely closed, some attribute fields have not been completed, or the child node structure is still in the process of continuous generation.

[0054] In some alternative embodiments, such as Figure 3 As shown, Figure 3 A flowchart illustrating the steps for generating a candidate component subtree, as provided in this application embodiment, includes: Step 302: Obtain the intermediate state corresponding to the current target node based on the fault-tolerant resolution context.

[0055] Step 304: Determine whether the current target node meets the preset candidate generation conditions based on the intermediate state, and obtain the judgment result.

[0056] Step 306: If the current target node meets the preset candidate generation conditions based on the judgment result, the current target node is selected as a candidate node.

[0057] Step 308: Create candidate component nodes based on the component type of the uniquely determined candidate nodes, write the corresponding key display attributes into the node instance, and generate candidate component subtrees in combination with the current parent-child hierarchy.

[0058] Specifically, the intermediate state corresponding to the current target node can be obtained from the fault-tolerant resolution context. This intermediate state includes the mounting path, parent node context, candidate component type, and confirmed attribute information of the current target node. Then, a minimum instantiable constraint determination is performed on the current target node. Specifically, it can be determined whether the current target node meets the preset candidate generation conditions based on the intermediate state, and the determination result is obtained. If it is determined from the determination result that the current target node meets the preset candidate generation conditions, the current target node is selected as a candidate node.

[0059] Optionally, the preset candidate generation conditions are that the component type of the current target node has been uniquely determined, the mounting position of the parent node can be confirmed, the completeness rate of key display attributes reaches a preset threshold, and no type conflict or hierarchical change occurs within the cycle of multiple consecutive structure control unit Token flows.

[0060] After meeting the aforementioned preset candidate generation conditions, candidate component nodes can be created based on the confirmed component types, and the currently stable attributes are written to the node instances. For attribute fields, event descriptions, and data binding relationships that are not yet complete, attribute placeholders, event placeholders, and data binding placeholders are reserved respectively to ensure that the node can enter the rendering process in advance even if it is not fully closed. Subsequently, the runtime continues to recursively generate corresponding candidate child nodes for child nodes that have met the conditions based on the current parent-child hierarchy.

[0061] In some optional embodiments, if it is determined based on the judgment result that the current target node has not met the preset candidate generation conditions, a preset intermediate state placeholder mechanism is adopted to retain the attribute placeholder, event placeholder and data binding placeholder corresponding to the current target node respectively, and a pending closure mark is attached to the current target node to indicate that the node still allows subsequent tokens to continue to supplement the child node structure, attribute fields or interaction logic.

[0062] In this embodiment, the above method enables the renderingable intermediate component subtree to be formed in advance during the continuous generation of the streaming structure without waiting for the complete structure to close.

[0063] Step 208: Based on the fault-tolerant parsing context and the Token flow of the structural control unit, perform stability control on each candidate node in the candidate component subtree to generate the target stable interface.

[0064] Among them, the stability control of the component tree can solve the problem of component oscillation caused by continuous intermediate state correction. In some optional embodiments, such as Figure 4 As shown, Figure 4 A flowchart illustrating stability control steps provided in this application includes: Step 402: After evaluating the stability of each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the Token flow of the structural control unit, establish a stability checkpoint.

[0065] Among them, stability checkpoints are used to record the state of candidate component subtrees that have been determined and will not change at the current stage. In some optional embodiments, such as Figure 5 As shown, Figure 5 A flowchart illustrating the steps for establishing a stable checkpoint, as provided in this application embodiment, includes: Step 502: For each candidate node, obtain the continuously changing state of the candidate node based on the fault-tolerant parsing context and the token flow of the structure control unit.

[0066] Step 504: Score the candidate nodes based on their continuously changing states to generate node stability.

[0067] Step 506: When the node stability reaches the preset checkpoint establishment threshold, establish the stability checkpoint corresponding to the candidate node.

[0068] After the candidate component subtree is generated, the runtime performs a stability assessment on each candidate node in the candidate component subtree based on the current fault-tolerant resolution context and the continuous change state of the structure control unit Token, in order to determine the possibility of structural modification of the node during the subsequent input of the structure control unit Token stream. The continuous change state includes the continuous consistency of component type, the continuous stability of key attributes, the fluctuation of parent-child hierarchy relationship, and the degree of change of child node set.

[0069] Candidate nodes are scored based on their continuously changing states to generate node stability. Optionally, the node stability... It can be represented as: ; in, Indicates the consistency rate of component types; Indicates the stability rate of key attributes; Indicates the stability rate of the parent-child hierarchical relationship; Indicates the rate of change of the set of child nodes; , , , These are the corresponding weights, and the sum of all weights is 1.

[0070] The node state can be divided based on node stability. When the node stability is below the first threshold, the node is in a transient state. When the node stability reaches the first threshold but is below the second threshold, the node is in a checkable state. When the node stability is above the second threshold and remains stable within the cycle of multiple consecutive structure control unit token flows, the node enters a stable state.

[0071] The stability of a node gradually increases when its type remains consistent, its key attributes remain unchanged, and its hierarchical relationship remains stable over several consecutive token cycles. Conversely, its stability decreases when a node undergoes type modification, attribute semantic changes, or significant fluctuations in its child node structure. Through this method, the runtime can dynamically identify local subtrees that can be pre-fixed during the continuous generation of the structure, and provide a quantitative basis for subsequent stability checkpoint establishment and local rollback.

[0072] Among them, the first threshold, the second threshold, the third threshold, and the periodic threshold of multiple consecutive structural control unit token flows can all be initialized and configured by the runtime preset strategy, and can be dynamically adjusted according to the structural fluctuation characteristics of historical token sequences, the stability of node types, the frequency of attribute correction, and the frequency of hierarchical changes.

[0073] When the node stability reaches the preset checkpoint establishment threshold, a stability checkpoint is established for the candidate node. This stability checkpoint is used to record the state of local component subtrees that are basically determined in the current stage and are unlikely to undergo substantial changes when further structural completion occurs, so as to serve as a local recovery benchmark when the subsequent structural inference results deviate.

[0074] Specifically, at runtime, a snapshot is taken of the local component subtree structure corresponding to the current target node, the confirmed set of attributes, the mounting path of the current parent node, and the component instance reference corresponding to the node, and a mapping relationship is established between the checkpoint and the target node identifier.

[0075] For nodes that are still in an unclosed state but have reached a stage of stability, the runtime can save only the currently confirmed structural hierarchy and stable attribute information, while keeping the incomplete attribute fields, child node structures and event binding relationships in a state of pending completion, so as to ensure that when subsequent tokens arrive, they can continue to expand downwards based on this checkpoint.

[0076] During the continuous input of subsequent structure control tokens, when it is detected that the inference result of the preceding candidate component subtree is corrected by the supplementary information of the subsequent tokens, the runtime can directly roll back to the most recent stable checkpoint and regenerate new candidate component subtrees only for nodes on the path below the target node, while keeping other stable sibling nodes and parent node regions unchanged.

[0077] By employing the above methods, the runtime can periodically archive locally stable interface areas during the continuous generation of the fluid interface structure, thereby providing recovery anchors for subsequent local rollbacks and minimal disturbance updates, and avoiding repeated destruction and reconstruction of the entire page component tree.

[0078] Step 404: Control the instantiation process of candidate nodes based on stable checkpoints, and determine the impact of the newly arrived structural component tree on the already generated candidate component subtrees during the continuous input of the Token stream of the structural control unit.

[0079] In this process, after the candidate component subtree is generated and the node stability assessment is completed, the runtime controls whether the node should immediately enter the complete instantiation process based on the node's current stable state.

[0080] Specifically, for nodes that are still in the process of being completed, the runtime prefers to only perform lightweight structure mounting, that is, to first display the interface structure corresponding to the node so that the user can see the outline of the interface or partial content in advance; however, event listeners, asynchronous data requests, component lifecycle logic and other initialization operations that may produce side effects will not be executed for the time being.

[0081] Once subsequent control tokens continue to arrive and the node has reached a stable state as confirmed by a stability assessment, the runtime will continue to execute the complete instantiation process, including real component initialization, event listener binding, asynchronous data source loading, and activation of related lifecycle logic.

[0082] By using the aforementioned delayed instantiation control method, the system can display the visible area in advance before the interface structure is fully determined. This avoids repeated initialization, repeated event binding, or invalid asynchronous requests caused by subsequent structure completion, thereby reducing the risk of interface flickering and abnormal state during the streaming rendering process. Furthermore, through node stability assessment, stability checkpoint establishment, and delayed instantiation control mechanisms, the streaming intermediate structure maintains high runtime stability during continuous completion, preventing components from being repeatedly destroyed and rebuilt due to frequent structure completion.

[0083] Step 406: If the newly arrived structural component tree has overturned the candidate component subtree based on the impact results, perform a local rollback reconstruction based on the candidate component subtree and the stability checkpoint, and update the node path of the candidate component node using the minimum disturbance increment.

[0084] During the continuous input of tokens to the subsequent structure control unit, the runtime continuously checks whether the newly arrived structure information will affect the candidate component subtrees that have been generated in advance.

[0085] Specifically, at runtime, newly arriving component type information, supplementary attribute information, child node hierarchy relationships, and event descriptions are compared with the currently generated candidate component subtree. When a subsequent token causes a significant change in the component type, key attribute meaning, parent-child hierarchy relationship, or child node purpose of a previous node, it is determined that the preceding structure inference result corresponding to that node has undergone a structural shift.

[0086] Through the above structure drift detection process, the runtime can continuously identify whether subsequent tokens overturn the previous inferences made based on the incomplete structure, thus providing a trigger basis for the next step of performing a partial rollback only on the target path.

[0087] If, based on the impact results, it is determined that the newly arrived structural component tree has overturned the candidate component subtree, a local rollback reconstruction is performed based on the candidate component subtree and stability checkpoints. The entire interface is not regenerated, and the node paths of the candidate component nodes are updated using the minimum disturbance increment. In some optional embodiments, such as... Figure 6 As shown, Figure 6 A flowchart illustrating the steps for establishing a stable checkpoint, as provided in this application embodiment, includes: Step 602: Obtain the node path of the candidate node, and search upwards based on the node path for the parent node that has most recently established a stable checkpoint.

[0088] Step 604: Using the stable checkpoint corresponding to the parent node as the recovery starting point, release the candidate component subtrees that have been overturned and are below the candidate nodes on the node path.

[0089] Step 606: Keep the interface structure and component state of the nodes above the candidate nodes and other sibling nodes on the node path unchanged, and regenerate a new candidate component subtree based on the new structure control unit Token flow.

[0090] The process involves first locating the path of the target node where the structural offset occurred, and then searching upwards along that path for the parent node that most recently established a stable checkpoint. Subsequently, using this stable node as the recovery starting point, only the candidate component subtrees below the target node that were previously generated but have proven incorrect are released.

[0091] After releasing the faulty subtree, the runtime retains the interface structure and component state of the path above the stable node and other unaffected sibling nodes unchanged, and regenerates the corrected target subtree based on the newly arrived tokens, and then remounts it back to the original position.

[0092] By employing the aforementioned partial rollback method, the system pre-renders the interface, and even if subsequent token corrections refine the preceding structural inferences, only the affected small area is modified. This avoids the destruction and reconstruction of the entire page component tree, reduces interface flicker, and ensures the continuity of user-inputted content and other stable component states. Furthermore, by maintaining the component instance references of unaffected stable sibling nodes and parent node paths, the loss of user-inputted content, local component states, asynchronous request states, and event binding states during partial corrections can be effectively prevented.

[0093] When updating the node paths of candidate component nodes using minimum perturbation incremental updates, only the target node paths that have drifted are updated. Stable sibling subtree references that haven't drifted are maintained, preventing the loss of entered form content, redrawing of the stable left-side area, duplicate event binding, and UI flickering. By using the minimum perturbation incremental update mechanism to update only the target node paths that have shifted, duplicate rendering, duplicate event binding, and invalid asynchronous requests are reduced, lowering runtime resource consumption and improving overall performance during the fluid UI generation process.

[0094] Step 408: When the original structure description Token stream output ends or no new structure control unit Token stream is received within a consecutive preset time window, determine that the current streaming interface structure has entered the final consistency convergence stage and generate the target stable interface.

[0095] Specifically, when the output of the original structure description token stream of the large model is detected to have ended or no new structure control unit token stream is received within a consecutive preset time window, the current streaming interface structure is determined to have entered the final consistency convergence stage, and the target stable interface is finally generated.

[0096] Specifically, the runtime performs unified cleanup processing on the temporary states retained during the preceding streaming generation process, including: cleaning up placeholder nodes that are still in a pending closure state, completing unfinished attribute fields, completing the mounting of the remaining child node structures, and uniformly activating the previously delayed event bindings, asynchronous data requests, and component lifecycle logic.

[0097] For local subtrees that have established stable checkpoints, the runtime merges their current final state into the formal component tree structure; for nodes that were previously in a candidate state but have now completed structural completion, their intermediate state markers are removed, making them formal stable nodes.

[0098] Through the aforementioned eventual consistency convergence process, the entire interface smoothly transitions from the previous streaming intermediate state, candidate state, and local correction state to a complete, stable, and normally interactive formal component tree structure, ultimately yielding the target stable interface.

[0099] This application provides an incremental control method for a streaming interface structure component tree. The method includes: acquiring the original structure description token stream and performing incremental semantic segmentation on the original structure description token stream to generate a structure control unit token stream; updating the intermediate state of the current interface structure component tree through a real-time maintained fault-tolerant parsing context to obtain the updated intermediate state; judging the current target node based on the fault-tolerant parsing context to generate a candidate component subtree; and performing stability control on each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the structure control unit token stream to generate a target stable interface. This solution generates candidate component subtrees in advance based on the intermediate state, thereby achieving early parsing and early visualization of the interface structure, reducing the perceived delay for users waiting for the complete interface to be generated. Furthermore, by performing stability control, the streaming intermediate structure can maintain high runtime stability during continuous completion, avoiding repeated destruction and reconstruction of components due to frequent structure completion.

[0100] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0101] Figure 7 This is a structural block diagram of a flow interface structure component tree incremental control device provided in an embodiment of this application.

[0102] like Figure 7 As shown, the incremental control device 700 for the flow interface structure component tree includes: The acquisition module 702 is used to acquire the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream.

[0103] The update module 704 is used to update the intermediate state of the current interface structure component tree through the fault-tolerant resolution context maintained in real time, and obtain the updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates and binding relationship caches. The intermediate state is used to control the continued generation of the interface.

[0104] The judgment module 706 is used to judge the current target node based on the fault-tolerant parsing context and generate a candidate component subtree; wherein, the candidate component subtree is used for pre-rendering of local areas of the interface.

[0105] The generation module 708 is used to perform stability control on each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the structure control unit Token stream, and generate the target stable interface.

[0106] Regarding the apparatus in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments related to the method, and will not be elaborated upon here. Each module in the above-described incremental control device for the streaming interface structure component tree can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations of each module.

[0107] In one embodiment of this application, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps: Obtain the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The intermediate state of the current interface structure component tree is updated by maintaining a fault-tolerant resolution context in real time, resulting in the updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates, and binding relationship caches. The intermediate state is used to control the continued generation of the interface. The current target node is judged based on the fault-tolerant parsing context, and a candidate component subtree is generated; the candidate component subtree is used for pre-rendering of local areas of the interface; Based on the fault-tolerant parsing context and the Token flow of the structural control unit, stability control is performed on each candidate node in the candidate component subtree to generate the target stable interface.

[0108] The computer device provided in this application embodiment has a similar implementation principle and technical effect to the above method embodiment, and will not be described again here.

[0109] In one embodiment of this application, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps: Obtain the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The intermediate state of the current interface structure component tree is updated by maintaining a fault-tolerant resolution context in real time, resulting in the updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates, and binding relationship caches. The intermediate state is used to control the continued generation of the interface. The current target node is judged based on the fault-tolerant parsing context, and a candidate component subtree is generated; the candidate component subtree is used for pre-rendering of local areas of the interface; Based on the fault-tolerant parsing context and the Token flow of the structural control unit, stability control is performed on each candidate node in the candidate component subtree to generate the target stable interface.

[0110] The computer-readable storage medium provided in this embodiment is similar in principle and technical effect to the method embodiment described above, and will not be repeated here.

[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0112] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0113] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for incremental control of a fluid interface structure component tree, characterized in that, The method includes: Obtain the original structure description token stream, and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The intermediate state of the current interface structure component tree is updated by a fault-tolerant resolution context that is maintained in real time, resulting in an updated intermediate state. The fault-tolerant resolution context includes node paths, hierarchy stacks, unclosed nodes, attribute caches, type candidates, and binding relationship caches. The intermediate state is used to control the continued generation of the interface. The current target node is judged based on the fault-tolerant parsing context, and a candidate component subtree is generated; wherein, the candidate component subtree is used for pre-rendering of local areas of the interface; Based on the fault-tolerant parsing context and the structure control unit Token stream, stability control is performed on each candidate node in the candidate component subtree to generate the target stable interface.

2. The method according to claim 1, characterized in that, The step of judging the current target node based on the fault-tolerant resolution context and generating a candidate component subtree includes: The intermediate state corresponding to the current target node is obtained based on the fault-tolerant parsing context; Based on the intermediate state, determine whether the current target node meets the preset candidate generation conditions, and obtain the judgment result; If, based on the judgment result, it is determined that the current target node meets the preset candidate generation condition, the current target node is selected as a candidate node. Candidate component nodes are created based on the uniquely determined component type of the candidate node, the corresponding key display attributes are written into the node instance, and the candidate component subtree is generated by combining the current parent-child hierarchy.

3. The method according to claim 2, characterized in that, The preset candidate generation conditions are that the component type of the current target node has been uniquely determined, the mounting position of the parent node can be confirmed, the completeness rate of key display attributes reaches a preset threshold, and no type conflict or hierarchical change occurs within the cycle of multiple consecutive structure control unit Token flows.

4. The method according to claim 2 or 3, characterized in that, The method further includes: If, based on the judgment result, it is determined that the current target node has not met the preset candidate generation conditions, then a preset intermediate state placeholder mechanism is adopted to retain the attribute placeholder, event placeholder, and data binding placeholder corresponding to the current target node, and an unclosed mark is attached to the current target node.

5. The method according to any one of claims 1-3, characterized in that, The process of performing stability control on each candidate node in the candidate component subtree based on the fault-tolerant resolution context and the structure control unit Token stream to generate a target stable interface includes: After evaluating the stability of each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the token flow of the structure control unit, a stability checkpoint is established; wherein, the stability checkpoint is used to record the state of the candidate component subtree that has been determined and will not change in the current stage. The instantiation process of the candidate node is controlled based on the stability checkpoint, and the impact of the newly arrived structural component tree on the already generated candidate component subtree is determined during the continuous input of the token stream of the structural control unit. If, based on the impact results, it is determined that the newly arrived structural component tree has overturned the candidate component subtree, a local rollback reconstruction is performed based on the candidate component subtree and the stability checkpoint, and the node path of the candidate component node is updated using the minimum disturbance increment. When the original structure description Token stream output ends or no new structure control unit Token stream is received within a consecutive preset time window, the current streaming interface structure is determined to have entered the final consistency convergence stage, and the target stable interface is generated.

6. The method according to claim 5, characterized in that, After performing stability evaluation on each candidate node in the candidate component subtree based on the fault-tolerant resolution context and the structure control unit Token stream, a stability checkpoint is established, including: For each candidate node, the continuous change state of the candidate node is obtained based on the fault-tolerant resolution context and the token stream of the structure control unit; wherein, the continuous change state includes the continuous consistency state of component type, the continuous stability state of key attributes, the fluctuation state of parent-child hierarchy relationship, and the degree of change of child node set; The candidate nodes are scored based on the continuously changing states to generate node stability. When the stability of a node reaches a preset checkpoint establishment threshold, a stability checkpoint is established for the candidate node.

7. The method according to claim 5, characterized in that, The local rollback reconstruction based on the candidate component subtree and the stability checkpoint includes: Obtain the node path of the candidate node, and search upwards based on the node path for the parent node that has most recently established a stable checkpoint; Using the stable checkpoint corresponding to the parent node as the recovery starting point, release the candidate component subtrees that have been overturned below the candidate node on the node path; The interface structure and component state of the nodes above the candidate node and other sibling nodes on the node path remain unchanged, and a new candidate component subtree is regenerated based on the new structure control unit Token flow.

8. A flow-type interface structure component tree incremental control device, characterized in that, The device includes: The acquisition module is used to acquire the original structure description token stream and perform incremental semantic segmentation on the original structure description token stream to generate the structure control unit token stream; The update module is used to update the intermediate state of the current interface structure component tree through a fault-tolerant resolution context maintained in real time, so as to obtain the updated intermediate state; wherein, the fault-tolerant resolution context includes node paths, hierarchy stack, unclosed nodes, attribute cache, type candidates and binding relationship cache, and the intermediate state is used to control the continued generation of the interface downwards; The judgment module is used to judge the current target node based on the fault-tolerant parsing context and generate a candidate component subtree; wherein, the candidate component subtree is used for pre-rendering of local areas of the interface; The generation module is used to perform stability control on each candidate node in the candidate component subtree based on the fault-tolerant parsing context and the token flow of the structure control unit, and generate a target stable interface.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the incremental control method for the streaming interface structure component tree as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the incremental control method for the streaming interface structure component tree as described in any one of claims 1-7.