Dynamic process arrangement method, system and device based on JSON (JavaScript Object Notation)
Through the dynamic process orchestration method based on JSON, the unified REST API interface is used to realize front-end and back-end data transmission, which solves the problem that the business process system in the existing technology cannot flexibly adjust node configuration, realizes flexible changes in node configuration and real-time data updates, and improves development efficiency and user experience.
Patent Information
- Application Number
- CN202411913991.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
AI Technical Summary
The existing business process system cannot flexibly adjust node configuration, input and output fields, field verification rules, default values, UI control types, etc. according to changes in business needs, resulting in a long development cycle and low efficiency, unable to dynamically load and execute scripts, poor system scalability, high maintenance costs, lack of flexibility in storage and transmission of output results, lack of unified interfaces for front and back-end data interaction, and cannot ensure data consistency and real-time updates.
The dynamic process orchestration method based on JSON is adopted, and the front-end data transmission is realized through a unified REST API interface, which supports dynamic adjustment of node configuration. The front-end dynamically renders input components and UI controls based on the JSON configuration obtained from the API. The back-end processes and persists storage based on user input data, and dynamically loads and executes scripts for node computing logic.
It realizes flexible changes in node configuration and real-time loading and updates, ensures data consistency and real-time updates, supports dynamic rendering of different UI interfaces, and improves development efficiency and user experience.
Smart Images

Figure CN119847491A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of dynamic process orchestration, and in particular to a JSON-based dynamic process orchestration method, system and device. Background Art
[0002] With the continuous development of business processes, existing business process systems are usually fixed in configuration and cannot flexibly adjust node configurations and render different UI interfaces according to changes in business needs. Traditional business process systems lack flexibility in node configuration, input and output fields, field validation rules, default values, UI control types, etc., and are difficult to adapt to changes in business needs. Once business needs change, developers need to make a lot of code modifications, resulting in a long development cycle and low efficiency.
[0003] In addition, when executing node computing logic, existing systems usually require developers to write a lot of code, and cannot dynamically load and execute corresponding scripts, resulting in poor system scalability and high maintenance costs. At the same time, the storage and transmission of output results also lack flexibility and cannot be dynamically adjusted according to business needs.
[0004] Therefore, there is an urgent need for a flexible business process script processing system that can support dynamic updates of node configurations and realize flexible configuration of input and output fields, validation rules, UI controls, etc. The system should support dynamic loading and execution of scripts for node calculation logic, and be able to dynamically generate and store output results based on the configuration. Data interaction is carried out through a unified REST API interface between the front and back ends to ensure data consistency and real-time updates.
[0005] There are some invention patents to solve the problem that the existing business process system cannot support dynamic adjustment of node configuration and cannot flexibly render different UI interfaces according to changes in business needs. For example, patent CN115113947A discloses a configuration method for a process engine. The patent configures the relevant fields in the newly added form and sets the field attributes, generates JSON-Schema according to the newly added form, loads the JSON-Schema into the Redis cache, and after the flow node is transferred to the node, generates a dynamic form through JSON-Schema, fills in the form data and submits it to JSON-Schema for verification, thereby realizing data configuration. However, the patent still has the problem that the field types and numbers are limited and cannot meet complex business needs. Patent CN113094037A discloses a method for interacting with forms and workflows. The patent obtains user-configured configuration information from the visual interface provided by the form engine, such as workflow component configuration information, and generates an HTML script for the page to be displayed according to the obtained configuration information, thereby rendering and displaying the page to be displayed according to the HTML script, thereby realizing the rapid development of the page to be displayed. However, the patent still has the problem that the interactive process between forms and workflows needs to be further improved to make it more user-friendly and intuitive. Summary of the invention
[0006] One of the purposes of the present invention is to provide a JSON-based dynamic process orchestration method to solve the problems in the prior art that node configuration, input and output fields, field validation rules, default values, UI control types, etc. cannot be flexibly adjusted according to changes in business needs, resulting in a long development cycle and low efficiency, and cannot dynamically load and execute corresponding scripts. The system has poor scalability and high maintenance costs, lacks flexibility in the storage and transmission of output results, lacks a unified interface for front-end and back-end data interaction, and cannot ensure data consistency and real-time updates.
[0007] The present invention is implemented through the following technical scheme, a JSON-based dynamic process arrangement method, comprising the following steps: S100, the user interface reads the process node JSON definition and renders the process node input component, the back-end system provides the node configuration through the REST API, the front-end dynamically renders the input component according to the JSON configuration obtained from the API, and renders different UI controls according to the configuration, and finally generates the user interface; S200, the front-end converts the user input data into JSON format, transmits it to the back-end through the POST interface, the back-end processes according to the input data, and persists the input data in the database; S300, the back-end system reads the process node JSON definition, and runs the process node configuration of the Javascript script in combination with the user input value, and at the same time determines whether the node configuration has changed, if so, returns to step S100, if not, executes the next step; S400, the back-end reads the JSON configuration, loads the corresponding Javascript script according to the configuration, executes the node calculation logic, and generates an output value according to the node configuration, and transmits it to the database through the POST interface for storage.
[0008] Furthermore, step S100 includes the following sub-steps: S110, the back-end system stores the node configuration through the database, records the node ID, name and type information in the nodes table, and stores the JSON configuration of each node in the node_configs table; S120, the front-end obtains the latest configuration of the node through the GET interface, and dynamically renders the UI control of the input component according to the JSON configuration; S130, the front-end dynamically renders the input component according to the information in the JSON configuration, and verifies the user input data in real time to ensure that the input meets the format requirements in the configuration.
[0009] Furthermore, step S200 includes the following sub-steps: S210, the front end converts the user input data into JSON format and transmits it to the back end through the POST interface; S220, the back end processes according to the input data, and stores the input value of each node in the node_inputs table, associating it with the node ID and field, thereby realizing persistent storage of the input data.
[0010] Furthermore, step S400 includes the following sub-steps: S410, the background dynamically loads the corresponding Javascript script according to the node configuration, and stores the calculation script or logic related to the node in the node_logic table; S420, executes the loaded Javascript script, and performs calculations based on the user input value transmitted by the front end; S430, generates output values according to the node configuration, and associates them with the calculation script or logic of the node input; S440, through the association between the node_outputs table and the node_inputs table, supports the input and output flow between nodes, thereby achieving high efficiency and flexibility of data interaction.
[0011] Furthermore, the JSON configuration includes field types, input validation rules, and default values.
[0012] Another aspect of the present invention provides a JSON-based dynamic process orchestration system. The dynamic process orchestration system includes: a user interface generation module, an interaction module, a background configuration module and a definition generation module, wherein the user interface generation module is configured to read the process node JSON definition of the user interface and render the process node input component, the back-end system provides the node configuration through the REST API, the front-end dynamically renders the input component according to the JSON configuration obtained from the API, and renders different UI controls according to the configuration, and finally generates the user interface; the interaction module is connected to the user interface generation module and is configured to convert the user input data into JSON format at the front end, and transmit it to the back-end through the POST interface, the back-end processes the input data and persists the input data in the database; the back-end configuration module is connected to the user interface generation module and the definition generation module, and is configured to read the process node JSON definition of the back-end system, and run the process node configuration of the Javascript script in combination with the user input value, and at the same time determine whether the node configuration has changed, if so, return to step S100, if not, execute the next step; the definition generation module is connected to the background configuration module, and is configured to read the JSON configuration at the background, load the corresponding Javascript script according to the configuration, execute the calculation logic of the node, and generate the output value according to the node configuration, and transmit it to the database through the POST interface for storage.
[0013] On the other hand, the present invention provides a JSON-based dynamic process orchestration device, which includes: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the JSON-based dynamic process orchestration method described above is implemented.
[0014] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0015] 1. The present invention realizes front-end and back-end data transmission through a unified REST API interface, supports dynamic adjustment of node configuration, and can flexibly adjust the input and output fields, field validation rules, default values, UI control types, etc. of the nodes according to changes in business needs, shortening the development cycle and improving development efficiency.
[0016] 2. The present invention supports flexible changes in node configuration, and can load and update node configuration in real time without affecting process execution. The front-end and back-end ensure data consistency through APIs, ensuring dynamic adjustment and execution.
[0017] 3. The present invention has the characteristics of flexible storage and transmission of output results, and can be dynamically adjusted according to business needs. The front and back ends interact with data through a unified REST API interface to ensure data consistency and real-time update. It also supports dynamic update of node configuration and can flexibly render different UI interfaces according to changes in business needs to improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0019] Figure 1 This is a flow chart of the method provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0021] Embodiment 1,
[0022] In this embodiment, a JSON-based dynamic process orchestration method is provided. In this embodiment, the JSON configurations of all nodes are transmitted through a unified REST API interface and stored in a relational database, thereby achieving persistence and dynamic update of the configuration. Figure 1 The flowchart of this embodiment is shown. It can be seen from the figure that this embodiment includes the following steps:
[0023] Step 1: The user interface reads the process node JSON definition and renders the process node input component. The backend system provides the node configuration through the REST API. The frontend dynamically renders the input component according to the JSON configuration obtained from the API, and renders different UI controls according to the configuration, and finally generates the user interface.
[0024] The JSON configuration includes field type (text box, date picker, drop-down box, etc.), input validation rules, default value, required or not, and other information.
[0025] Specifically, this step may include the following sub-steps:
[0026] 1) The system stores node configurations in the database, records node ID, name, and type information in the nodes table, and stores the JSON configuration of each node in the node_configs table.
[0027] 2) The front end obtains the latest configuration of the node through the GET interface and dynamically renders the UI controls of the input component according to the JSON configuration.
[0028] 3) The front end dynamically renders the input component according to the information in the JSON configuration and verifies the user input data in real time to ensure that the input meets the format requirements in the configuration.
[0029] Step 2: The front end converts the user input data into JSON format and transmits it to the back end through the POST interface. The back end processes the input data and persists the input data in the database.
[0030] Specifically, step 2 includes the following sub-steps:
[0031] 1) The front end converts the user input data into JSON format and transmits it to the back end through the POST interface.
[0032] 2) The background processes the input data and stores the input value of each node in the node_inputs table, associating it with the node ID and field, thereby achieving persistent storage of the input data.
[0033] Step 3: The background system reads the process node JSON definition, and runs the process node configuration of the Javascript script in combination with the user input value, and determines whether the node configuration has changed. If so, it returns to step 1, if not, it executes the next step.
[0034] Step 4: The background reads the JSON configuration, loads the corresponding Javascript script according to the configuration, executes the calculation logic of the node, generates output values according to the node configuration, and transmits them to the database for storage through the POST interface.
[0035] Specifically, step 4 includes the following sub-steps:
[0036] 1) The background dynamically loads the corresponding Javascript script according to the node configuration, and stores the calculation script or logic related to the node in the node_logic table.
[0037] 2) Execute the loaded Javascript script and perform calculations based on the user input values passed by the front end.
[0038] 3) Generate output values based on node configuration and associate them with the calculation script or logic of the node input.
[0039] 4) Through the association between the node_outputs table and the node_inputs table, the input and output flow between nodes is supported, thereby achieving high efficiency and flexibility in data interaction.
[0040] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A dynamic process orchestration method based on JSON, characterized in that: The dynamic process orchestration method comprises: S100, the user interface reads the process node JSON definition and renders the process node input component. The backend system provides the node configuration through the REST API. The front end dynamically renders the input component according to the JSON configuration obtained from the API, and renders different UI controls according to the configuration, and finally generates the user interface; S200, the front end converts the data input by the user into JSON format and transmits it to the back end through the POST interface. The back end processes the input data and persists the input data in the database; S300, the backend system reads the process node JSON definition, and runs the process node configuration of the Javascript script in combination with the user input value, and determines whether the node configuration has changed. If so, it returns to step S100, if not, it executes the next step; S400, the background reads the JSON configuration, loads the corresponding Javascript script according to the configuration, executes the calculation logic of the node, generates output values according to the node configuration, and transmits them to the database for storage through the POST interface.
2. The JSON-based dynamic process orchestration method according to claim 1, characterized in that: The step S100 includes the following sub-steps: S110, the backend system stores the node configuration through the database, records the node ID, name and type information in the nodes table, and stores the JSON configuration of each node in the node_configs table; S120, the front end obtains the latest configuration of the node through the GET interface, and dynamically renders the UI control of the input component according to the JSON configuration; S130. The front end dynamically renders the input component according to the information in the JSON configuration, and verifies the data input by the user in real time to ensure that the input meets the format requirements in the configuration.
3. The JSON-based dynamic process orchestration method according to claim 1, characterized in that: The step S200 includes the following sub-steps: S210, the front end converts the data input by the user into JSON format and transmits it to the back end through the POST interface; S220, the background processes the input data and stores the input value of each node in the node_inputs table, which is associated with the node ID and field, thereby realizing persistent storage of the input data.
4. The JSON-based dynamic process orchestration method according to claim 1, characterized in that: The step S400 includes the following sub-steps: S410, the background dynamically loads the corresponding Javascript script according to the node configuration, and stores the calculation script or logic related to the node in the node_logic table; S420, executing the loaded Javascript script, and performing calculations according to the user input value transmitted by the front end; S430, generating an output value according to the node configuration, and associating it with the calculation script or logic input by the node; S440. By associating the node_outputs table with the node_inputs table, the input and output flow between nodes is supported, thereby achieving high efficiency and flexibility of data interaction.
5. The JSON-based dynamic process orchestration method according to any one of claims 1 or 2, characterized in that: The JSON configuration includes field types, input validation rules, and default values.
6. A dynamic process orchestration system based on JSON, characterized in that: The dynamic process orchestration system includes: a user interface generation module, an interaction module, a background configuration module and a definition generation module, wherein: The user interface generation module is configured to read the process node JSON definition and render the process node input component as the user interface. The backend system provides the node configuration through the REST API. The frontend dynamically renders the input component according to the JSON configuration obtained from the API and renders different UI controls according to the configuration to finally generate the user interface. The interaction module and the user interface generation module are connected and configured so that the front end converts the user input data into JSON format and transmits it to the back end through the POST interface. The back end processes the input data and persists the input data in the database. The backend configuration module is connected to the user interface generation module and the definition generation module, and is configured to read the process node JSON definition of the backend system, and run the process node configuration of the Javascript script in combination with the user input value, and at the same time determine whether the node configuration has changed. If so, return to step S100, if not, execute the next step; The definition generation module is connected to the background configuration module and is configured to read the JSON configuration in the background, load the corresponding Javascript script according to the configuration, execute the calculation logic of the node, and generate output values according to the node configuration, which are transmitted to the database for storage through the POST interface.
7. A dynamic process arrangement device based on JSON, characterized in that: The dynamic process arrangement device comprises: processor; A memory storing a computer program, which, when executed by a processor, implements the JSON-based dynamic process orchestration method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Form and workflow interaction method, development platform, equipment and storage medium
CN113094037A