Multi-component form combination method based on analog simulation and JSON structure tree

By combining multiple components of forms based on simulation and JSON structure trees, the problem of high development complexity of simulation forms is solved, enabling rapid development and efficient maintenance, and supporting the linked retrieval of form values.

CN120996000APending Publication Date: 2025-11-21CHICHENG TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511087056.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-21

AI Technical Summary

Technical Problem

Existing simulation form development relies on code implementation, resulting in a large amount of development work, long development time, and difficult maintenance. Furthermore, it cannot simultaneously obtain the values ​​of a single form and the entire form.

Method used

It adopts a multi-component form combination method based on simulation and JSON structure tree. By constructing a JSON structure tree, it obtains simulation values ​​and renders the form, supports cross-linking between components, and uses normalized components for unified rendering to reduce recursive processing.

Benefits of technology

It significantly shortens development time, reduces development workload, facilitates maintenance, enables the linked acquisition of values ​​for each form and the overall form, and improves development efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120996000A_ABST
    Figure CN120996000A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-component form combination method based on analog simulation and a JSON (JavaScript Object Notation) structure tree. Comprising the following steps: determining analog simulation types, and constructing a corresponding JSON structure tree for each analog simulation type; obtaining a historical single-example analog simulation value set corresponding to each analog simulation type; for each JSON structure tree, each node of the JSON structure tree searches a corresponding analog simulation value in a corresponding historical single-example analog simulation value set, and the corresponding analog simulation value is added to the corresponding node to obtain a corresponding simulation structure tree; acquiring a required analog simulation type so as to acquire a corresponding simulation structure tree, and rendering the acquired simulation structure tree; and modifying parameters of each node in the simulation structure tree according to requirements to obtain a required analog simulation form. According to the method, the technical developers can generate the analog simulation form only through the configuration files and the prefabricated components, values in the form are easily collected, and the working efficiency of the technical developers is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of simulation, data structure and web technology, and specifically relates to a method for combining multi-component forms based on simulation and JSON structure tree. Background Technology

[0002] In the field of simulation, the current development methods for simulation forms have many drawbacks. Most of these forms rely on technical developers to write code, which presents numerous difficulties in the development process.

[0003] During development, developers have to write code from scratch for every new component they encounter, balancing functionality, compatibility, and interactivity. Take a complex mechanical simulation form as an example: different components such as gears and shafts each have their own mechanical properties and display requirements, all requiring dedicated coding. Furthermore, if the form contains multiple identical components, the same code must be copied multiple times, which is both time-consuming and error-prone. If the code needs modification, it must be changed simultaneously in multiple places; a slight misstep can lead to system instability.

[0004] This development approach results in massive development workload and significantly extended development cycles. In a fast-paced market environment, product launches are delayed, making it difficult for companies to respond to the market in a timely manner. Simultaneously, the increasing size and complexity of the codebase makes maintenance exceptionally difficult, and troubleshooting and fixing problems incurs high costs.

[0005] In terms of data acquisition, existing form systems cannot simultaneously retrieve values ​​from individual forms and the entire form. For example, in project progress simulation forms, developers struggle to simultaneously monitor the progress of each sub-form and the overall progress, requiring additional code and increasing development complexity. Therefore, there is an urgent need for more efficient and flexible methods for developing simulation forms. Summary of the Invention

[0006] To address the problems existing in the background technology, this invention provides a multi-component form combination method based on simulation and JSON structure tree, which solves the technical problems in the development of existing simulation forms, such as large development workload, long development time, difficulty in maintenance, and the inconvenience of simultaneously acquiring values ​​for each form and the overall form.

[0007] The technical solution adopted by the present invention for a multi-component form combination method based on simulation and JSON structure tree includes:

[0008] S1. Determine several simulation types and construct a corresponding JSON structure tree for each simulation type.

[0009] S2. Obtain the set of historical singleton simulation values ​​corresponding to each simulation type.

[0010] S3. For each JSON structure tree, each node of the JSON structure tree searches for the corresponding simulation value in the corresponding historical singleton simulation value set, and adds the corresponding simulation value to the corresponding node, thus obtaining each simulation structure tree after being filled with simulation values.

[0011] S4. Obtain the required simulation type, obtain the corresponding simulation structure tree based on the required simulation type, and render the obtained simulation structure tree.

[0012] S5. Modify the parameters of each node in the simulation structure tree according to the requirements to obtain the required simulation form.

[0013] Further, repeat steps S4-S5 to obtain several simulation forms required during the development process.

[0014] Each node in the JSON structure tree contains a unique identifier representing the node.

[0015] Each node has a unique identifier chain (path) from the root node to itself through the connection relationship of the JSON structure tree. This unique identifier chain is obtained by combining the unique identifier with the parent-child hierarchy.

[0016] Each node in the JSON structure tree contains a visual name representing the node.

[0017] Each node in the JSON structure tree contains a key representing whether the node has been clicked; the key is either an empty value or a non-empty list; an empty value indicates that the current node cannot be clicked and the current node does not have a corresponding form; a non-empty list indicates that the current node can be clicked and the current node has a corresponding form.

[0018] The non-empty list includes several items, each representing a visualization component, and each item also contains the corresponding visualization component type.

[0019] Each item in the non-empty list contains a default value for the visualization component that matches the visualization component type; each item in the non-empty list contains a method for controlling the display and hiding of the visualization component.

[0020] Each node in the JSON structure tree includes, depending on the specific functional requirements, a normalization component that renders the current node and all its child nodes.

[0021] The normalization component is used to uniformly process and render the data of a node and all its child nodes in a JSON structure tree. This component can complete the rendering of the data of the current node and all its child nodes in one go, without having to recursively process each sub-level in the conventional way.

[0022] When the value corresponding to a node in the JSON structure tree is a list, the node includes menu configuration and an add button; when the value corresponding to a node in the JSON structure tree is not a list, the node does not include menu configuration and an add button.

[0023] The menu configuration is a set of operation options for data in a non-empty list (item). When the value corresponding to a node in the JSON structure tree is a non-empty list (item), if developers need to perform various operations on this list, such as sorting, filtering, deleting list items, etc., the menu configuration can include these operation options and present them to developers in the form of a menu for easy interaction.

[0024] In addition, the form combination method for each item in the non-empty list also comes from this menu configuration. After clicking the add button, the types of sub-items that can be added to the non-empty list will appear. When a sub-item type is selected, the form combination method corresponding to that sub-item type built into the menu configuration will be brought into the newly added sub-item, thus forming the dynamically generated part in the JSON structure tree.

[0025] Each node in the JSON structure tree contains other custom parameters according to specific functional requirements. These parameters can be passed to the final form components (visual components and normalized components) to assist in functional expression or style rendering.

[0026] Each node in the simulation structure tree contains the simulation value of the current node, the simulation values ​​of all child nodes of the current node, and all simulation values ​​of the singleton simulation value set.

[0027] The addresses of the simulated values ​​of each node and all its child nodes in the simulation structure tree are the same as the addresses of the corresponding simulated values ​​in the single-instance simulated value set.

[0028] The address of the simulated value currentValue is consistent with the address of the simulated value currentValue portion in the global simulated value globalValue.

[0029] In all form components (visual components and normalization components), the set of singleton simulation values ​​and their changes are monitored and processed according to specific functional requirements, thereby supporting cross-linking between form components.

[0030] The beneficial effects of this invention are:

[0031] 1. Minimal development effort: Only the corresponding JSON structure tree needs to be developed for different modules.

[0032] 2. Short development time: The industry average time to develop a module is one month, while the method of this invention only takes one week, which greatly shortens the development time.

[0033] 3. Easy to maintain: Only one configuration file needs to be maintained.

[0034] 4. Easy to retrieve values: The values ​​of each form and the overall form can be retrieved, and because they are bound to an address, the values ​​will be modified accordingly. There is no need to worry about the overall form value remaining unchanged when the value of a single form changes. Attached Figure Description

[0035] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation

[0036] The present invention will now be described in more detail with reference to the accompanying drawings and embodiments. However, the present invention is not limited thereto. For those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention. Contents not described in detail in this specification are prior art known to those skilled in the art.

[0037] like Figure 1 As shown, the multi-component form combination method based on simulation and JSON structure tree in this embodiment includes the following steps:

[0038] S1. Determine several simulation types, construct a corresponding JSON structure tree for each simulation type, and store all JSON structure trees in the database.

[0039] Simulation types include mechanical simulation, circuit simulation, flight simulation, and physiological system simulation, etc. Each node in the JSON structure tree has an empty value.

[0040] Each node in the JSON structure tree contains a unique identifier representing that node. In this embodiment, each node contains a unique identifier key representing that node.

[0041] Each node, connected through a JSON structure tree, has a unique identifier chain (path) from the root node to itself. This unique identifier chain is obtained by combining a unique identifier with the parent-child hierarchy. In this embodiment, the unique identifier key is combined with the parent-child node connection relationship to obtain the unique identifier chain representing the node, such as "parent1.parent2.children1.children2".

[0042] Each node in the JSON structure tree contains a visual name representing the node.

[0043] Each node in the JSON structure tree contains a key indicating whether the node has been clicked; the key can be null or a non-empty list of items.

[0044] In this embodiment, a null value indicates that the node is not clickable and that the node does not have a corresponding form.

[0045] The non-empty list contains several items, each representing a visual component, and each item also contains the corresponding visual component type. During rendering, the visual component is matched and rendered according to its type.

[0046] Each item in the non-empty list contains a default value for the visualization component that matches the visualization component type; this default value is used when initializing or when the developer never sets it.

[0047] Each item in a non-empty list contains a method to control the display or hiding of visual components, which is set to show by default.

[0048] In this embodiment, a non-empty list (item) indicates that the node is clickable. Each item in the non-empty list (item) contains a default value (defaultValue) for the visual component that matches the visual component type. This default value is used when the component is initialized or is never set by the developer. Each item in the non-empty list (item) also contains a method (shows) that controls the display and hiding of the visual component. The shows method returns true to display the component and false to hide it; the default is to display the component.

[0049] Each node in the JSON structure tree includes a normalized component (thisItem) that renders the current node and all its child nodes. When a normalized component exists, recursion to child levels is not performed.

[0050] The normalization component is used to uniformly process and render the data of a node and all its child nodes in a JSON structure tree. This component can complete the rendering of the current node and all its child nodes in one go, without needing to recursively process each sub-level as in the conventional way. In this embodiment, the normalization component is an object that includes data storage and rendering functions.

[0051] When the value of a node in the JSON structure tree is a list, the node includes a menu configuration (menu) and an add button (add); when the value of a node in the JSON structure tree is not a list, the node does not include a menu configuration (menu) and an add button (add).

[0052] The menu is configured as a set of operation options for data in a non-empty list (item). When the value corresponding to a node in the JSON structure tree is a non-empty list (item), if developers need to perform various operations on this list, such as sorting, filtering, deleting list items, etc., the menu configuration can include these operation options and present them to developers in the form of a menu for easy interaction.

[0053] In this embodiment, when the value of a node in the JSON structure tree corresponds to a non-empty list (item), when converting the simulation structure tree or clicking the "Add" button, the menu configuration is matched according to each item in the non-empty list (item), ultimately converting it into all child nodes of that node. In this embodiment, the menu configuration includes operation options, display settings, and data processing rules.

[0054] Furthermore, each node in the multiple JSON structure trees contains other custom parameters according to specific functional requirements. These parameters can all be passed to the final form components (visual components and normalized components) to assist the visual components in expressing functions or rendering styles. For example, if the component requires units, there is a unit parameter.

[0055] S2. Obtain the set of historical singleton simulation values ​​corresponding to each simulation type.

[0056] S3. For each JSON structure tree in the database, each node of the JSON structure tree searches for the corresponding simulation value in the corresponding historical singleton simulation value set, and adds the corresponding simulation value to the corresponding node, thus obtaining each simulation structure tree after being filled with simulation values.

[0057] Each node in the simulation structure tree contains the current simulation value (currentValue), the simulation values ​​of all child nodes of the current node, and all simulation values ​​of the singleton simulation value set (globalValue).

[0058] The addresses of the simulated values ​​of each node and all its child nodes in the simulation structure tree are the same as the addresses of the corresponding simulated values ​​in the singleton simulated value set.

[0059] The address of the simulated value `currentValue` is consistent with the address of the simulated value `currentValue` portion within the global simulated value `globalValue`. This address consistency design is to achieve synchronized data updates.

[0060] Furthermore, when the value of a visualization component in `currentValue` is modified, since `currentValue` and the `currentValue` part of `globalValue` share the same address, the corresponding value in `globalValue` will also automatically change. Because `globalValue` is a global simulation value, it affects the parameter passing of visualization components in other nodes. Therefore, when visualization components in other nodes receive parameter passing, they can receive feedback on the change in the modified value, thus ensuring the data consistency of the entire simulation.

[0061] In all form components (visual components and normalization components), the set of singleton simulation values ​​and their changes are monitored and processed according to specific functional requirements, thereby supporting cross-linking between form components.

[0062] S4. Obtain the simulation type (needtype) of the single simulation form required by the developer through an HTTP request, obtain the corresponding simulation structure tree according to the required simulation type (needtype), and render the obtained simulation structure tree through the visual interface, and render the various functions expressed by the parameters of each node.

[0063] Furthermore, the forms corresponding to each node of the simulation structure tree are displayed through visual operations.

[0064] S5. Modify the parameters of each node in the simulation structure tree according to the developer's needs to obtain the final single simulation form and store it in the database via an HTTP request.

[0065] In practice, modifying the parameters of each node in the simulation structure tree is equivalent to modifying the parameters of the visualization component corresponding to that node.

[0066] Further, repeat steps S4-S5 to obtain several simulation forms required during the development process.

[0067] This invention provides a JSON structure tree for various simulation categories. It offers a series of pre-built visualization components and defines assembly interfaces. By identifying the type of the branches and leaf nodes in the JSON structure tree and combining the pre-built visualization components with simulation data for form assembly, this invention significantly reduces the development workload and time of simulation projects, simplifies maintenance, and makes value retrieval and monitoring between visualization components easier.

[0068] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for combining multiple components of a form based on simulation and a JSON structure tree, characterized in that: Includes the following steps: S1. Determine several simulation types and construct a corresponding JSON structure tree for each simulation type; S2. Obtain the set of historical singleton simulation values ​​corresponding to each simulation type; S3. For each JSON structure tree, each node of the JSON structure tree searches for the corresponding simulation value in the corresponding historical singleton simulation value set, and adds the corresponding simulation value to the corresponding node to obtain each simulation structure tree after being filled with simulation values. S4. Obtain the required simulation type, obtain the corresponding simulation structure tree based on the required simulation type, and render the obtained simulation structure tree; S5. Modify the parameters of each node in the simulation structure tree according to the requirements to obtain the required simulation form.

2. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: Each node in the JSON structure tree contains a unique identifier representing the node; each node has a unique identifier chain from the root node to the current node through the connection relationship of the JSON structure tree.

3. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: Each node in the JSON structure tree contains a visual name representing the node.

4. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: Each node in the JSON structure tree contains a key representing whether the node has been clicked; the key is either an empty value or a non-empty list; an empty value indicates that the current node cannot be clicked and has no corresponding form; a non-empty list indicates that the current node can be clicked and has a corresponding form.

5. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 4, characterized in that: The non-empty list includes several items, each representing a visualization component, and each item also contains the corresponding visualization component type.

6. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 5, characterized in that: Each item in the non-empty list contains a default value for the visualization component that matches the visualization component type; each item in the non-empty list contains a method for controlling the display and hiding of the visualization component.

7. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: Each node in the JSON structure tree includes a normalization component that renders the current node and all its child nodes.

8. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: When the value corresponding to a node in the JSON structure tree is a list, the node includes menu configuration and an add button; when the value corresponding to a node in the JSON structure tree is not a list, the node does not include menu configuration and an add button.

9. The method for combining multiple components of a form based on simulation and a JSON structure tree according to claim 1, characterized in that: Each node in the simulation structure tree contains the simulation value of the current node, the simulation values ​​of all child nodes of the current node, and all simulation values ​​of the singleton simulation value set.

10. A method for combining multiple components of a form based on simulation and a JSON structure tree, as described in claim 9, characterized in that: The addresses of the simulated values ​​of each node and all its child nodes in the simulation structure tree are the same as the addresses of the corresponding simulated values ​​in the single-instance simulated value set.