A method and system for embeddable dynamic field rendering based on a two-dimensional routing matrix

CN122885307APending Publication Date: 2026-10-09宝宝巴士股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610888996.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

当相同数据结构类型需要在不同场景中以不同展示形式呈现时,路由逻辑无法在单一索引内完成区分,必须额外编写大量覆盖、适配、重写逻辑,极易产生语义歧义与渲染冲突,扩展性差、维护成本高

Benefits of technology

所述父节点层的数据对象为在数组类型字段场景下的行数据对象;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122885307A_ABST
    Figure CN122885307A_ABST
Patent Text Reader

Abstract

The application relates to a kind of based on the embeddable dynamic field rendering method and system of double-dimensional routing matrix, wherein, the method receives field configuration list by configuration component, generates double-dimensional structured configuration object containing display control dimension identifier and data structure dimension identifier for each field in field configuration list, uses the single component rendering instance created by parent container to render the incoming double-dimensional structured configuration object with display control dimension identifier and data structure dimension identifier as joint index, searches in the double routing matrix constructed in advance, obtains the routing decision result corresponding to each field, instantiates the corresponding front-end control according to the front-end control instance type in routing decision result in single component rendering instance, and dynamically evaluates the dynamic attribute configuration value with dynamic expression identifier, to configure the dynamic evaluation result to the instantiated front-end control, realize dynamic rendering. Thus, the application improves rendering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software rendering technology, and in particular to a method and system for rendering embeddable dynamic fields based on a two-dimensional routing matrix. Background Technology

[0002] Existing automated dynamic form rendering solutions can be mainly divided into the following two categories: (i) Page-level dynamic form platform: This type of technical solution has complete visual construction capabilities for page forms, and can realize the configuration, rendering and data management of all form fields. However, the core working logic is to take over the entire form lifecycle of the page and generate independent form pages. In business scenarios where only partial field dynamism is required, this type of solution cannot achieve the coexistence of dynamic fields and native static fields. Developers must migrate all business pages to the form platform for reconstruction and development. It cannot adapt to scenarios where existing business systems require zero modification and partial dynamic expansion. Its embedding, compatibility and business adaptability are poor. (II) Field-level rendering components for single-dimensional type routing: This type of solution provides embeddable field rendering components, breaking through the limitations of page-level takeover. However, the core working logic is: using a single data structure type identifier as an index to determine the rendering control. When the same data structure type needs to be presented in different display formats in different scenarios, the routing logic cannot distinguish them within a single index. A large amount of overriding, adaptation, and rewriting logic must be written, which is prone to semantic ambiguity and rendering conflicts, resulting in poor scalability and high maintenance costs.

[0003] Therefore, there is an urgent need for a dynamic field rendering technology that can both achieve dynamic rendering of local fields and eliminate ambiguity between rendering and data. Summary of the Invention

[0004] The technical problem to be solved by the present invention is: the present invention provides an embeddable dynamic field rendering method and system based on a two-dimensional routing matrix, which can realize dynamic rendering of local fields, eliminate rendering and data ambiguity, and improve rendering efficiency.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: In a first aspect, the present invention provides an embeddable dynamic field rendering method based on a two-dimensional routing matrix, comprising: The configuration component receives a list of field configurations, generates a two-dimensional structured configuration object containing display control dimension identifiers and data structure dimension identifiers for each field in the list, and obtains and stores all two-dimensional structured configuration objects. A single component rendering instance is created through a parent container, and all two-dimensional structured configuration objects are loaded through the parent container. All loaded two-dimensional structured configuration objects are passed to the single component rendering instance, so that the single component rendering instance uses the display control dimension identifier and data structure dimension identifier of each passed two-dimensional structured configuration object as a joint index to search in a pre-built two-dimensional routing matrix and obtain the routing decision result corresponding to each field. The routing decision result includes the front-end control instance type. In the single component rendering instance, the corresponding front-end control is instantiated according to the front-end control instance type in the routing decision result corresponding to each field, resulting in all instantiated front-end controls. The dynamic attribute configuration value of each instantiated front-end control is checked to determine whether the dynamic attribute configuration value has a dynamic expression identifier. If it does, the dynamic attribute configuration value is dynamically evaluated to obtain the dynamic evaluation result, and the dynamic evaluation result is configured on the corresponding instantiated front-end control to obtain all configured front-end controls. All configured front-end controls are then rendered on the page to achieve dynamic rendering.

[0006] The beneficial effects of this invention are as follows: A single-component rendering instance is created by a parent container, and the two-dimensional structured configuration object of each field generated by the configuration component is passed into the single-component rendering instance. This allows the single-component rendering instance to retrieve and render the routing decision results for each field, achieving separation of configuration and rendering. The retrieval of routing decision results is completed using a joint index of the display control dimension identifier and the data structure dimension identifier, eliminating ambiguity between display semantics and data structure semantics. The same data structure dimension can be mapped to different front-end controls through different display control dimensions without the need for additional overriding or adaptation logic, achieving differentiated rendering. The dynamic attribute configuration values ​​of the instantiated front-end controls are detected in the single-component rendering instance, supporting dynamic evaluation without taking over the entire page form lifecycle or modifying the original page structure and static field logic of the parent container. This enables the mixed coexistence and rendering of dynamic configuration fields and original static business fields, reducing maintenance costs and improving scalability and embeddability.

[0007] Optionally, the step of receiving the field configuration list through the configuration component and generating a two-dimensional structured configuration object containing display control dimension identifiers and data structure dimension identifiers for each field in the field configuration list includes: The configuration component receives a list of field configurations, provides an editable display control dimension interface for each field in the list to receive display control dimension parameters input by the user, and generates a display control dimension identifier for each field based on the received display control dimension parameters. The data structure dimension identifier corresponding to each field is automatically generated based on the original data type of each field in the field configuration list; The display control dimension identifier for each field is bound and encapsulated with the corresponding data structure dimension identifier to generate a two-dimensional structured configuration object for the corresponding field.

[0008] As described above, the system provides an editable interface for display control dimensions and automatically generates data structure dimension identifiers based on the original data types of the fields. This achieves a configuration mode where display control dimension parameters (i.e., customizable display semantics) and data structure dimensions (i.e., automatically matched data semantics) are implemented. This satisfies personalized configuration needs while avoiding errors and redundancy caused by manually configuring data types, improving the efficiency and accuracy of field configuration. Furthermore, the identifiers for both dimensions are uniformly encapsulated into a two-dimensional structured configuration object, providing a unified and standardized input basis for subsequent two-dimensional routing and ensuring stable and reliable rendering logic.

[0009] Optionally, creating a single component rendering instance through a parent container includes: A single component rendering instance is created through a parent container. Inside the single component rendering instance, an independent reactive data container that is isolated from the reactive state tree of the parent container is initialized. The independent reactive data container is only used to store the runtime values ​​of each field in the field configuration list that are actually generated during user interaction. When the independent reactive data container detects a change in the runtime value corresponding to the stored field, it generates a corresponding structured data snapshot and transmits the structured data snapshot to the parent container in the form of an event, thus completing the data interaction with the parent container.

[0010] As described above, by establishing an independent reactive data container within a single component rendering instance that is isolated from the parent container's reactive state tree, the runtime values ​​of fields are decoupled from the parent container. This avoids unnecessary re-rendering, state pollution, and logical conflicts in the parent container caused by runtime value changes. Furthermore, the generated structured data snapshot is only passed to the parent container in the form of an event when the runtime value of the field changes, achieving unidirectional, controllable, and lightweight data interaction and improving the stability of system operation and rendering.

[0011] Optionally, the step of causing the single component rendering instance to perform a retrieval in a pre-built two-dimensional routing matrix using the display control dimension identifier and data structure dimension identifier of each passed-in two-dimensional structured configuration object as a joint index includes: Predefine the value set for the display control dimension and the value set for the data structure dimension, and construct a two-dimensional routing matrix with the value set for the display control dimension as the horizontal dimension and the value set for the data structure dimension as the vertical dimension; Each matrix cell in the two-dimensional routing matrix is ​​pre-configured with a corresponding routing decision result, and each routing decision result includes the front-end control instance type, data value serialization type, recursive expansion identifier, and dynamic array row rendering identifier.

[0012] As described above, by pre-constructing a two-dimensional routing matrix with the value sets of the display control dimension and the value sets of the data structure dimension as the two axes, the semantics of display and data are decoupled. The same data type can be mapped to different front-end controls in different columns of the two-dimensional routing matrix, eliminating the semantic ambiguity of traditional one-dimensional routing. Each matrix cell in the two-dimensional routing matrix is ​​pre-bound with the routing decision result, which can output the front-end control instance type, data value serialization type, recursive expansion identifier, and dynamic array row rendering identifier at one time, that is, complete rendering instructions, improving rendering efficiency.

[0013] Optionally, the routing decision result further includes a recursive expansion identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: In the single component rendering instance, it is determined whether the recursive expansion flag in the routing decision result corresponding to each field is in a valid state. If so, the corresponding field is marked as a nested object type field. The nested object type field is parsed layer by layer to obtain the sub-fields of each layer. The display control dimension flag and data structure dimension flag corresponding to each sub-field are used as a joint index to search in the pre-constructed two-dimensional routing matrix to obtain the sub-routing decision result corresponding to each sub-field. The corresponding front-end control is instantiated layer by layer according to the front-end control instance type in the sub-routing decision result corresponding to each sub-field until all levels of sub-fields are instantiated.

[0014] As described above, by recursively expanding the identifier, nested object type fields are automatically identified. The two-dimensional routing matrix is ​​reused for each level of sub-field, and the joint index retrieval and front-end control instantiation are executed independently. This achieves automatic rendering of nested object type fields, which is not affected by the parent field and does not require manual writing of nested traversal and rendering code. It can flexibly adapt to multi-level and irregular nested business structures, significantly improving the efficiency and adaptability of building complex object forms. Moreover, the sub-fields reuse the same two-dimensional routing matrix, ensuring unified rendering logic and consistent front-end control style, thus improving rendering capabilities.

[0015] Optionally, the routing decision result further includes a dynamic array row rendering identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: In the single component rendering instance, it is determined whether the dynamic array row rendering identifier in the routing decision result corresponding to each field is in a valid state. If so, the corresponding field is marked as an array type field. The array type field is parsed row by row to obtain the inline field of each row. The control dimension identifier and data structure dimension identifier corresponding to the inline field of each row are used as indexes to search in the pre-constructed two-dimensional routing matrix to obtain the inline routing decision result corresponding to the inline field of each row. The corresponding front-end control is instantiated row by row according to the front-end control instance type in the sub-routing decision result corresponding to the inline field of each row until the inline fields of all rows are instantiated.

[0016] As described above, by automatically recognizing array type fields through dynamic array row rendering identifiers, the system achieves row-by-row parsing, routing, and rendering of array rows without requiring manual writing of row addition and rendering logic. This approach can adapt to complex array scenarios and improves the system's adaptability to list-type business fields. Each row's fields reuse a two-dimensional routing matrix, independently executing composite index retrieval and front-end control instantiation, ensuring consistent rendering standards and behaviors for front-end controls within each row, thus enhancing rendering capabilities.

[0017] Optionally, if it exists, the dynamic attribute configuration value is dynamically evaluated to obtain the dynamic evaluation result, including: If it exists, obtain the runtime environment data of the field pointed to by the instantiated front-end control corresponding to the dynamic property configuration value with dynamic expression identifier, construct a four-layer context chain object based on the runtime environment data, and dynamically evaluate the dynamic property configuration value in the four-layer context chain object to obtain the dynamic evaluation result. The four-layer context chain object, from top to bottom, includes the data object of the parent node layer, the data object of the current node layer, the data object of the global shared layer, and the data object of the root node layer; The data object of the parent node layer is a row data object in the context of array type fields; The data object of the current node layer is the node data object of the layer to which the field belongs; The data object of the global shared layer is cross-component shared state data passed in through the global context injection mechanism; The data object of the root node layer is the root-level data object of the single component rendering instance.

[0018] As described above, constructing a four-layer context chain object to achieve dynamic evaluation of dynamic attribute configuration values ​​breaks through the limitation of traditional dynamic attributes that can only access the current field data. The four-layer context chain object is clearly divided into the parent node layer, the current node layer, the global shared layer, and the root node layer. The hierarchy is clear and the scope is isolated, avoiding variable conflicts and value confusion. It supports dynamic value retrieval capabilities across layers, scopes, and components, which can meet the field linkage requirements in complex business scenarios. At the same time, dynamic evaluation is completed entirely within a single component rendering instance, without the need to write additional processing code in the parent container. This achieves zero-code and configuration-based dynamic linkage logic, greatly reducing development and maintenance costs.

[0019] Optionally, the step of dynamically evaluating the dynamic attribute configuration value in the four-level context chain object to obtain the dynamic evaluation result includes: Using the data objects of the current node layer and the data objects of the parent node layer as the first priority scope, a local evaluation environment is formed. The dynamic attribute configuration value is dynamically evaluated in the local evaluation environment to obtain a first dynamic evaluation result. It is then determined whether the first dynamic evaluation result is successful. If successful, the first dynamic evaluation result is directly used as the final dynamic evaluation result. If unsuccessful, the data objects of the global shared layer are merged into the local evaluation environment to form a second priority scope. The dynamic attribute configuration value is then dynamically evaluated again in the second priority scope to obtain a second dynamic evaluation result. Determine whether the second dynamic evaluation result is successful. If successful, the second dynamic evaluation result is used as the final dynamic evaluation result. If unsuccessful, the data objects of the root node layer are merged into the second priority scope to form a complete evaluation environment. The dynamic attribute configuration value is dynamically evaluated in the complete evaluation environment to obtain the final dynamic evaluation result.

[0020] As described above, dynamic evaluation prioritizes the data objects at the current node level and the parent node level as the local evaluation environment. This ensures the accuracy and independence of inline and field-level linkage, eliminating the need to load the full data of the global shared layer and the root node level, thus improving dynamic evaluation efficiency and reducing computational overhead and memory usage. When the local evaluation environment cannot dynamically evaluate, the data object of the global shared layer is injected to achieve linkage between dynamic attribute configuration values ​​and the context. If the second priority scope still cannot dynamically evaluate, the data object of the root node level is used as a fallback to form a complete evaluation environment, ensuring the integrity of dynamic evaluation. This "local priority, global fallback" hierarchical evaluation order ensures that dynamic evaluation better matches the actual interaction logic of the front-end controls, improving operational stability.

[0021] In a second aspect, the present invention provides an embeddable dynamic field rendering system based on a two-dimensional routing matrix, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the embeddable dynamic field rendering method based on a two-dimensional routing matrix described in the first aspect.

[0022] The technical effects of the embeddable dynamic field rendering system based on a two-dimensional routing matrix provided in the second aspect are the same as those of the embeddable dynamic field rendering method based on a two-dimensional routing matrix provided in the first aspect. Attached Figure Description

[0023] Figure 1 This is a flowchart of an embeddable dynamic field rendering method based on a two-dimensional routing matrix provided in this embodiment; Figure 2 This is a schematic diagram of the overall process of an embeddable dynamic field rendering method based on a two-dimensional routing matrix provided in this embodiment; Figure 3 This is a schematic diagram of the structure of an embeddable dynamic field rendering system based on a two-dimensional routing matrix provided in this embodiment.

[0024] [Explanation of Labels in the Attached Image] 1. An embeddable dynamic field rendering system based on a two-dimensional routing matrix; 2. Processor; 3. Memory. Detailed Implementation

[0025] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present invention can be understood more clearly and thoroughly, and that the scope of the present invention can be fully conveyed to those skilled in the art.

[0026] Example 1 Please refer to Figures 1 to 2 This invention provides a unified routing loading method for multimedia resources, comprising the following steps: S1. Receive the field configuration list through the configuration component, generate a two-dimensional structured configuration object containing the display control dimension identifier and the data structure dimension identifier for each field in the field configuration list, and obtain and store all two-dimensional structured configuration objects. At this point, step S1, which involves receiving the field configuration list through the configuration component and generating a two-dimensional structured configuration object containing display control dimension identifiers and data structure dimension identifiers for each field in the field configuration list, includes: S11. Receive a field configuration list through a configuration component, provide an editable display control dimension interface for each field in the field configuration list to receive the display control dimension parameters input by the user, and generate a display control dimension identifier corresponding to each field based on the received display control dimension parameters. S12. Automatically generate the data structure dimension identifier corresponding to each field based on the original data type of each field in the field configuration list; S13. Bind and encapsulate the display control dimension identifier and the corresponding data structure dimension identifier for each field to generate a two-dimensional structured configuration object for the corresponding field.

[0027] In this embodiment, as Figure 2 As shown, the configuration component receives a list of field configurations. Running in design mode, the component provides an editable display control dimension interface for each field in the configuration list—a property editing interface for display control dimensions. This interface receives user-inputted display control dimension parameters and generates a display control dimension identifier for each field based on these parameters, enabling customization of the display control dimensions. Display control dimension parameters include control type, data structure type, and linkage rules. The component automatically generates a corresponding data structure dimension identifier for each field based on its original data type, achieving automatic matching of the original data type. The display control dimension identifier for each field is bound and encapsulated with its corresponding data structure dimension identifier, generating a two-dimensional structured configuration object for each field. All two-dimensional structured configuration objects are persistently stored. In essence, the two-dimensional structured configuration object is a rendering rule combining the display control dimension identifier and its corresponding data structure dimension identifier; it only defines the field rendering form and parsing rules, without carrying any field values.

[0028] S2. Create a single component rendering instance through the parent container, and load all two-dimensional structured configuration objects through the parent container. Pass all the loaded two-dimensional structured configuration objects into the single component rendering instance, so that the single component rendering instance uses the display control dimension identifier and data structure dimension identifier of each passed two-dimensional structured configuration object as a joint index to search in the pre-built two-dimensional routing matrix and obtain the routing decision result corresponding to each field. The routing decision result includes the front-end control instance type. In this embodiment, as Figure 2As shown, the parent container is an existing business form containing static fields such as name and remarks. A single-component rendering instance is created through the parent container, running in the presentation state, i.e., dynamic fields. This single-component rendering instance is embedded anywhere within the parent container. All two-dimensional structured configuration objects are loaded from the parent container and passed to the single-component rendering instance. For each two-dimensional structured configuration object, the single-component rendering instance uses its corresponding display control dimension identifier and data structure dimension identifier as a joint index to search within a pre-built two-dimensional routing matrix, obtaining the routing decision result for each field. The routing decision result includes the front-end control instance type, recursive expansion identifier, dynamic array row rendering identifier, and data value serialization type.

[0029] At this point, the step S2 described in which a single component rendering instance is created through the parent container includes: S21. Create a single component rendering instance through the parent container, and initialize an independent reactive data container that is isolated from the reactive state tree of the parent container inside the single component rendering instance. The independent reactive data container is only used to store the runtime value of each field in the field configuration list that is actually generated during the interaction with the user. S22. When the independent reactive data container detects a change in the runtime value corresponding to the stored field, it generates a corresponding structured data snapshot and transmits the structured data snapshot to the parent container in the form of an event, thus completing the data interaction with the parent container.

[0030] In this embodiment, as Figure 2 As shown, a single-component rendering instance is created through a parent container. Within this instance, an independent reactive data container, isolated from the parent container's reactive state tree, is initialized. This independent reactive data container stores only the runtime values ​​of each field in the actual field configuration list generated during user interaction. It neither stores nor reads the two-dimensional structured configuration object and does not receive writes from the parent container's reactive state tree. The parent container cannot directly read or write to the independent reactive data container; it can only interact with data by receiving structured data snapshots. Furthermore, the independent reactive data container only generates a corresponding structured data snapshot when it detects a change in the runtime value corresponding to a stored field. The structured data snapshot maintains the same structure as the two-dimensional structured configuration object, facilitating backend reception and parsing.

[0031] The parent container's reactive state tree refers to the reactive data set within the parent component's form that drives view updates and recalculates associated computed properties. An independent reactive data container for a single-component rendering instance refers to a reactive data storage unit that is independently maintained within the content of a single-component rendering instance and has independent change detection capabilities. It has its own independent dependency collection and update dispatch mechanism. Changes to its internal data only trigger updates to the container's own view or listener callbacks. The only way it exposes data externally is by outputting structured data snapshots in the form of events through an event interface.

[0032] At this point, before step S2 describes making the single component rendering instance use the display control dimension identifier and data structure dimension identifier of each passed-in two-dimensional structured configuration object as a joint index to perform a retrieval in the pre-built two-dimensional routing matrix, the following is included: S23. Predefine the value set of the display control dimension and the value set of the data structure dimension, and construct a two-dimensional routing matrix with the value set of the display control dimension as the horizontal dimension and the value set of the data structure dimension as the vertical dimension. S24. Pre-configure and bind the corresponding routing decision result to each matrix cell in the two-dimensional routing matrix, and each routing decision result includes the front-end control instance type, data value serialization type, recursive expansion identifier, and dynamic array row rendering identifier.

[0033] In this embodiment, a set of values ​​for the display control dimension and a set of values ​​for the data structure dimension are predefined. The display control dimension's value set is used as the horizontal dimension (row), and the data structure dimension's value set is used as the vertical dimension (column), constructing an M×N two-dimensional routing matrix. Each matrix cell in the two-dimensional routing matrix is ​​pre-configured with a corresponding routing decision result. For example, when the display control dimension is X and the data structure dimension is Y, the corresponding matrix cell contains routing decision results such as what front-end control instance type should be rendered, how to serialize data values, whether there is a recursive expansion flag, and whether there is a dynamic array row rendering flag. The display control dimension and the data structure dimension support independent runtime expansion; the addition, modification, and deletion operations of the two dimensions are decoupled and do not interfere with each other.

[0034] For each input two-dimensional structured configuration object, the query key is used as a joint index (i.e., the display control dimension identifier and the database structure dimension identifier) ​​to retrieve the data in the pre-built two-dimensional routing matrix.

[0035] S3. In the single component rendering instance, instantiate the corresponding front-end control according to the front-end control instance type in the routing decision result corresponding to each field, and obtain all instantiated front-end controls. Detect the dynamic attribute configuration value of each instantiated front-end control, and determine whether the dynamic attribute configuration value has a dynamic expression identifier. If it does, dynamically evaluate the dynamic attribute configuration value to obtain the dynamic evaluation result, and configure the dynamic evaluation result on the corresponding instantiated front-end control to obtain all configured front-end controls. Render all configured front-end controls on the page to achieve dynamic rendering.

[0036] At this point, the routing decision result in step S3 also includes a recursive expansion identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: S31. In the single component rendering instance, determine whether the recursive expansion flag in the routing decision result corresponding to each field is in a valid state. If so, mark the corresponding field as a nested object type field, and parse the nested object type field layer by layer to obtain the sub-fields of each layer. Use the display control dimension flag and data structure dimension flag corresponding to each sub-field as a joint index to search in the pre-constructed two-dimensional routing matrix to obtain the sub-routing decision result corresponding to each sub-field. Instantiate the corresponding front-end control layer by layer according to the front-end control instance type in the sub-routing decision result corresponding to each sub-field until all levels of sub-fields are instantiated.

[0037] In this embodiment, as Figure 2 As shown, in a single component rendering instance, if the recursive expansion flag in the routing decision result corresponding to a field is valid, the corresponding field is marked as an embedded object type field, such as an address field containing province, city, and detailed address. It is then parsed layer by layer to obtain the sub-fields at each level. A separate two-dimensional routing matrix is ​​used for each sub-field, and independent retrieval is performed using the display control dimension flag and data structure dimension flag corresponding to each sub-field as a joint index to obtain the sub-routing decision result corresponding to each sub-field. Based on the front-end control instance type in the sub-routing decision result corresponding to each sub-field, the corresponding front-end control is instantiated layer by layer until all levels of sub-fields are instantiated. That is, the rendering behavior of each sub-field is determined only by its own routing decision result and is not affected or constrained by the parent field.

[0038] At this point, the routing decision result in step S3 also includes a dynamic array row rendering identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: S32. In the single component rendering instance, determine whether the dynamic array row rendering identifier in the routing decision result corresponding to each field is in a valid state. If so, mark the corresponding field as an array type field, parse the array type field row by row to obtain the inline field of each row, and use the control dimension identifier and data structure dimension identifier corresponding to the inline field of each row as indexes to search in the pre-constructed two-dimensional routing matrix to obtain the inline routing decision result corresponding to the inline field of each row. Instantiate the corresponding front-end control according to the front-end control instance type in the sub-routing decision result corresponding to the inline field of each row row by row until the inline fields of all rows are instantiated.

[0039] In this embodiment, as Figure 2 As shown, in a single component rendering instance, if the dynamic array row rendering flag in the routing decision result corresponding to a field is in a valid state, the corresponding field is marked as an array type field, such as a contract terms array containing condition names and amounts. The initial number of array rows is initialized according to the complete configuration parameters of the corresponding field, enabling and supporting dynamic operations such as adding and deleting rows. The final dynamic array rows are parsed row by row to obtain the in-row fields of each row. A separate two-dimensional routing matrix is ​​reused for each in-row field, and an independent retrieval is performed using the display control dimension flag and data structure dimension flag corresponding to each in-row field as a joint index to obtain the sub-routing decision result corresponding to each in-row field. Based on the front-end control instance type in the sub-routing decision result corresponding to each sub-field, the corresponding front-end control is instantiated row by row until all in-row fields for all rows are instantiated.

[0040] At this point, if the condition in step S3 exists, the dynamic attribute configuration value is dynamically evaluated to obtain the dynamic evaluation result, which includes: S33. If it exists, obtain the runtime environment data of the field pointed to by the instantiated front-end control corresponding to the dynamic attribute configuration value with dynamic expression identifier, construct a four-layer context chain object based on the runtime environment data, and dynamically evaluate the dynamic attribute configuration value in the four-layer context chain object to obtain the dynamic evaluation result. The four-layer context chain object, from top to bottom, includes the data object of the parent node layer, the data object of the current node layer, the data object of the global shared layer, and the data object of the root node layer; The data object of the parent node layer is a row data object in the context of array type fields; The data object of the current node layer is the node data object of the layer to which the field belongs; The data object of the global shared layer is cross-component shared state data passed in through the global context injection mechanism; The data object of the root node layer is the root-level data object of the single component rendering instance.

[0041] In this embodiment, as Figure 2 As shown, the dynamic property configuration value of each instantiated front-end control is checked. If a dynamic property configuration value contains a dynamic expression identifier, the runtime environment data of the field pointed to by the instantiated front-end control corresponding to the dynamic property configuration value with the dynamic expression identifier is obtained. Based on the runtime environment data, a four-level context chain object is constructed from top to bottom: the data object of the parent node layer, the data object of the current node layer, the data object of the global shared layer, and the data object of the root node layer. The dynamic property configuration value is dynamically evaluated in the four-level context chain object to obtain the dynamic evaluation result.

[0042] At this point, the dynamic evaluation of the dynamic attribute configuration value in the four-layer context chain object described in step S33, to obtain the dynamic evaluation result, includes: S331. Using the data object of the current node layer and the data object of the parent node layer as the first priority scope, a local evaluation environment is formed. The dynamic attribute configuration value is dynamically evaluated in the local evaluation environment to obtain a first dynamic evaluation result. It is determined whether the first dynamic evaluation result is successful. If successful, the first dynamic evaluation result is directly used as the final dynamic evaluation result. If unsuccessful, the data object of the global shared layer is merged into the local evaluation environment to form a second priority scope. The dynamic attribute configuration value is dynamically evaluated again in the second priority scope to obtain a second dynamic evaluation result. S332. Determine whether the second dynamic evaluation result is successful. If successful, take the second dynamic evaluation result as the final dynamic evaluation result. If unsuccessful, merge the data object of the root node layer into the second priority scope to form a complete evaluation environment. Perform dynamic evaluation on the dynamic attribute configuration value in the complete evaluation environment to obtain the final dynamic evaluation result.

[0043] In this embodiment, when dynamically evaluating dynamic attribute configuration values ​​within a four-layer context chain object, a "local priority, global fallback" strategy is adopted. The data objects at the current node level and the parent node level are prioritized as the first priority scope, forming a local evaluation environment. That is, the first priority scope is the local evaluation environment, and the dynamic attribute configuration value is dynamically evaluated within this environment to obtain the first dynamic evaluation result. Specifically, the dynamic attribute configuration value is used as an expression, and the data objects within the local evaluation environment serve as the source of variable values. This expression is parsed and calculated to obtain the first dynamic evaluation result.

[0044] If the first dynamic evaluation result is successful, it is directly used as the final dynamic evaluation result. Otherwise, if it fails, the data objects in the global shared layer are merged into the local evaluation environment to form a second priority scope. That is, the local evaluation environment is extended, and the dynamic attribute configuration value is re-evaluated in the second priority scope to obtain the second dynamic evaluation result. In other words, the dynamic attribute configuration value is used as an expression, and the data objects in the second priority scope are used as the variable value source. The expression is parsed and calculated to obtain the second dynamic evaluation result.

[0045] Similarly, if the second dynamic evaluation result is successful, it is used as the final dynamic evaluation result. Otherwise, if it fails, the data objects at the root node level are merged into the second priority scope to form a complete evaluation environment. The dynamic attribute configuration value is then dynamically evaluated in the complete evaluation environment to obtain the final dynamic evaluation result.

[0046] The dynamically evaluated results are configured onto the corresponding instantiated front-end controls to obtain all configured front-end controls. All configured front-end controls are then rendered onto the page to achieve dynamic rendering.

[0047] Example 2 Please refer to Figure 3 The present invention provides an embeddable dynamic field rendering system 1 based on a two-dimensional routing matrix, including a memory 3, a processor 2, and a computer program stored on the memory 3 and run on the processor 2. When the processor 2 executes the computer program, it implements the steps in Embodiment 1.

[0048] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art can understand the specific structure and modifications of the systems / devices based on the methods described in the above embodiments of the present invention, and therefore will not be repeated here. All systems / devices used in the methods of the above embodiments of the present invention fall within the scope of protection of the present invention.

[0049] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0050] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions.

[0051] It should be noted that any reference numerals placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In claims that enumerate several means, several of these means may be embodied by the same hardware. The use of the terms first, second, third, etc., is merely for convenience of expression and does not indicate any order. These terms can be understood as part of the component names.

[0052] Furthermore, it should be noted that in the description of this specification, the terms "one embodiment," "some embodiments," "embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0053] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the claims should be interpreted to include both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0054] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, then this invention should also include these modifications and variations.

Claims

1. A method for rendering embeddable dynamic fields based on a two-dimensional routing matrix, characterized in that, include: The configuration component receives a list of field configurations, generates a two-dimensional structured configuration object containing display control dimension identifiers and data structure dimension identifiers for each field in the list, and obtains and stores all two-dimensional structured configuration objects. A single component rendering instance is created through a parent container, and all two-dimensional structured configuration objects are loaded through the parent container. All loaded two-dimensional structured configuration objects are passed to the single component rendering instance, so that the single component rendering instance uses the display control dimension identifier and data structure dimension identifier of each passed two-dimensional structured configuration object as a joint index to search in a pre-built two-dimensional routing matrix and obtain the routing decision result corresponding to each field. The routing decision result includes the front-end control instance type. In the single component rendering instance, the corresponding front-end control is instantiated according to the front-end control instance type in the routing decision result corresponding to each field, resulting in all instantiated front-end controls. The dynamic attribute configuration value of each instantiated front-end control is checked to determine whether the dynamic attribute configuration value has a dynamic expression identifier. If it does, the dynamic attribute configuration value is dynamically evaluated to obtain the dynamic evaluation result, and the dynamic evaluation result is configured on the corresponding instantiated front-end control to obtain all configured front-end controls. All configured front-end controls are then rendered on the page to achieve dynamic rendering.

2. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, The step of receiving a field configuration list through a configuration component and generating a two-dimensional structured configuration object containing display control dimension identifiers and data structure dimension identifiers for each field in the field configuration list includes: The configuration component receives a list of field configurations, provides an editable display control dimension interface for each field in the list to receive display control dimension parameters input by the user, and generates a display control dimension identifier for each field based on the received display control dimension parameters. The data structure dimension identifier corresponding to each field is automatically generated based on the original data type of each field in the field configuration list; The display control dimension identifier for each field is bound and encapsulated with the corresponding data structure dimension identifier to generate a two-dimensional structured configuration object for the corresponding field.

3. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, Creating a single-component rendering instance from a parent container includes: A single component rendering instance is created through a parent container. Inside the single component rendering instance, an independent reactive data container that is isolated from the reactive state tree of the parent container is initialized. The independent reactive data container is only used to store the runtime values ​​of each field in the field configuration list that are actually generated during user interaction. When the independent reactive data container detects a change in the runtime value corresponding to the stored field, it generates a corresponding structured data snapshot and transmits the structured data snapshot to the parent container in the form of an event, thus completing the data interaction with the parent container.

4. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, The step of enabling the single component rendering instance to perform a retrieval in the pre-built two-dimensional routing matrix using the display control dimension identifier and data structure dimension identifier of each passed-in two-dimensional structured configuration object as a joint index includes: Predefine the value set for the display control dimension and the value set for the data structure dimension, and construct a two-dimensional routing matrix with the value set for the display control dimension as the horizontal dimension and the value set for the data structure dimension as the vertical dimension; Each matrix cell in the two-dimensional routing matrix is ​​pre-configured with a corresponding routing decision result, and each routing decision result includes the front-end control instance type, data value serialization type, recursive expansion identifier, and dynamic array row rendering identifier.

5. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, The routing decision result also includes a recursive expansion identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: In the single component rendering instance, it is determined whether the recursive expansion flag in the routing decision result corresponding to each field is in a valid state. If so, the corresponding field is marked as a nested object type field. The nested object type field is parsed layer by layer to obtain the sub-fields of each layer. The display control dimension flag and data structure dimension flag corresponding to each sub-field are used as a joint index to search in the pre-constructed two-dimensional routing matrix to obtain the sub-routing decision result corresponding to each sub-field. The corresponding front-end control is instantiated layer by layer according to the front-end control instance type in the sub-routing decision result corresponding to each sub-field until all levels of sub-fields are instantiated.

6. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, The routing decision result also includes a dynamic array row rendering identifier, and the instantiation of the corresponding front-end control in the single component rendering instance according to the front-end control instance type in the routing decision result corresponding to each field includes: In the single component rendering instance, it is determined whether the dynamic array row rendering identifier in the routing decision result corresponding to each field is in a valid state. If so, the corresponding field is marked as an array type field. The array type field is parsed row by row to obtain the inline field of each row. The control dimension identifier and data structure dimension identifier corresponding to the inline field of each row are used as indexes to search in the pre-constructed two-dimensional routing matrix to obtain the inline routing decision result corresponding to the inline field of each row. The corresponding front-end control is instantiated row by row according to the front-end control instance type in the sub-routing decision result corresponding to the inline field of each row until the inline fields of all rows are instantiated.

7. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 1, characterized in that, If it exists, then the dynamic attribute configuration value is dynamically evaluated to obtain the dynamic evaluation result, including: If it exists, obtain the runtime environment data of the field pointed to by the instantiated front-end control corresponding to the dynamic property configuration value with dynamic expression identifier, construct a four-layer context chain object based on the runtime environment data, and dynamically evaluate the dynamic property configuration value in the four-layer context chain object to obtain the dynamic evaluation result. The four-layer context chain object, from top to bottom, includes the data object of the parent node layer, the data object of the current node layer, the data object of the global shared layer, and the data object of the root node layer; The data object of the parent node layer is a row data object in the context of array type fields; The data object of the current node layer is the node data object of the layer to which the field belongs; The data object of the global shared layer is cross-component shared state data passed in through the global context injection mechanism; The data object of the root node layer is the root-level data object of the single component rendering instance.

8. The embeddable dynamic field rendering method based on a two-dimensional routing matrix as described in claim 7, characterized in that, The dynamic evaluation of the dynamic attribute configuration value in the four-level context chain object to obtain the dynamic evaluation result includes: Using the data objects of the current node layer and the data objects of the parent node layer as the first priority scope, a local evaluation environment is formed. The dynamic attribute configuration value is dynamically evaluated in the local evaluation environment to obtain a first dynamic evaluation result. It is then determined whether the first dynamic evaluation result is successful. If successful, the first dynamic evaluation result is directly used as the final dynamic evaluation result. If unsuccessful, the data objects of the global shared layer are merged into the local evaluation environment to form a second priority scope. The dynamic attribute configuration value is then dynamically evaluated again in the second priority scope to obtain a second dynamic evaluation result. Determine whether the second dynamic evaluation result is successful. If successful, the second dynamic evaluation result is used as the final dynamic evaluation result. If unsuccessful, the data objects of the root node layer are merged into the second priority scope to form a complete evaluation environment. The dynamic attribute configuration value is dynamically evaluated in the complete evaluation environment to obtain the final dynamic evaluation result.

9. A unified routing and loading system for multimedia resources, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 8.