Script generation method of low-code platform and related equipment
By automatically outputting custom scripts using a script generation model in a low-code platform, the high barrier to entry for custom script development in existing technologies is solved. This enables fast and accurate script generation without programming skills, improving the development efficiency and security of the low-code platform.
Patent Information
- Application Number
- CN202511438616.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-01-16
AI Technical Summary
Existing low-code platforms mainly rely on manual coding by users in the custom script development stage, resulting in high development thresholds and high time costs. In particular, users without programming backgrounds face significant learning costs and time investments.
By acquiring process configuration information, form element configuration information, and preceding process context script information from the low-code platform, and combining this with the user's development intent information, the trained script generation model automatically outputs the target script, including identifying logical conflicts and data dependencies, supporting script generation with high execution efficiency, readability, and security policies.
Users can quickly and accurately obtain custom scripts without needing professional programming skills, which reduces the development threshold and time cost, improves the efficiency and quality of script generation, and ensures the security and maintainability of the generated scripts.
Smart Images

Figure CN121349451A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of low-code platform technology, and in particular to a script generation method and related equipment for a low-code platform. Background Technology
[0002] As enterprises deepen their digital transformation, low-code platforms have gained widespread attention due to their efficient application building capabilities. Low-code platforms typically offer features such as form design, workflow orchestration, and custom script development, with custom script development being a key means of implementing complex business logic.
[0003] However, while existing low-code platforms support drag-and-drop form design and workflow orchestration, custom script development still primarily relies on manual coding by users. This necessitates a certain level of programming knowledge, resulting in a high barrier to entry and significant time costs for custom script development. For example, users without a programming background often need to learn programming languages and low-code platform APIs from scratch when writing custom scripts, facing substantial learning costs and time investments. Summary of the Invention
[0004] This application provides a script generation method for a low-code platform to solve the problem in the prior art that the development of custom scripts mainly relies on manual coding by users, resulting in a high development threshold and high time cost.
[0005] This application also provides a script generation device for a low-code platform, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] The embodiments of this application adopt the following technical solutions: Firstly, this application provides a script generation method for a low-code platform, comprising: In response to the user-selected target process node's custom script generation command, obtain the process configuration information, form element configuration information, and preceding process context script information related to the target process node from the low-code platform; Determine the user's development intent information; Input the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model to obtain the target script output by the script generation model.
[0007] Optionally, process configuration information, form element configuration information, preceding process context script information, and development intent information can be input into the trained script generation model, including: Input the process configuration information, form element configuration information, preceding process context script information, development intent information, and relationship graph into the trained script generation model; The relationship graph is determined in the following way: Based on the process configuration information and the preceding process context script information, identify logical conflict information and data dependencies in the preceding process context script information; A relationship graph is generated based on the logical conflict information and data dependencies in the context script information of the preceding process.
[0008] Optionally, before inputting the process configuration information, form element configuration information, preceding process context script information, development intent information, and relationship graph into the trained script generation model, the method further includes: The relationship graph samples, historical process configuration information samples, historical form element configuration information samples, and historical process context script information samples are input into the script generation model to be trained to obtain the trained script generation model.
[0009] Optionally, before inputting the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model, the method further includes: Obtain samples of historical process configuration information, historical form element configuration information, historical process context script information, and historical development intent information from the low-code platform. The historical process configuration information sample, historical form element configuration information sample, historical process context script information sample, and historical development intent information sample are input into the script generation model to be trained to obtain the trained script generation model.
[0010] Optionally, the preceding process context script information of the target process node includes: the script content, script type, function description, operation variables, and call interface information of the custom scripts of one or more preceding nodes of the target process node.
[0011] Optionally, process configuration information, form element configuration information, preceding process context script information, and development intent information can be input into the trained script generation model, including: The process configuration information, form element configuration information, and preceding process context script information are converted into data in a predefined structured data format; the predefined structured data format includes JSON or XML format. The converted data in the predefined structured data format and the development intent information are input into the trained script generation model.
[0012] Optionally, process configuration information, form element configuration information, preceding process context script information, and development intent information are input into the trained script generation model to obtain the target script output by the script generation model, including: Input the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model; Receive user instructions on selecting a code generation strategy for custom scripts; Based on the target code generation strategy information and the input information of the script generation model contained in the selection instructions, the script generation model is controlled to output a target script that matches the target code generation strategy information and the input information; The code generation strategies include: high execution efficiency strategy, high readability strategy, and / or least privilege security strategy.
[0013] Secondly, this application provides a script generation apparatus for a low-code platform, comprising an acquisition module, a determination module, and a processing module, wherein: The acquisition module is used to respond to the user's custom script generation command for the target process node and acquire process configuration information, form element configuration information and preceding process context script information related to the target process node in the low-code platform. The determination module is used to determine the user's development intent information; The processing module is used to input process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model to obtain the target script output by the script generation model.
[0014] Optional, processing module, used for: Input the process configuration information, form element configuration information, preceding process context script information, development intent information, and relationship graph into the trained script generation model; The relationship graph is determined in the following way: Based on the process configuration information and the preceding process context script information, identify logical conflict information and data dependencies in the preceding process context script information; A relationship graph is generated based on the logical conflict information and data dependencies in the context script information of the preceding process.
[0015] Optionally, the device is also used for: The relationship graph samples, historical process configuration information samples, historical form element configuration information samples, and historical process context script information samples are input into the script generation model to be trained to obtain the trained script generation model.
[0016] Optionally, the device is also used for: Obtain samples of historical process configuration information, historical form element configuration information, historical process context script information, and historical development intent information from the low-code platform. The historical process configuration information sample, historical form element configuration information sample, historical process context script information sample, and historical development intent information sample are input into the script generation model to be trained to obtain the trained script generation model.
[0017] Optionally, the preceding process context script information of the target process node includes: the script content, script type, function description, operation variables, and call interface information of the custom scripts of one or more preceding nodes of the target process node.
[0018] Optional, processing module, used for: The process configuration information, form element configuration information, and preceding process context script information are converted into data in a predefined structured data format; the predefined structured data format includes JSON or XML format. The converted data in the predefined structured data format and the development intent information are input into the trained script generation model.
[0019] Optional, processing module, used for: Input the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model; Receive user instructions on selecting a code generation strategy for custom scripts; Based on the target code generation strategy information and the input information of the script generation model contained in the selection instructions, the script generation model is controlled to output a target script that matches the target code generation strategy information and the input information; The code generation strategies include: high execution efficiency strategy, high readability strategy, and / or least privilege security strategy.
[0020] Thirdly, this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the script generation method for a low-code platform as described above.
[0021] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the script generation method for a low-code platform as described above.
[0022] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the script generation method for a low-code platform as described above.
[0023] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: The method provided in this application embodiment can automatically collect relevant context information of the process node in response to the user's custom script generation instruction for the target process node. This includes flow configuration information, form element configuration information, and preceding process context script information. Combined with the user's development intent information, the trained script generation model outputs the corresponding target script. In this way, the user does not need to have professional programming skills to quickly and accurately obtain the required custom script. Therefore, it can solve the problem in the prior art that the development of custom scripts mainly relies on manual coding by the user, resulting in a high development threshold and high time cost. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A schematic diagram illustrating the implementation flow of a script generation method for a low-code platform provided in this application embodiment; Figure 2 This application provides a schematic diagram of the specific structure of a script generation device for a low-code platform. Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0027] Example 1 To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] As will be known to those skilled in the art, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0029] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.
[0030] To address the problem that the development of custom scripts in the prior art relies heavily on manual coding by users, resulting in a high development threshold and significant time cost, this application provides a script generation method for a low-code platform.
[0031] The execution subject of this method can be various types of computing devices, or it can be an application or app installed on the computing device. The computing device can be a user terminal such as a mobile phone, tablet computer, or smart wearable device, or it can be a server.
[0032] For ease of description, this application uses a server as the execution subject of the method in its embodiments to illustrate the method. Those skilled in the art will understand that this embodiment uses a server as an example to describe the method, which is merely an illustrative example and does not limit the scope of protection of the corresponding claims.
[0033] Specifically, the implementation flow of the method provided in this application embodiment is as follows: Figure 1 As shown, it includes the following steps: Step 11: In response to the user-selected target process node's custom script generation instruction, obtain the process configuration information, form element configuration information, and preceding process context script information related to the target process node from the low-code platform.
[0034] The preceding process context script information of the target process node includes: the script content, script type, function description, operation variables, and call interface information of the custom scripts of one or more preceding nodes of the target process node.
[0035] The process configuration information includes configuration information for static parameters such as process flow, execution conditions, and triggering rules for the target process node.
[0036] For example, in one specific embodiment, the process configuration information may include process ID, name, node definition, conditional branches, participants, and other information.
[0037] Form element configuration information includes functional descriptions of front-end form fields, control types, validation rules, and display styles associated with the target process node.
[0038] For example, in one specific embodiment, form element configuration information may include form ID, field definitions, validation rules, default values, etc.
[0039] The preceding process context script information refers to the specific content of the custom scripts defined by one or more preceding nodes of the target process node, including the script type (such as JavaScript, Python script), script function description (such as data validation, variable assignment, interface call), operation variable information (definition and usage of input variables and output variables), and calling interface information (URL of external service interface, request method, parameter specification and return value processing logic, etc.).
[0040] For example, in one specific embodiment, the preceding process context script information may include script content, script type, function description, API calls, etc.
[0041] In this embodiment of the application, the process configuration information, form element configuration information and preceding process context script information of the target process node can be obtained by calling the interface of the process modeling engine built into the low-code platform.
[0042] Optionally, in another implementation, configuration information related to the target process node can be obtained by accessing the unified configuration repository or metadata management module of the low-code platform. Specifically, the low-code platform can obtain process configuration information, form element configuration information, and preceding process context script information by querying the process definition table, form element definition table, and script resource library in the configuration repository. This method can complete the configuration reading based on statically stored data without directly parsing the runtime engine, and is suitable for application scenarios such as offline analysis, version comparison, and configuration migration.
[0043] In one optional implementation, in addition to process configuration information, form element configuration information, and the preceding process context script information of the target process node, utility class encapsulation information can be further obtained, such as method name, parameters, return value, and example. The utility class encapsulation information also needs to be converted into a predefined structured data format.
[0044] Step 12: Determine the user's development intent information.
[0045] In this embodiment, the user's development intent information can be determined by parsing the user's natural language description. Specifically, the user can express development needs in natural language within a low-code platform. After receiving the natural language expression information about the user's development needs, the low-code platform can analyze the natural language expression information using semantic parsing and context information matching technology, and combine it with process configuration information, form element configuration information, and the script logic of preceding nodes to generate a structured understanding of the user's development intent.
[0046] Optionally, in another implementation, the user's development intent information can also be determined through interactive intent clarification. For example, when the user's natural language description is vague or incomplete, the low-code platform can automatically generate clarifying questions, such as "You mentioned needing to send a notification, would you like to ask whether it should be via email or a system message?", and complete and correct the development intent based on the user's answer.
[0047] Furthermore, in another implementation, the user's development intent information can be determined through a semantic matching script template library. By semantically comparing the user's input natural language description with common business scenario templates stored in the script template library, the user's development intent information can be quickly located.
[0048] In another alternative implementation, the user's development intent can be inferred by combining historical operation records and contextual information. Specifically, based on the user's existing process configurations, form designs, and script modification history in the low-code platform, the user's possible needs can be inferred, and automatic completion and optimization can be performed when natural language input is insufficient or ambiguous, in order to extract a development intent that better reflects the actual needs.
[0049] Step 13: Input the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model to obtain the target script output by the script generation model.
[0050] In this embodiment, considering the diverse sources and formats of process configuration information, form element configuration information, and preceding process context script information in the low-code platform, and their close correlation with user development intent information, directly inputting them into the script generation model without structuring may lead to the model's inability to fully understand the business logic and relationships between nodes, potentially resulting in inaccurate script generation results or security risks. Therefore, before inputting them into the model, the process configuration information, form element configuration information, and preceding process context script information can be converted into predefined structured data formats, including JSON or XML formats. Then, the converted predefined structured data and development intent information are input into the trained script generation model.
[0051] By uniformly converting process configuration information, form element configuration information, and preceding process context script information into a structured data format, and inputting them along with the user's development intent information into the trained script generation model, the generated target script can more accurately conform to business logic and platform specifications. This not only improves the efficiency and quality of script generation but also lowers the development threshold, and ensures good scalability and maintainability while guaranteeing security.
[0052] In this embodiment, when inputting process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model, the generation and input of a relationship graph are also included.
[0053] The relationship graph can be determined as follows: based on the process configuration information and the preceding process context script information, identify the logical conflict information and data dependency relationships in the preceding process context script information; generate the relationship graph based on the logical conflict information and data dependency relationships in the preceding process context script information.
[0054] Specifically, the script logic of each process node can be parsed based on the process configuration information and the context script information of the preceding process to detect whether there are contradictory logics or branch conditions that cannot be triggered. For example, if the value of form.amount = 0 is fixed in the preceding script, then the condition branch form.amount>5000 to the next node set in the process configuration will never be triggered. In this case, the logical conflict can be identified.
[0055] When identifying data dependencies, the dependencies between different nodes can be identified by parsing the read and write operations of form variables or process variables in the preceding script. For example, if form.applicant is written in the post-script of the application submission node, and the same variable is read in the script of the department manager approval node, then a data dependency is formed.
[0056] After obtaining the logical conflict information and data dependency relationships, the logical conflict information and data dependency relationships can be modeled in the form of a graph. The generated relationship graph uses nodes to represent process nodes and edges to represent logical conflicts or data dependencies, so as to intuitively show the constraint relationships and coupling relationships in the process context.
[0057] In this embodiment, after the relationship graph, process configuration information, form element configuration information, preceding process context script information, and development intent information are input into the trained script generation model, the model can not only perform reasoning based on the complete context, but also consider the logical conflict information and data dependency information carried by the relationship graph, ensuring that the generated target script is more in line with the business process logic and variable dependency rules.
[0058] The following example will be used to explain the above solution.
[0059] Suppose there exists an "employee leave approval process" containing the following four key nodes: node N001, node N002, node N003, and node N004, where: Node N001 (Submit Application): Set the applicant and application time in the post-script: form.applicant=context.getCurrentUser(); form.applyTime = new Date(); Node N002 (Department Manager Approval): Check if the reason for leave is filled in in the pre-processing script: if(!form.reason){ throw newError("Please fill in the reason for your leave"); } In the above process: Based on the data dependency identification, it can be found that the script of node N002 depends on the form variable form.reason, which comes from the "Reason for Leave" field (required) in the form element configuration.
[0060] Suppose there is a conditional branch in the process configuration: If condition:form.amount<=5000, then jump to N003.
[0061] If condition:form.amount>5000, then jump to N004.
[0062] If the logic forces form.amount=0 in the preceding script, then the logic conflict identification will detect that the second branch (>5000) will never be triggered.
[0063] The final generated relationship graph is as follows: Node designations: N001, N002, N003, N004; The meaning of the edge: Data dependency edge: N001→N002 (Because N001 sets the variable applicant, N002 needs to approve the applicant's information) Data dependency edge: Form(reason) → N002 (because the approval script needs to read the reason field) Logical conflict edge: N001 → conditional branch (caused by the fixed value overriding the amount, resulting in a conditional conflict) This relationship graph helps the model avoid generating scripts that contradict the branching logic when the input script is used to generate the model, while ensuring that the referenced variables have been correctly defined in the preceding nodes.
[0064] In this embodiment, before inputting the process configuration information, form element configuration information, preceding process context script information, development intent information, and relationship graph into the trained script generation model, a training process for the script generation model is also included. This training process specifically includes the following steps: (1) Prepare training samples: including relationship graph samples, historical process configuration information samples, historical form element configuration information samples and historical process context script information samples.
[0065] Historical process configuration information sample: This can be obtained by collecting historical process definitions from existing low-code applications, including process ID, process name, node type, conditional branches and flow relationships between nodes, etc.
[0066] Historical form element configuration information samples: These can be obtained by collecting samples of form definitions from historical applications, including field names, field types, validation rules, default values, and variable names.
[0067] Historical process context script information sample: This can be obtained by collecting custom scripts written by developers in historical business processes, including script content, script type, function description, API calls, and variable operation logic.
[0068] Relationship graph sample: can be obtained based on the graph structure generated from the above historical information, used to describe the logical conflicts and data dependencies between historical processes and scripts.
[0069] (2) Structured representation conversion: Convert the above samples into a predefined structured data format (JSON or XML) to maintain the hierarchical relationship and semantic consistency between process configuration, form elements, context scripts and relationship graphs.
[0070] For example, a historical "leave approval process" can be represented as a complete structured sample containing process nodes, approval conditions, form fields (such as leave type, start date, end date) and related script logic.
[0071] (3) Sample labeling and intent correspondence: Match historical samples with the historical development intent described by users in natural language, and establish a mapping relationship between input configuration and target script.
[0072] For example, the intention to "notify the applicant after approval" can be mapped to a script in a historical sample that calls NotificationUtil.sendMessage().
[0073] (4) Model Training: The relationship graph samples, historical process configuration samples, historical form element samples, and historical script samples are used as inputs, and the corresponding target scripts are used as outputs. These are then input into the script generation model to be trained. During the training process, the model learns the mapping relationship between structured configuration information and target scripts, gradually mastering how to generate custom scripts that conform to platform specifications based on process context, development intent, and relationship graphs, while avoiding logical conflicts in custom scripts and ensuring the correctness of data dependencies.
[0074] For example, there is an "employee leave approval process" in the historical data. Its process configuration, form elements (leave type, start / end date, leave reason, etc.), preceding script (checking whether the application reason is filled in) and relationship graph (variable dependency relationship and logical conflict information) have all been collected and structured.
[0075] During the training phase, these samples, along with the target script (such as "update the status to 'approved' after approval and call the message notification interface to notify the applicant"), are input into the model to be trained. Through learning, the model can master: how to retrieve `form.status` from the configuration and modify it to "approved"; how to call the `NotificationUtil.sendMessage()` method and pass the applicant ID; and how to avoid logical conflicts (such as contradictions between amount judgment conditions and fixed assignments). The script generation model trained in this way can automatically generate target scripts that meet business requirements in subsequent practical applications.
[0076] In another optional implementation, when training the script generation model, one can obtain only historical process configuration information samples, historical form element configuration information samples, historical process context script information samples, and historical development intent information samples from the low-code platform. Then, these samples are input into the script generation model to be trained to obtain the trained script generation model. This process differs from the previously described model training process only in the model input (this training process does not consider relation graph samples); all other aspects are consistent with the above model training process and will not be repeated here.
[0077] In this embodiment, considering the different concerns of different users regarding scripts on low-code platforms—for example, some users prioritize script execution efficiency, others emphasize code readability and maintainability, and still others desire strict control over permissions and security within business logic—outputting only a single style of script often fails to meet the actual needs of different scenarios and may even lead to performance bottlenecks or security vulnerabilities. Therefore, in an optional implementation, when inputting process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model to generate the target script, the system can simultaneously receive user selection instructions for custom script code generation strategies and control the script generation model to output target scripts matching the target strategy based on these instructions. This allows for the automatic generation of highly efficient, highly readable, or least-privilege-secure scripts based on different business needs, effectively improving the flexibility and applicability of script generation. This reduces the burden of manual modification while ensuring a balance between performance, maintainability, and security in the generated scripts.
[0078] In one alternative implementation, the quality and security of the generated scripts can be ensured by setting up code optimization and security check mechanisms. Specifically, static analysis can be performed on the generated scripts to check for syntax errors, undefined variables, and potential performance issues; security checks can be performed to detect unsafe API calls, SQL injection risks, or cross-site scripting (XSS) attack risks; best practice verification can be performed to ensure that the generated scripts comply with platform-recommended standards for error handling, logging, and transaction management; furthermore, the generated scripts can be run in a sandbox environment to verify the correctness of functionality and performance; and code style checks can be performed to ensure compliance with unified programming standards. These methods can significantly reduce the risk of script logic errors and security vulnerabilities.
[0079] In another alternative implementation, the generated scripts can be rapidly deployed and verified through a script deployment and testing mechanism. Specifically, the generated scripts can be automatically deployed to the low-code platform's runtime environment, and their effectiveness can be tested after deployment to confirm whether they can run according to the expected logic. This approach can shorten the development-to-deployment cycle and improve the delivery efficiency of the low-code platform in complex business scenarios.
[0080] In another alternative implementation, an interactive development experience can further enhance user development efficiency and ease of use. Specifically, users can express their intentions through natural language descriptions, eliminating the need for manual coding. When user descriptions are vague or incomplete, the system can proactively ask clarifying questions to ensure the generated script meets the user's actual needs. The system can also display the generated script content and explanations in real time, allowing users to preview and confirm during development. Users can also interactively modify the script using natural language commands, such as "change the calculation logic for leave days to only count working days." Furthermore, the system can proactively provide optimization suggestions based on contextual configuration information and best practice rules, such as prompting "It is recommended to add error handling logic." These methods lower the development threshold and improve the development experience.
[0081] In another alternative implementation, a script template library can be used to improve the reusability and standardization of script generation. This library stores script templates for common business scenarios and platform-recommended best practices. Users can directly call templates when generating scripts or make personalized modifications based on them. This approach reduces repetitive development work and makes the generated scripts more consistent with the platform's unified standards.
[0082] The method provided in this application embodiment can automatically collect relevant context information of the target process node in response to the user's custom script generation instruction, including flow configuration information, form element configuration information, and preceding process context script information. Combined with the user's development intent information, the trained script generation model outputs the corresponding target script. In this way, the user does not need to have professional programming skills to quickly and accurately obtain the required custom script. Therefore, it can solve the problem in the prior art that the development of custom scripts mainly relies on manual coding by users, resulting in a high development threshold and high time cost.
[0083] Example 2 The following describes how the methods provided in the embodiments of this application are applied in practice, taking into account real-world scenarios.
[0084] The method provided in Embodiment 1 above can include the following two main stages in practical applications: the initialization stage and the script generation stage.
[0085] During the initialization phase, the API documentation, component information, and utility class encapsulations of the low-code platform can be loaded first to provide necessary knowledge support for subsequent script generation. Secondly, the large language model is trained to understand the custom script syntax and common patterns of the low-code platform. Furthermore, a mapping rule and knowledge base between configuration information and script templates are established to efficiently call existing templates and best practices when generating scripts.
[0086] During the script generation phase, users can select where to add or modify custom scripts, such as pre-processors or post-processors for workflow nodes. The low-code platform then automatically collects complete contextual information, including the overall workflow configuration (all nodes, connections, and conditions), form element configuration (field definitions, validation rules, and default values), custom scripts for preceding nodes (if any), and API and utility class encapsulations provided by the platform. Users describe their development intent in natural language, such as "After approval, update the application status to 'approved' and notify the applicant." The low-code platform parses this natural language description and, combined with the collected contextual information, generates a preliminary version of the custom script.
[0087] After the script is generated, the low-code platform automatically performs optimization and security checks to ensure that the generated script complies with the platform's programming specifications and security standards. The platform then presents the generated script to the user, providing explanations and modification suggestions. Users can accept the script directly or further adjust it manually or through natural language commands. Finally, after user confirmation, the low-code platform deploys the script to its runtime environment and performs validity tests to ensure that the script executes correctly and meets business requirements.
[0088] Through the above methods, the method provided in this embodiment can realize a complete closed-loop application process from requirement expression, script generation, optimization and verification to deployment and testing in a low-code platform, which not only reduces the development threshold for users, but also ensures the quality and security of the generated scripts.
[0089] Example 3 To address the problem in existing technologies where custom script development relies heavily on manual coding by users, resulting in high development barriers and significant time costs, this application provides a script generation device for a low-code platform. A schematic diagram of the device's specific structure is shown below. Figure 2 As shown, it includes an acquisition module 21, a determination module 22, and a processing module 23. The functions of each unit are as follows: The acquisition module 21 is used to obtain process configuration information, form element configuration information and preceding process context script information of the target process node in response to the user-selected target process node's custom script generation instruction. Module 22 is used to determine the user's development intent information; Processing module 23 is used to input process configuration information, form element configuration information, preceding process context script information and development intent information into the trained script generation model to obtain the target script output by the script generation model.
[0090] Optionally, processing module 23 is used for: Input the process configuration information, form element configuration information, preceding process context script information, development intent information, and relationship graph into the trained script generation model; The relationship graph is determined in the following way: Based on the process configuration information and the preceding process context script information, identify logical conflict information and data dependencies in the preceding process context script information; A relationship graph is generated based on the logical conflict information and data dependencies in the context script information of the preceding process.
[0091] Optionally, the device is also used for: The relationship graph samples, historical process configuration information samples, historical form element configuration information samples, and historical process context script information samples are input into the script generation model to be trained to obtain the trained script generation model.
[0092] Optionally, the device is also used for: Obtain samples of historical process configuration information, historical form element configuration information, historical process context script information, and historical development intent information from the low-code platform. The historical process configuration information sample, historical form element configuration information sample, historical process context script information sample, and historical development intent information sample are input into the script generation model to be trained to obtain the trained script generation model.
[0093] Optionally, the preceding process context script information of the target process node includes: the script content, script type, function description, operation variables, and call interface information of the custom scripts of one or more preceding nodes of the target process node.
[0094] Optionally, processing module 23 is used for: The process configuration information, form element configuration information, and preceding process context script information are converted into data in a predefined structured data format; the predefined structured data format includes JSON or XML format. The converted data in the predefined structured data format and the development intent information are input into the trained script generation model.
[0095] Optionally, processing module 23 is used for: Input the process configuration information, form element configuration information, preceding process context script information, and development intent information into the trained script generation model; Receive user instructions on selecting a code generation strategy for custom scripts; Based on the target code generation strategy information and the input information of the script generation model contained in the selection instructions, the script generation model is controlled to output a target script that matches the target code generation strategy information and the input information; The code generation strategies include: high execution efficiency strategy, high readability strategy, and / or least privilege security strategy.
[0096] The device provided in this application embodiment can automatically collect relevant context information of the process node in response to the user's custom script generation instruction for the target process node, including flow configuration information, form element configuration information, and preceding process context script information. Combined with the user's development intent information, the trained script generation model outputs the corresponding target script. In this way, the user does not need to have professional programming skills to quickly and accurately obtain the required custom script. Therefore, it can solve the problem in the prior art that the development of custom scripts mainly relies on manual coding by users, resulting in a high development threshold and high time cost.
[0097] Example 4 Figure 3 To illustrate the hardware structure of an electronic device according to various embodiments of this application, the electronic device may include a processor 301 and a memory 302 storing computer program instructions. Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of this application.
[0098] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to an electronic device. In a particular embodiment, memory 302 may be a non-volatile solid-state memory.
[0099] In one embodiment, memory 302 may be read-only memory (ROM). In one embodiment, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0100] The processor 301 implements any of the low-code platform script generation methods described in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0101] In one example, the electronic device may also include a communication interface 303 and a bus 310. For example, Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0102] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0103] Bus 310 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0104] Furthermore, in conjunction with the script generation method for the low-code platform in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the script generation methods for the low-code platform in the above embodiments.
[0105] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0106] The above description is merely a specific implementation example of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0107] Secondly, those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0108] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0111] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0112] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0113] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0114] It should also be noted that 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 limitation, 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.
[0115] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A script generation method of a low-code platform, characterized by, The method comprises the following steps: In response to a user-selected target process node, a custom script generation instruction is generated, and process configuration information, form element configuration information, and pre-process context script information of the target process node related to the target process node in a low-code platform are obtained; Determine the user's development intention information; The process configuration information, the form element configuration information, the pre-process context script information, and the development intention information are input into the trained script generation model to obtain the target script output by the script generation model.
2. The method of claim 1, wherein, The process configuration information, the form element configuration information, the pre-process context script information, and the development intention information are input into the trained script generation model, comprising: The process configuration information, the form element configuration information, the pre-process context script information, the development intention information, and the relationship graph are input into the trained script generation model; The relationship graph is determined by the following method: According to the process configuration information and the pre-process context script information, the logical conflict information and the data dependency relationship in the pre-process context script information are identified; According to the logical conflict information and the data dependency relationship in the pre-process context script information, a relationship graph is generated.
3. The method of claim 2, wherein, Before the process configuration information, the form element configuration information, the pre-process context script information, the development intention information, and the relationship graph are input into the trained script generation model, the method further comprises: The relationship graph sample, the historical process configuration information sample, the historical form element configuration information sample, and the historical process context script information sample are input into the script generation model to be trained for training to obtain the trained script generation model.
4. The method of claim 1, wherein, Before the process configuration information, the form element configuration information, the pre-process context script information, and the development intention information are input into the trained script generation model, the method further comprises: Obtain historical process configuration information samples, historical form element configuration information samples, historical process context script information samples, and historical development intention information samples of the low-code platform; The historical process configuration information sample, the historical form element configuration information sample, the historical process context script information sample, and the historical development intention information sample are input into the script generation model to be trained for training to obtain the trained script generation model.
5. The method of any one of claims 1 to 4, wherein, The pre-process context script information of the target process node comprises script content, script type, function description, operation variable, and call interface information of the custom script of one or more pre-process nodes of the target process node.
6. The method of claim 1, wherein, The process configuration information, the form element configuration information, the pre-process context script information, and the development intention information are input into the trained script generation model, comprising: convert the flow configuration information, the form element configuration information, and the pre-flow context script information into data in a predefined structured data format; wherein the predefined structured data format comprises a JSON format or an XML format; input the converted data in the predefined structured data format and the development intention information into the trained script generation model.
7. The method of claim 1, wherein, The inputting of the flow configuration information, the form element configuration information, the pre-flow context script information, and the development intention information into the trained script generation model to obtain the target script output by the script generation model comprises: inputting the flow configuration information, the form element configuration information, the pre-flow context script information, and the development intention information into the trained script generation model; receiving a selection instruction of a code generation strategy of the custom script by the user; controlling the script generation model to output a target script matched with target code generation strategy information contained in the selection instruction and input information of the script generation model according to the target code generation strategy information and the input information of the script generation model; wherein the code generation strategy comprises a high execution efficiency strategy, a high readability strategy, and / or a minimum permission security strategy. 8.A script generation apparatus of a low-code platform, characterized by, comprises an obtaining module, a determining module, and a processing module, wherein: The obtaining module is configured to, in response to a custom script generation instruction of a target flow node selected by a user, obtain flow configuration information, form element configuration information, and pre-flow context script information of the target flow node related to the target flow node in a low-code platform. The determining module is configured to determine development intention information of the user. The processing module is configured to input the flow configuration information, the form element configuration information, the pre-flow context script information, and the development intention information into a trained script generation model to obtain a target script output by the script generation model.
9. An electronic device, comprising: comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, which, when executed by the processor, implements the steps of the script generation method of the low-code platform according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executable on the processor to implement the steps of the script generation method of the low-code platform according to any one of claims 1 to 6.
11. A computer program product, characterised in that, The computer program is executable on the processor to implement the script generation method of the low-code platform according to any one of claims 1 to 7.