A low-code development method, apparatus, device, and medium based on logic orchestration
The low-code development method of logic orchestration supports online code writing and generates consistent logic orchestration scripts for both front-end and back-end, solving the problems of low efficiency and poor compatibility in existing low-code development, and enabling rapid updates and flexible expansion.
Patent Information
- Application Number
- CN202310019119.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2043-01-06
AI Technical Summary
Existing low-code development methods result in low development efficiency, slow service updates, incompatibility with existing systems, inconsistent front-end and back-end code, high difficulty in learning programming languages, and inability to write code online.
It adopts a low-code development approach based on logic orchestration, which supports online code writing by displaying a syntax hint tree and code editor at design time, and executes logic orchestration scripts at runtime using front-end or back-end script engines to generate syntax trees, thus achieving consistency and compatibility between front-end and back-end code.
It enables online code writing, provides fast service updates, ensures consistency between front-end and back-end code, reduces the learning difficulty of programming languages, supports flexible expansion and rapid development, is compatible with existing functions, and does not rely on IDE development tools.
Smart Images

Figure CN115878095B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application development, and in particular to a low-code development method, apparatus, device, and medium based on logic orchestration. Background Technology
[0002] In the current context, low-code development is an industry trend that enables developers with varying levels of experience to create web pages and mobile applications using a graphical user interface, drag-and-drop components, and model-driven logic.
[0003] In current low-code development processes, front-end and back-end code are generally inconsistent, and programming languages are difficult to learn, thus limiting application development. Furthermore, current technologies cannot support online code writing; in scenarios requiring customized applications, professional technicians are needed to modify the code, and the generated code requires compilation, deployment, and service restarts, which is inefficient. Additionally, the current low-code development paradigm demands compatibility with existing technology systems, which is also difficult to achieve effectively.
[0004] As can be seen from the above, in the process of low-code development, how to avoid situations such as low development efficiency, slow service updates, and incompatibility with existing systems due to the irrationality of existing low-code development methods is a problem that needs to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a low-code development method, apparatus, device, and medium based on logic orchestration, which supports users to write code online, provides fast service updates, allows both front-end and back-end execution of the written code, maintains consistent syntax, provides a single codebase for both front-end and back-end use, and is compatible with existing functionalities. It can execute both online-written scripts and existing services, and allows for flexible expansion. The specific solution is as follows:
[0006] Firstly, this application discloses a low-code development method based on logic orchestration, including:
[0007] When the component is in the design state and receives the script editor expansion command, the script editor containing the preset syntax hint tree, syntax help area and code editor will be displayed in the preset interface, and the logic arrangement script generated by the logic arrangement code received by the code editor will be saved.
[0008] When the component is in runtime, the target caller is determined based on the logic orchestration code, and the target engine corresponding to the logic orchestration script is invoked using the target caller. A syntax tree is generated based on the logic orchestration script, and then the syntax tree is executed using the target engine, and the execution result is returned to the target caller. The target engine is either a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object.
[0009] Optionally, saving the logic orchestration script generated from the logic orchestration code received through the code editor includes:
[0010] The logic orchestration script generated from the logic orchestration code received through the code editor and the target metadata corresponding to the logic orchestration script are saved to a preset database;
[0011] Accordingly, after saving the logic orchestration script generated from the logic orchestration code received through the code editor, the process further includes:
[0012] When a one-click publish instruction is received, the target metadata is published to the component state runtime environment, and the metadata cache area corresponding to the component state runtime environment is cleared.
[0013] Optionally, before invoking the target engine corresponding to the logical orchestration script using the target caller, the method further includes:
[0014] Determine if metadata exists in the metadata cache;
[0015] If the metadata does not exist in the metadata cache, the target metadata is retrieved from the preset database, saved to the metadata cache, and then the logical orchestration script is determined based on the target metadata.
[0016] If metadata exists in the metadata cache, the metadata in the metadata cache is read, and the logical orchestration script is determined based on the metadata.
[0017] Optionally, displaying a script editor containing a preset syntax hint tree, syntax help area, and code editor in a preset interface includes:
[0018] Displays a pre-defined grammar suggestion tree, grammar help area, and script editor (Monaco Editor) in the default interface.
[0019] Optionally, the syntax tree is executed using a front-end scripting engine, including:
[0020] The syntax tree is executed based on the function created using the new Function method in the front-end script engine and referenced in the global environment.
[0021] Optionally, the syntax tree is executed using a backend script engine, and the execution result is returned to the target caller, including:
[0022] The backend script engine executes the plugin code and syntax tree in the preset plugin information, and returns the execution result obtained after executing the plugin code and syntax tree to the target caller.
[0023] Optionally, after displaying the script editor, which includes a preset syntax hint tree, syntax help area, and code editor, in the preset interface, the following steps are included:
[0024] The logic orchestration code is obtained through the code editor; the logic orchestration code is used to define any one or more combinations of interface loading events, control events, state machine transition events, backend execution events, and action logic orchestration.
[0025] When a syntax help instruction for a target method is obtained in the first area where the preset syntax hint tree is located, the usage information of the target method is determined, and the usage information of the target method is sent to the second area where the syntax help area is located for display.
[0026] Secondly, this application discloses a low-code development apparatus based on logic orchestration, comprising:
[0027] The script generation and saving module is used to display the script editor, which includes a preset syntax hint tree, syntax help area and code editor, in the preset interface when the component is in the design state and the script editor expansion instruction is obtained, and to save the logic arrangement script generated by the logic arrangement code received by the code editor.
[0028] The script execution module is used to determine the target caller based on the logic orchestration code when the component is in the running state, and to use the target caller to call the target engine corresponding to the logic orchestration script, generate a syntax tree based on the logic orchestration script, execute the syntax tree using the target engine, and return the execution result to the target caller; the target engine is a backend script engine or a frontend script engine; the backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code; the frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object.
[0029] Thirdly, this application discloses an electronic device, comprising:
[0030] Memory, used to store computer programs;
[0031] A processor for executing the computer program to implement the aforementioned low-code development method based on logic orchestration.
[0032] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed low-code development method based on logic orchestration.
[0033] This application proposes that when the component is in the design state and receives a script editor expansion command, a script editor containing a preset syntax hint tree, syntax help area, and code editor is displayed in a preset interface, and the logic orchestration script generated by the logic orchestration code received through the code editor is saved. When the component is in the runtime state, the target caller is determined based on the logic orchestration code, and the target engine corresponding to the logic orchestration script is called using the target caller. A syntax tree is generated based on the logic orchestration script, and then the syntax tree is executed using the target engine, and the execution result is returned to the target caller. The target engine is a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object. In this way, the present invention enables online code writing through two component states: design time and runtime. This facilitates logic orchestration in low-code development and ensures rapid updates to business services. The entire process does not rely on IDE development tools, reducing the demands on computer performance. Furthermore, the invention provides users with syntax highlighting trees and script help areas while they are writing code, offering convenience. Additionally, the logic orchestration code generated in this invention is compatible with both front-end and back-end development. By parsing the logic orchestration code into a syntax tree and executing it using both the front-end and back-end script engines, consistency between the front-end and back-end code is achieved, reducing the learning difficulty of programming languages and allowing for rapid learning and application development on both the front-end and back-end. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0035] Figure 1 A flowchart of a low-code development method based on logic orchestration is provided for this application;
[0036] Figure 2 A flowchart illustrating a specific low-code development method based on logic orchestration provided in this application;
[0037] Figure 3 A schematic diagram of a low-code development device based on logic orchestration provided for this application;
[0038] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] In existing technologies, low-code development suffers from low development efficiency, slow service updates, and incompatibility with existing systems. This application addresses these issues by enabling users to write code online, providing fast service updates, and allowing both front-end and back-end execution of the written code. The code is syntax-consistent, a single codebase is universally applicable, and it is compatible with existing functionalities. It can execute both online-written scripts and existing services, and allows for flexible expansion.
[0041] This invention discloses a low-code development method based on logic orchestration. See [link to relevant documentation]. Figure 1 The method includes:
[0042] Step S11: When the component is in the design state and the script editor expansion command is received, the script editor containing the preset syntax hint tree, syntax help area and code editor is displayed in the preset interface, and the logic arrangement script generated by the logic arrangement code received by the code editor is saved.
[0043] In this embodiment, two component states, design time and runtime, are defined during low-code development. Users can orchestrate logic according to the usage scenario in the design time state and run the logic orchestration script in the runtime state. The method in this invention can be applied in a browser to realize online code writing and online script running without relying on IDE (Integrated Development Environment) development tools.
[0044] Specifically, when a user initiates a script editor expansion command at a location requiring logical arrangement, this method expands the script editor upon receiving the command. This involves displaying a predefined syntax hint tree in the first display position of the preset interface, a syntax help area in the second display position, and the code editor in the third display position. The syntax help area provides information about the script methods used for script editing, including method overviews, output parameters, input parameters, and usage examples. When the user clicks on a target node in the syntax hint tree, the corresponding method information is generated in the syntax help area. Furthermore, the code editor receives the user's input code data and automatically records the context information and the user's session information for code suggestions during input.
[0045] It should be noted that the code editor described in this embodiment supports functions such as syntax highlighting, intelligent suggestions, syntax validation, and code formatting. In this embodiment, displaying the script editor containing a preset syntax suggestion tree, syntax help area, and code editor on the preset interface can include: displaying the script editor containing the preset syntax suggestion tree, syntax help area, and Monaco Editor on the preset interface. That is, in some preferred embodiments, the code editor can be Monaco Editor.
[0046] In this embodiment, after displaying the script editor, which includes a preset syntax hint tree, a syntax help area, and a code editor, on a preset interface, it may include: obtaining logic orchestration code through the code editor; the logic orchestration code is used to define any one or more combinations of interface loading events, control events, state machine switching events, backend execution events, and action logic orchestration; when a syntax help instruction for a target method is obtained in the first area where the preset syntax hint tree is located, the usage information of the target method is determined, and the usage information of the target method is sent to the second area where the syntax help area is located for display.
[0047] It is understood that in this embodiment, after the script editor is displayed on the preset interface, the user will write logic orchestration code through the code editor to achieve logic orchestration for a specific scenario. In some specific implementations, when performing logic orchestration, the user can orchestrate based on interface loading events, control events, state machine switching events, backend execution events, and action logic orchestration.
[0048] Specifically, the interface loading event can define logical events during or after interface loading. For example, a preset interface button can be used to call a data query, and the query results can be bound to a list or chart to implement post-loading logic based on the interface loading event. In low-code development, the front-end generates the application interface by dragging and dropping UI controls. Therefore, the control events in this embodiment can define logic such as click, double-click, loss of focus, and pagination. For example, operations such as opening a card or deleting data can be performed based on the selection. The state machine switching event can define the state switching logic before, during, and after saving the state machine. For example, logic such as assigning values to fields can be implemented when the state machine switches states. The backend execution event can define the dynamic expansion of the backend service before and after execution. The action logic orchestration can define the calling logic between various events. After the user logic orchestration is completed, a logic orchestration script can be generated. It should be noted that JavaScript is preferably used as the online logic orchestration language in this invention. Accordingly, the logic orchestration script is a JavaScript-formatted script.
[0049] Step S12: When the component is in runtime state, the target caller is determined based on the logic orchestration code, and the target engine corresponding to the logic orchestration script is invoked using the target caller. A syntax tree is generated based on the logic orchestration script, and then the syntax tree is executed using the target engine, and the execution result is returned to the target caller. The target engine is a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object.
[0050] In this embodiment, when the component is in runtime, the target caller is determined based on the logic orchestration code. In most cases, the initial target caller is a pre-set button. In specific implementation scenarios, it depends on the user's orchestration intention. The caller can read the logic orchestration script and determine which script to use for execution. The front end calls the front end script engine, and the back end calls the back end script engine. Before the front end script engine executes, it injects the context information used by the interface and the methods used in the logic orchestration code into the window object. Before the back end script engine executes, it injects Session information, context information, and preset plugin information.
[0051] Then, the logic orchestration script will be parsed using syntax and lexical methods to parse it into an abstract syntax tree. The target engine will then execute the script based on the syntax tree and finally return the execution result to the caller.
[0052] In some specific implementations, the logic orchestration script may involve multiple calling processes. That is, after the target caller calls the target script engine for execution, it will call the next target caller. After multiple calls between multiple target callers, the logic execution script will finish executing.
[0053] This embodiment proposes a low-code development method based on logic orchestration. When the component is in the design state and receives a script editor expansion command, a script editor containing a preset syntax hint tree, syntax help area, and code editor is displayed in a preset interface, and the logic orchestration script generated by the logic orchestration code received through the code editor is saved. When the component is in the runtime state, the target caller is determined based on the logic orchestration code, and the target engine corresponding to the logic orchestration script is invoked using the target caller. A syntax tree is generated based on the logic orchestration script, and then the syntax tree is executed using the target engine, and the execution result is returned to the target caller. The target engine is a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object. This enables online code writing without relying on IDE development tools, reducing computer performance requirements. It also provides users with syntax highlighting trees, script help areas, and code editors that support syntax highlighting, intelligent suggestions, syntax checking, and code formatting for added convenience. Furthermore, the logic orchestration code generated in this invention is compatible with both front-end and back-end code. By parsing the logic orchestration code into a syntax tree and executing it using both front-end and back-end script engines, consistency between the front-end and back-end code is achieved, reducing the learning curve for programming languages. Both front-end and back-end developers can quickly learn and develop applications; the front-end writes the core back-end code, and the back-end defines front-end control event methods.
[0054] Figure 2 A flowchart illustrating a specific low-code development method based on logic orchestration is provided for embodiments of this application. See also... Figure 2 As shown, the method includes:
[0055] Step S21: When the component is in the design state and the script editor expansion command is received, the script editor containing the preset syntax hint tree, syntax help area and code editor is displayed in the preset interface, and the logic orchestration script generated by the logic orchestration code received by the code editor and the target metadata corresponding to the logic orchestration script are saved to the preset database.
[0056] For a more detailed description of the process of step S21, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0057] In this embodiment, after the logic orchestration script is generated, the logic orchestration script and the target metadata corresponding to the logic orchestration script are saved to a preset database.
[0058] Step S22: When a one-click publish instruction is received, the target metadata is published to the component state runtime environment, and the metadata cache area corresponding to the component state runtime environment is cleared.
[0059] When a one-click publish command is received from a user, the target metadata will be published to the joint debugging environment.
[0060] Step S23: When the component is in the running state, determine whether there is metadata in the metadata cache.
[0061] Step S24: If the metadata does not exist in the metadata cache, the target metadata is obtained from the preset database, the target metadata is saved to the metadata cache, and then the logical orchestration script is determined based on the target metadata.
[0062] When the runtime environment is running, the target caller will retrieve metadata information from the metadata cache. If the Redis metadata cache does not contain metadata information, it indicates that the user has redeployed the logic orchestration script. In this case, the target metadata information and the target script will be retrieved from the database, and the target script will be stored in the metadata cache so that the metadata information can be retrieved directly from the metadata cache the next time the runtime environment is entered.
[0063] Step S25: If metadata exists in the metadata cache, read the metadata from the metadata cache, determine the logic orchestration script based on the metadata, determine the target caller based on the logic orchestration code, and use the target caller to call the target engine corresponding to the logic orchestration script. Generate a syntax tree based on the logic orchestration script, then execute the syntax tree using the target engine, and return the execution result to the target caller. The target engine is a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information into the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object.
[0064] In this embodiment, executing the syntax tree using a front-end script engine may include: using the front-end script engine to create a new Function and referencing a global environment creation function to execute the syntax tree based on that function. In this embodiment, if the target script engine is a front-end script engine, then the front-end script engine needs to execute the syntax tree by referencing a global environment creation function.
[0065] In this embodiment, executing the syntax tree using a backend script engine and returning the execution result to the target caller may include: executing the plugin code in the preset plugin information and the syntax tree using a backend script engine, and returning the execution result obtained after executing the plugin code and the syntax tree to the target caller.
[0066] It should be noted that in this embodiment, the backend script can be injected with preset plugin information to enable calls between various services. During application, it can be compatible with existing technology systems. For example, the preset plugin information can be used to call the gateway service, read session information, access the configuration center, and extend the workflow.
[0067] It should be noted that after the metadata corresponding to the logic orchestration script is published to the project integration environment with one click in this invention, online debugging of the script can be supported. During the script execution, the execution results can be viewed and debugging logs can be printed.
[0068] In this embodiment, the logic orchestration script can be published with a single click, directly deploying the logic orchestration script from the design-time environment to the runtime environment. This enables hot updates of business logic without restarting the service, improving development and delivery efficiency, shortening the development cycle, and saving development costs. Furthermore, this embodiment injects pre-defined plugin information into the backend script engine, enabling the reuse of existing code, customization of extended plugins, and the ability to call various business logics together, offering significant convenience.
[0069] See Figure 3 As shown in the figure, this application discloses a low-code development device based on logic orchestration, which may specifically include:
[0070] The script generation and saving module 11 is used to display the script editor containing the preset syntax hint tree, syntax help area and code editor in the preset interface when the component is in the design state and the script editor expansion instruction is obtained, and to save the logic arrangement script generated by the logic arrangement code received by the code editor.
[0071] The script execution module 12 is used to determine the target caller based on the logic orchestration code when the component is in the running state, and to use the target caller to call the target engine corresponding to the logic orchestration script, generate a syntax tree based on the logic orchestration script, then use the target engine to execute the syntax tree, and return the execution result to the target caller; the target engine is a backend script engine or a frontend script engine; the backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code; the frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object.
[0072] This application proposes that when the component is in the design state and receives a script editor expansion command, a script editor containing a preset syntax hint tree, syntax help area, and code editor is displayed in a preset interface, and the logic orchestration script generated by the logic orchestration code received through the code editor is saved. When the component is in the runtime state, the target caller is determined based on the logic orchestration code, and the target engine corresponding to the logic orchestration script is called using the target caller. A syntax tree is generated based on the logic orchestration script, and then the syntax tree is executed using the target engine, and the execution result is returned to the target caller. The target engine is a backend script engine or a frontend script engine. The backend script engine has pre-injected context information, session information, and preset plugin information from the logic orchestration code. The frontend script engine has pre-injected the context information and the methods used in the logic orchestration code into the window object. In this way, the present invention enables online code writing through two component states: design time and runtime. This facilitates logic orchestration in low-code development and ensures rapid updates to business services. The entire process does not rely on IDE development tools, reducing the demands on computer performance. Furthermore, the invention provides users with syntax highlighting trees and script help areas while they are writing code, offering convenience. Additionally, the logic orchestration code generated in this invention is compatible with both front-end and back-end development. By parsing the logic orchestration code into a syntax tree and executing it using both the front-end and back-end script engines, consistency between the front-end and back-end code is achieved, reducing the learning difficulty of programming languages and allowing for rapid learning and application development on both the front-end and back-end.
[0073] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of use of this application.
[0074] Figure 4This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input / output interface 25, a communication interface 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the low-code development method based on logic orchestration disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0075] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0076] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include an operating system 221, computer programs 222, and virtual machine data 223, etc. The virtual machine data 223 can include various types of data. The storage method can be temporary storage or permanent storage.
[0077] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the low-code development method based on logic orchestration disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0078] Furthermore, this application also discloses a computer-readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, optical disks, or any other form of storage medium known in the art. When the computer program is executed by a processor, it implements the aforementioned low-code development method based on logic orchestration. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0079] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section. Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0080] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0081] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0082] The low-code development method, apparatus, device, and storage medium based on logic orchestration provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A low-code development method based on logical arrangement, characterized in that, The application relates to a component state management method and device. When the component state is design, and the script editor expansion instruction is acquired, a script editor containing a preset syntax prompt tree, a syntax help area and a code editor is displayed in a preset interface, and a logic arrangement script generated by logic arrangement code received through the code editor is saved; When the component state is running, a target calling party is determined based on the logic arrangement code, the target engine corresponding to the logic arrangement script is called by using the target calling party, a syntax tree is generated based on the logic arrangement script, the syntax tree is executed by using the target engine, and an execution result is returned to the target calling party; The target engine is a backend script engine or a frontend script engine; The backend script engine has previously injected context information, session information and preset plug-in information in the logic arrangement code; The frontend script engine has previously injected the context information and a method used in the logic arrangement code into a window object. 2.The low-code development method based on logical arrangement according to claim 1, wherein, The method comprises the following steps: The logic arrangement script generated by the logic arrangement code received through the code editor and target metadata corresponding to the logic arrangement script are saved in a preset database. Correspondingly, after the logic arrangement script generated by the logic arrangement code received through the code editor is saved, the method further comprises the following steps: When a one-key publishing instruction is acquired, the target metadata is published to a component state running environment, and a metadata cache area corresponding to the component state running environment is emptied. 3.The low-code development method based on logical arrangement of claim 2, wherein, Before the target engine corresponding to the logic arrangement script is called by using the target calling party, the method further comprises the following steps: It is judged whether metadata exists in a metadata cache area; If no metadata exists in the metadata cache area, the target metadata is acquired from the preset database, the target metadata is saved in the metadata cache area, and a logic arrangement script is determined based on the target metadata; If metadata exists in the metadata cache area, the metadata in the metadata cache area is read, and a logic arrangement script is determined based on the metadata. 4.The low-code development method based on logical arrangement according to claim 1, characterized in that, The script editor containing the preset syntax prompt tree, the syntax help area and the Monaco Editor is displayed in the preset interface. The syntax tree is executed by using the frontend script engine, which comprises the following steps: 5.The low-code development method based on logical arrangement according to claim 1, characterized in that, The syntax tree is executed by using the frontend script engine in the mode of new Function, and a function is created by referring to a global environment, so that the syntax tree is executed based on the function. The syntax tree is executed by using the backend script engine, and an execution result is returned to the target calling party, which comprises the following steps: 6.The low-code development method based on logical arrangement according to claim 1, characterized in that, The plug-in code in the preset plug-in information and the syntax tree are executed by using the backend script engine, and an execution result obtained after the plug-in code and the syntax tree are executed is returned to the target calling party. 7.The low-code development method based on logical arrangement according to any one of claims 1 to 6, characterized in that, The script editor comprising the preset syntax prompt tree, the syntax help area and the code editor is displayed in the preset interface, and the method comprises the following steps: The logic arrangement code is obtained through the code editor; the logic arrangement code is used to define any one or a combination of a plurality of combinations of interface loading events, control events, state machine switching events, backend execution events and action logic arrangement; When the syntax help instruction for the target method is obtained in the first area where the preset syntax prompt tree is located, the usage information of the target method is determined, and the usage information of the target method is sent to the second area where the syntax help area is located for display.
8. A low-code development device based on logical orchestration, characterized by, The method comprises the following steps: The script generation and saving module is used to display the script editor comprising the preset syntax prompt tree, the syntax help area and the code editor in the preset interface when the component state is design and the script editor expansion instruction is obtained, and the logic arrangement script generated by the logic arrangement code received by the code editor is saved; The script running module is used to determine the target calling party based on the logic arrangement code when the component state is running, and call the target engine corresponding to the logic arrangement script by using the target calling party, generate a syntax tree based on the logic arrangement script, execute the syntax tree by using the target engine, and return the execution result to the target calling party; The target engine is a backend script engine or a frontend script engine; The backend script engine has pre-injected context information, session information and preset plug-in information in the logic arrangement code; The frontend script engine has pre-injected the context information and the method used in the logic arrangement code into the window object.
9. An electronic device, comprising: The computer program is stored in the memory, and the processor executes the computer program to realize the low-code development method based on logic arrangement in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the memory, and the processor executes the computer program to realize the low-code development method based on logic arrangement in any one of claims 1 to 7.
Citation Information
Patent Citations
System risk assessment method and device under micro-service architecture, equipment and medium
CN112540905A
Internet-of-things APP development system based on cloud arrangement
CN113220283A