A method, apparatus, and medium for constructing structured forms for maintaining hierarchical enumeration values.

By constructing a flat row sequence and using unique node identifiers and hierarchical values ​​to express hierarchical relationships, the problem of inconvenient editing of static table displays of data dictionary items in data dictionary systems is solved, achieving efficient interface response and operational performance optimization.

CN123115142APending Publication Date: 2026-11-17CHONGQING NUOYUAN IND SOFTWARE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611363089.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing data dictionary systems, static tables displaying data dictionary items are inconvenient to edit, while dynamic forms lack hierarchical node semantic management, resulting in coupling between interface rendering, tree relationships, and submitted data, which affects interface response performance and interaction efficiency.

Method used

By constructing a flat row sequence and using unique node identifiers, parent node identifiers, and hierarchy values ​​to express hierarchical relationships, dynamic form items and business data items are synchronously bound, reducing recursive rendering overhead and optimizing the time complexity of interface operations.

Benefits of technology

It significantly improves the interface response performance for large-scale hierarchical data, maintains a smooth interactive experience, and still maintains high-efficiency interface operation performance even at a scale of thousands of nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115142A_ABST
    Figure CN123115142A_ABST
Patent Text Reader

Abstract

This application discloses a structured form construction method, apparatus, and medium for maintaining hierarchical enumeration values. It relates to data processing technology, and constructs a flat row sequence composed of several enumeration values ​​by receiving a field configuration array and a form data array. Each enumeration value simultaneously encapsulates dynamic form items and business data items, which are synchronously bound through the same array index and unique node identifier. Based on the hierarchical value, the range of continuous subtrees is calculated in the flat list. Within this range, batch updates of node insertion, deletion, or hiding states are performed, avoiding recursive traversal. Input box indentation and guide line height are dynamically calculated based on the hierarchical value, and validation rules are dynamically bound to the corresponding data paths. During the submission phase, data is split into sets to be edited, added, and deleted based on the field's disabled state and node identifier. This application eliminates recursive rendering overhead, ensures data consistency in dynamic addition and deletion scenarios, and simplifies front-end and back-end interface integration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus and medium for constructing structured forms for maintaining hierarchical enumeration values. Background Technology

[0002] In data management systems such as data dictionaries, the front end typically displays data dictionary items in static tables, and data is maintained through separate add or edit interfaces.

[0003] (1) The data dictionary displayed in tables is not easy to edit directly. Static forms are suitable for browsing, but not for continuous maintenance, batch adjustments, and real-time validation; adding or editing requires frequent switching between interfaces. Dynamic forms, on the other hand, can centralize field configuration, data entry, validation, and submission on a single interface. (2) Complexity of switching between list and tree structures In existing systems, single-level enumerations are often maintained using ordinary lists or tables, while multi-level enumerations are often maintained using tree controls or tree tables. The two differ in page structure, indentation display, and data submission structure.

[0004] (3) Ordinary dynamic form maintenance methods lack hierarchical node semantic management.

[0005] Ordinary dynamic forms focus more on field rendering and validation, lacking node semantic management such as unique identifiers; when submitting in a collapsible hierarchy, with insertion at the same or child level, or with a mix of edit and add states, it is easy to couple interface rendering, tree relationships, form validation and API submission together. Summary of the Invention

[0006] This application provides a method, apparatus, and medium for constructing structured forms for maintaining hierarchical enumeration values, which eliminates recursive rendering overhead and significantly improves the interface response performance of large-scale hierarchical data.

[0007] This application provides a method for constructing a structured form for maintaining hierarchical enumeration values, including: Receive configuration data and initial business data. The configuration data includes an array of field configurations, and the initial business data includes an array of form data. Each item in the form data array carries at least a node identifier field and a business payload field. Based on the configuration array of the array field, dynamic form items of each array are generated. Based on the form data array, business data items of each row are generated. The unique node identifier, parent node identifier and hierarchy value are extracted from the node identifier field to construct a flat row sequence composed of several arrays. In response to a user's hierarchical change operation, the range of continuous subtrees of the target node is calculated in the flat row sequence based on the hierarchical value, and the node is updated within the range; Rendering parameters are calculated based on the node's hierarchy value. These parameters include the input box indentation width and the vertical guide line height. Validation rules are then dynamically bound to the corresponding paths in the form data array. During the submission phase, business data items are distributed based on the field's disabled status and node identifier.

[0008] This application provides a structured form construction apparatus, including a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the steps of the structured form construction method for maintaining hierarchical enumeration values ​​as described above.

[0009] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the structured form construction method for maintaining hierarchical enumeration values ​​as described above.

[0010] This application's embodiment "flattens" the hierarchical relationship into a linear array. Each enumeration element expresses the parent-child relationship using `level` and `parentId`. The rendering layer only needs to output the data line by line in array order, without recursion. Operations such as collapsing, expanding, inserting, and deleting on the interface are all transformed into interval-based batch updates of the flattened list, reducing the time complexity from O(N·logN) to O(N) for traditional tree operations. 2 The complexity is reduced to O(N), yet a smooth interactive experience can still be maintained even at a scale of thousands of nodes.

[0011] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, specific embodiments of this application are given below. Attached Figure Description

[0012] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a basic flowchart illustrating the structured form construction method according to an embodiment of this application; Figure 2 This is a schematic diagram of the overall construction architecture of the structured form in the hierarchical configuration of the structured form construction method in this application embodiment; Figure 3 This is a schematic diagram of the tree node semantics and continuous subtree range in the flat list of the structured form construction method in this application embodiment; Figure 4 This is a schematic diagram of the hierarchical operation and submission routing process of the structured form construction method in this application embodiment. Detailed Implementation

[0013] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0014] This application provides a method for constructing a structured form for maintaining hierarchical enumeration values, such as... Figure 1 As shown, it includes the following steps: In step S101, configuration data and initial service data are received. The configuration data includes an array of enumerated field configurations, and the initial service data includes an array of form data. Each item in the form data array carries at least a node identifier field and a service payload field. For example, as shown... Figure 2 As shown, the structured form construction unit corresponding to the method of this application can first receive configuration data and initial business data. The configuration data includes, for example, display control configuration config, ordinary form configuration formItems, and enumeration field configuration enumFormItems. The initial business data includes, for example, form data dataDictionaryItems. It determines whether to enable the enumeration list and whether the current mode is single-level or multi-level enumeration.

[0015] For example, both the array of field configurations for each enumeration element and the array of form data are one-dimensional arrays organized by enumeration elements. They have the same length and correspond one-to-one by array index. The i-th element in the array of field configurations for each enumeration element is the field configuration item corresponding to the i-th enumeration element. The field configuration item includes at least a list of fields required to render the i-th dynamic form item and the field attributes of each field. The field attributes include attribute name, control type, renderable field mapping, disabled state, placeholder text, and validation rules. The i-th element in the array of form data is the business data item corresponding to the i-th enumeration element. The business data item carries at least a node identifier field and a business payload field. The node identifier field includes a unique node identifier, parent node identifier, hierarchy value, and hidden state. The business payload field includes code, value, description, and user-entered value. During initialization, the processor reads field configuration items and business data items in pairs according to array index i. The field configuration items generate the dynamic form item of the i-th set, and the business data items generate the business data item of the i-th set. The i-th dynamic form item and the i-th business data item together constitute the i-th set. The two establish a correspondence through the same array index i. Therefore, it is not necessary to repeatedly store the node identifier field in the field configuration items. The synchronous binding between the dynamic form item and the business data item can be achieved based on the array index.

[0016] In step S102, dynamic form items for each set are generated based on the set field configuration array, business data items for each row are generated based on the form data array, and the unique node identifier, parent node identifier, and hierarchy value are extracted from the node identifier field to construct a flat row sequence composed of several sets. In a specific example, such as... Figure 3 As shown, a flat row sequence (flat list) refers to a data structure composed of several enumerations arranged linearly in a one-dimensional array format. A node is the smallest logical unit with business meaning in the hierarchical enumeration data, carrying semantic information such as a unique node identifier, parent node identifier, hierarchical value, and hidden state, as well as payloads such as enumeration encoding, enumeration value, and enumeration description. The design constraint of this application includes that all descendant nodes of any node in the flat row sequence maintain a continuous physical arrangement. The structural characteristics of the flat row sequence in this application are: the tree relationship does not depend on nested objects, but is formed by the id, parentId (...) in the flat list. ), level, and hidden are used together to express the same idea.

[0017] In some embodiments, the node semantic tuple of this application =( , , , ),in This serves as a unique identifier for each node, enumerating the unique identity identifiers of each node throughout its entire lifecycle in the system. This is a reference to the parent node's ID, serving as the parent node identifier. The value selection rule is the root node =null, non-root node: = , where j is the index of the parent node in the sequence; This is the level value, representing the depth of the node in the hierarchical tree, counted starting from 0. Value selection rules: Root node: =0, child nodes: = +1, When hidden, this is a boolean flag indicating whether the node is rendered in the view layer. Values: true (hide) / false (show).

[0018] In some embodiments, each enumeration corresponds one-to-one with a node in the flat row sequence. The node's business data is carried in the business data item, and the dynamic form item is the interface rendering structure. The dynamic form item and the business data item are bound to the interface and data parts of the same enumeration through the same array index i. The dynamic form item is generated by the i-th field configuration item in the enumeration field configuration array and is used for interface rendering, field display, and validation. The business data item is generated by the i-th element in the form data array and is used to carry the node identifier field and the business payload field. The node identifier field contains a unique node identifier, parent node identifier, and hierarchy value to express the tree relationship between enumerations, but is not used as the basis for establishing row binding between the dynamic form item and the business data item. Simultaneously, the dynamic form item maintains node semantic references consistent with the business data items, used to read the unique identifier, parent node identifier, hierarchy value, and hidden state of the node to which the enumeration belongs in the rendering layer. In this application, id and parentId form a pointer-referred reference pair; this relationship is the sole basis for restoring the tree structure of the flat list. For example, at any given time, an enumeration form corresponds to a flat row sequence, where m is the current number of enumeration forms; the node in the i-th row corresponds to both the i-th dynamic form item and the i-th business data item, which are bound together by the same array index i.

[0019]

[0020] It is a flat row sequence. For each node in the flat row sequence, the (m-1)th node object, each node includes at least a node semantic tuple.

[0021]

[0022] The smallest logical unit (node ​​semantic tuple) corresponding to the i-th enumeration.

[0023] The root node satisfies the following equation;

[0024]

[0025] For nodes The set of all descendant nodes.

[0026] If the parent node identifier of a node is equal to the unique identifier of another node, then the former is a descendant node of the latter. Since the level value of a child node is set to the parent node's level value plus 1 during initialization and subsequent level change operations, the level value of a descendant node must be greater than the level value of its ancestor node.

[0027] Dynamic form items Used to describe renderable fields such as code, value, and description, as well as field attributes such as disabled, placeholder, and validation rules; business data items. It is used to store user-entered values ​​and fields such as code, value, description, level, parentId, and id required for API submissions.

[0028] By traversing the sequence, for each node Find the corresponding This allows for the reconstruction of the complete tree topology in O(N) time. The parentId and level satisfy the hierarchy consistency constraint. = , = +1. The level determines the boundary of the range of the continuous subtree. Based on the descendant continuity constraint, the level value is the core basis for calculating the range of the continuous subtree Sub(i).

[0029] For example, when initializing, copying, or adding a new token, a unique node identifier is configured for that token; if the data already exists, the existing identifier is used; if the data is newly added, a temporary unique identifier is generated, and the level and parentId are set according to the operation type.

[0030] In step S103, in response to the user's hierarchical change operation, the range of continuous subtrees of the target node is calculated in the flat row sequence based on the hierarchical value, and the node is updated within the range. Specifically, adding a first-level node is appended to the end of the list; adding a child node is inserted after the target node and inherits the target node's identifier as the parent node; adding a sibling node is done by first locating the last descendant node of the target node and then inserting it after it; deleting a node involves collecting and deleting the target node and all its child nodes.

[0031] In step S104, rendering parameters are calculated based on the node's level value. These parameters include the input box indentation width and the vertical guide line height. The validation rules are then dynamically bound to the corresponding paths in the form data array. For example, the input width can be selected as single-level or multi-level based on `dictionaryEnumType`. In multi-level mode, the first column indentation, the collapse button position, and the vertical guide line height are calculated based on the `level` parameter, and the validation rules are bound to the path of `dataDictionaryItems[i].prop`.

[0032] In step S105, during the submission phase, business data items are split according to the field's disabled status and node identifier. Specifically, form validation is performed before submission; based on whether a field is disabled, the node identifier, and whether a record has been deleted, the data is split into a set of enumerations to be edited, a set of enumerations to be added, and a set of enumeration identifiers to be deleted, for the interfaces to process separately.

[0033] This embodiment flattens the hierarchical relationship into a linear array. Each enumeration element expresses the parent-child relationship using `level` and `parentId`. The rendering layer only needs to output the data line by line in array order, without recursion. Operations such as collapsing, expanding, inserting, and deleting on the interface are all transformed into interval-based batch updates of the flattened list, reducing the time complexity from O(N·logN) to O(N) for traditional tree operations. 2 The complexity is reduced to O(N), yet a smooth interactive experience can still be maintained even at a scale of thousands of nodes.

[0034] The primary protection principle of this scheme is to establish a synchronization relationship between the dynamic form item array F and the form data array D, ensuring that items at the same index i... and Always describe the same enumeration node .

[0035]

[0036]

[0037] For the (m-1)th row of the dynamic form item, This is the business data item for the (m-1)th row.

[0038] In some embodiments, the dynamic form item comprises a field list and a node semantic reference in its data structure. Each field in the field list includes at least an attribute name, a control type, and corresponding renderable fields and field attributes. These field attributes include a disabled state, a placeholder text, and validation rules. The node semantic reference is a node object (i.e., F_i.node in the synchronization constraint below) maintained within the dynamic form item. It includes at least four attributes: a unique node identifier (id), a parent node identifier (parent), a level value, and a hidden state. The parent attribute takes the unique identifier of the parent node, consistent with the value of the parentId field in the business data item. The unique identifier, parent node identifier, level value, and hidden state of the node to which the dynamic form item belongs can be accessed via node.id, node.parent, node.level, and node.hidden, respectively. The business data item comprises a node identifier field and a business payload field in its data structure. The node identifier field includes at least id, parentId, level, and hidden. The business payload field includes at least code, value, description, and the user-entered value. After establishing a synchronous binding relationship, the attributes in the node object maintained by the dynamic form item are consistent with the node identifier field carried by the business data item.

[0039] In some embodiments, establishing the synchronization relationship between the two further includes: Whenever an operation such as adding, deleting, collapsing, or expanding occurs, the dynamic form item array F, the form data array D, and the node state array are updated synchronously to prevent misalignment between the interface structure and submitted data, ensuring that any index is correct. ,satisfy:

[0040] This is a synchronization constraint predicate.

[0041] Furthermore, the validation path is dynamically generated based on node index and field attribute. If the attribute name of the q-th field in the i-th row is prop_q, then its validation binding path can be represented as:

[0042] Let q be the attribute name of the q-th field. This is the validation binding path for the q-th field in the i-th row.

[0043] The path changes synchronously with insertion and deletion, thus ensuring that fields added or deleted dynamically can still be accurately matched by form validation rules.

[0044] In some embodiments, the step of calculating the range Sub(i) of the contiguous subtrees of the target node includes: The ending position e(i) is determined as the position of the successor node whose level value is less than or equal to the level value of the current node. For the node in row i, the ending position e(i) of its continuous subtree is defined as:

[0045] If there is no t that satisfies the condition, then:

[0046] Therefore, node The range of a contiguous subtree can be represented as:

[0047] For nodes The range of continuous subtrees.

[0048] This range is used for collapsing, expanding, deleting, and sibling insertion positioning. Because the same subtree remains continuous in a flat list, hierarchical operations can be performed without converting the entire list into a tree structure each time.

[0049] When performing a deletion operation, the set of nodes to be deleted, Del, is determined based on the range of the continuous subtree. i )={ i}∪Sub( i The deletion is performed in descending order of the array index to avoid accidental deletion caused by moving the array index.

[0050] In some embodiments, the hierarchical change operation includes adding a sibling node, and the method further includes: In response to the command to add a sibling node, locate the target node. ; Traverse the flat row sequence to find the target node. The last descendant node is assigned the position e(i); New node Insert after the last descendant point and set = , = .

[0051] When adding a child node, the new node n x The parent node identifier and hierarchy can be represented as:

[0052] When a new sibling node is added, the new node n x satisfy:

[0053] parentId and level consistency constraints: = ⇒ = +1.

[0054] Its insertion position is after the complete subtree of the target node:

[0055] In a specific example, a descendant node can be either a child node or a grandchild node.

[0056] The method in this application also calculates rendering parameters based on the enumeration type and node level, such as Figure 4 As shown, in some embodiments, the step of dynamically calculating rendering parameters includes: Select either single-level or multi-level input width mode based on the enumeration type. Let the base column width array be B. In single-level enumeration, the width of each column can be represented as follows:

[0057] In this model, both single-level and multi-level enumeration modes use preset base column width arrays. Let the base column width array for single-level enumeration mode be... The base column width array in the multi-level enumeration mode is Both are one-dimensional arrays, with the array length being the same as the number of columns in the form, and the index is counted starting from 0; [c] represents the base width of the c-th column in single-level enumeration mode. [c] represents the base width of the c-th column in the multi-level enumeration mode, where [0] is the base width of the first column (column 0) in the multi-level enumeration mode.

[0058] This is the base width of column c in single-level enumeration mode. In multi-level mode, it is determined based on the level value. The formula for calculating the indentation of the first column is: W(i,0)= [0]-δ⋅ , ,in Let be the final rendering width of the i-th row and c-th column, and δ be the preset single-layer indentation pixel value. This is the base width of column c in multi-level enumeration mode; for example, 24px. The condition for displaying the collapse button can be expressed as:

[0059] when When true, it indicates that the current node has consecutive child nodes, and collapse or expand controls should be displayed; when If the value is false, the node will not display the collapse button.

[0060] The folded state update can be represented as:

[0061]

[0062] b indicates the folded / unfolded status.

[0063] The height of the vertical guide line is calculated based on the range of the contiguous subtrees to cover the visible subtree area of ​​the current node. In one embodiment, let the single-row height r = 44px. If j exists:

[0064]

[0065]

[0066] s is the single-line height, s is the vertical guide line height compensation value, and j is the rendering segment. The height of the vertical guide line in the i-th row.

[0067] If j does not exist, then:

[0068] This method allows the guide line to cover the visible subtree area of ​​the current node.

[0069] In some embodiments, the step of calculating the height of the longitudinal guide line further includes: Detect the number of visible nodes in the current view window and construct a visual index mapping table; Based on the visual index mapping table, only the height of the node guide lines within the visible area is calculated to reduce the DOM repainting overhead under large-scale data.

[0070] In some embodiments, offloading business data items includes: Form validation is triggered before submission; the validation path is based on the node index. The field attribute names are dynamically generated; after verification, the data is split into edit set, add set and delete identifier set according to field permission semantics, node identifier and deleted record.

[0071] If the first If the row code field is not disabled and the node identifier exists in existing data, it will be added to the set to be edited.

[0072] If the first If the row code field is not disabled and is a newly added temporary identifier, it will be included in the set to be added. The existing node identifiers collected from user deletion operations are aggregated into a set of identifiers to be deleted.

[0073] For example, specific traffic offloading can be set to disabled ( The expression indicates whether the encoding field in the i-th row is disabled, and DeleteIds represents the set of identifiers of existing nodes that have been deleted by the user. Therefore, we can define:

[0074]

[0075]

[0076] EditSet can submit only editable fields such as value and description, as well as the corresponding node identifier; AddSet can submit code, value, description, and the identifier of the data dictionary to which it belongs; RemoveSet can submit the id of the node to be deleted. A Boolean function to determine whether the encoded field in the i-th row is disabled. For the enumeration set to be edited, For the set of enumerated identifiers to be deleted, This is the set of enumerations to be added later.

[0077] Through the above-mentioned traffic splitting, the front end can provide the back end with clear PATCH, POST, and DELETE semantics.

[0078] The method described in this application has the following technical advantages: (1) High configuration reusability: Single-level enumeration and multi-level enumeration share the same set of form configuration, and the rendering behavior is switched by dictionaryEnumType and node semantics.

[0079] (2) Accurate hierarchical maintenance: When inserting at the same level, the last child node of the current node is located first. When inserting a child node, the current node ID is directly inherited. When deleting, all child node indices are collected recursively to ensure the tree continuity in the flat list.

[0080] (3) Consistent interface status: Dynamic form items, business data items, hidden status and guide line height are updated synchronously to reduce the probability of misalignment, residue or display errors after adding, deleting or collapsing.

[0081] (4) Clear data submission: Edit items, add items and delete items are separated into different sets, which makes it easy for the backend to perform operations such as PATCH, POST or DELETE respectively.

[0082] (5) High interaction efficiency: Users can complete the addition of first-level, sibling, and child levels, deletion, collapse and expansion and field validation on the same interface, which is suitable for batch maintenance of complex data dictionaries.

[0083] This application also proposes a structured form construction apparatus, including: The synchronous modeling module is used to build flat row sequences and bind dynamic form configurations and business data two-way through node semantic fields; A range calculation engine is used to define the range of contiguous subtrees by mathematical intervals based on the hierarchical values ​​of a flat list, in order to perform non-recursive hierarchical operations. The rendering linkage module is used to dynamically adjust the indentation, collapse state, and guide line UI of form items based on the output of the range calculation engine. The submit adapter is used to structure and distribute flat form data.

[0084] This application also proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the structured form construction method for maintaining hierarchical enumeration values ​​as described above.

[0085] It should be noted that, in the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0086] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0087] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0088] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims. All of these forms are within the protection scope of this application.

Claims

1. A method for constructing structured forms for maintaining hierarchical enumeration values, characterized in that, include: Receive configuration data and initial business data. The configuration data includes an array of enumerated field configurations, and the initial business data includes an array of form data. Each item in the form data array carries at least a node identifier field and a business payload field. Based on the configuration array of the array field, dynamic form items of each array are generated. Based on the form data array, business data items of each row are generated. The unique node identifier, parent node identifier and hierarchy value are extracted from the node identifier field to construct a flat row sequence composed of several arrays. In response to a user's hierarchical change operation, the range of continuous subtrees of the target node is calculated in the flat row sequence based on the hierarchical value, and the node is updated within the range; The rendering parameters are calculated based on the node's hierarchy value, and the validation rules are dynamically bound to the corresponding path of the form data array. The rendering parameters include the input box indentation width and the vertical guide line height. During the submission phase, business data items are distributed based on the field's disabled status and node identifier.

2. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, Each of the aforementioned tokens simultaneously encapsulates the dynamic form item and the business data item, and the dynamic form item and the business data item establish a synchronous binding relationship through the same array index and the unique identifier of the node.

3. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, The establishment of the synchronization relationship between the two specifically includes: Define node semantic tuples =( , , , ),in For nodes i Unique identifier For nodes i Parent node identifier, For level values, It is in a hidden state; After performing add, delete, or collapse operations, the dynamic form item array F, form data array D, and node state array are updated synchronously to ensure that for any index i, the following condition is met: .node.id= .id, .node.level= .level.

4. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, The step of calculating the range Sub(i) of the contiguous subtrees of the target node includes: Determine the ending position e(i) as the position of the first successor node whose level value is less than or equal to the level value of the current node; The range of the continuous subtree is defined as Sub(i) = {k | i <k≤e(i), > }; When performing a deletion operation, the set of nodes to be deleted, Del, is determined based on the range of the contiguous subtree. i )={ i }∪Sub( i ), and perform deletions in descending order of index.

5. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, The hierarchical change operation includes adding a sibling node, and the method further includes: In response to the command to add a sibling node, locate the target node. ; Traverse the flat row sequence to find the target node. The last descendant node is assigned the position e(i); New node Insert after the last descendant point and set = , = .

6. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, The steps for dynamically calculating rendering parameters include: Select either single-level or multi-level input width mode based on the enumeration type; In multi-level mode, based on the level value The formula for calculating the indentation of the first column is: W(i,0)= [0]-δ⋅ , where δ is the preset single-layer indentation pixel value; The height of the vertical guide line is calculated based on the range of the contiguous subtrees to cover the visible subtree area of ​​the current node.

7. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 6, characterized in that, The steps for calculating the height of the longitudinal guide line also include: Detect the number of visible nodes in the current view window and construct a visual index mapping table; Based on the visual index mapping table, only the height of the node guide lines within the visible area is calculated to reduce the DOM repainting overhead under large-scale data.

8. The structured form construction method for maintaining hierarchical enumeration values ​​as described in claim 1, characterized in that, The process of splitting business data items includes: Form validation is triggered before submission; the validation path is based on the node index. And field attribute names are generated dynamically; If the first If the row code field is not disabled and the node identifier exists in existing data, it will be added to the set to be edited; If the first If the row code field is not disabled and is a newly added temporary identifier, it will be included in the set to be added. The existing node identifiers collected from user deletion operations are aggregated into a set of identifiers to be deleted.

9. A structured form construction device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements the steps of the structured form construction method for hierarchical enumeration value maintenance as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the structured form construction method for maintaining hierarchical enumeration values ​​as described in any one of claims 1 to 8.