Code development method and related device
The text mining technology of the code development platform analyzes logical relationships and automatically generates workflow codes, which solves the problem of low-code development tools relying on manual design, improves development efficiency and code accuracy, and meets complex business needs.
Patent Information
- Application Number
- PCT/CN2023/136064
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-30
- Filing Date
- 2023-12-04
- Publication Date
- 2024-10-24
AI Technical Summary
Existing low-code development tools rely heavily on manual design by developers and lack intelligent generation and assistance capabilities, resulting in low development efficiency and difficulty in meeting complex business needs.
Receive function description information input by users through the code development platform, use text mining technology to analyze the logical relationship between calling statements, automatically generate workflow code, support multi-branch complex business logic such as parallelism and conditions, and automatically fill in triggers/operations Interface parameters provide intelligent generation and assistance capabilities.
It reduces dependence on developers, improves development efficiency, can meet complex business needs, and ensures the accuracy and executability of the generated workflow code.
Smart Images

Figure CN2023136064_24102024_PF_FP_ABST
Abstract
Description
A code development method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on April 21, 2023, with application number 202310437587.1, and with the invention name “A method for application management and related systems”, and claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 30, 2023, with application number 202310627212.1, and with the invention name “A code development method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of code development technology, and in particular to a code development method, platform, computing device cluster, computer-readable storage medium, and computer program product. Background Art
[0003] With the rapid development of information technology (IT) and the mobile internet, more and more businesses and organizations are using technology to transform processes and management, such as developing workflows, to achieve more efficient and standardized business development. A workflow is the automation of part or all of a business process in a computer environment. It is an abstract and general description of the workflow and the business rules between its various steps.
[0004] To improve development efficiency, developers can use low-code development tools (including zero-code development tools) to develop workflows. Low-code development aims to allow developers to build applications (such as workflows) with minimal or no coding.
[0005] When developing application functionality using low-code development tools, it's often necessary to combine multiple triggers / actions. Most low-code development tools rely heavily on manual design by developers, lacking intelligent generation and support capabilities. This significantly impacts development efficiency and makes it difficult to meet business needs.
[0006] Summary of the Invention
[0007] This application provides a code development method that provides the ability to intelligently generate workflow code, reducing reliance on manual design by developers, improving development efficiency, and meeting business needs. This application also provides a code development platform, computing device cluster, computer-readable storage medium, and computer program product corresponding to the above method.
[0008] In a first aspect, the present application provides a code development method. The method can be performed by a code development platform. The code development platform is used to develop application code, such as workflow (application) code. The code development platform can be a low-code development platform, also known as a low-code development tool. The low-code development platform is used to build applications by developing a small amount of code, such as building a workflow by developing a small amount of code.
[0009] Specifically, the code development platform receives user-inputted functional description information for a target workflow and, based on the functional description information, obtains functional description text including call statements. These call statements include trigger call statements for initiating the target workflow and operation interface call statements for executing the target workflow. The code development platform then mines and analyzes the functional description text to obtain the logical relationships between the call statements. Based on these logical relationships, the platform generates the target workflow code and renders the target workflow view based on the target workflow code.
[0010] The method processes the function description information input by the user (such as the original function description text or the function description voice) to obtain the function description text including the call statement, and then uses text mining technology to analyze the logical relationship between the call statements, such as the logical relationship between the trigger and the action, or the logical relationship between the action and the action, and automatically generates the code of the target workflow corresponding to the function description information based on the logical relationship, thereby reducing the dependence on developers, saving time and cost for developers' low-code development, and improving development efficiency. Moreover, the code of the workflow generated by this method supports multi-branch complex business logic such as parallelism and conditions, and can also automatically fill in the trigger / action parameters. For example, it mines and analyzes the function description text including the call statement to obtain the trigger / action parameters, and automatically fills in the parameters based on the mining and analysis results, so as to meet business needs.
[0011] In some possible implementations, the code development platform can generate the code of the current round of workflow based on the logical relationship between the calling statements, render the view of the current round of workflow based on the code of the current round of workflow, and the view of the current round of workflow includes a first node, which is a key node identified according to the logical relationship, and then iteratively update the code of the current round of workflow according to the functional description text and the logical relationship to obtain the code of the target workflow, and render the view of the target workflow based on the code of the target workflow, and the view of the target workflow includes the first node and the second node.
[0012] This method uses a diffusion-based approach to generate workflow code, thereby providing intelligent code generation capabilities for workflows and prioritizing code generation for key nodes, which can further improve generation accuracy.
[0013] In some possible implementations, the code development platform may further present a workflow view to the user, and update at least one of the nodes or node connection relationships in the workflow view in response to an update operation by the user.
[0014] In this way, manual intervention in the generation of nodes can be supported, such as updating the generated nodes or connection relationships, and timely error correction can be made during the code generation process to ensure generation accuracy.
[0015] In some possible implementations, the code development platform can generate codes for multiple candidate workflows based on the logical relationship between the calling statements, render views of multiple candidate workflows based on the codes of the multiple candidate workflows, determine the code of the target workflow based on the execution results of the services orchestrated by the views of the multiple candidate workflows in the sandbox, and determine the view of the target workflow.
[0016] This method ensures that the final recommended (finally generated) workflow is executable by executing the code of the candidate workflow in a sandbox.
[0017] In some possible implementations, the code development platform may generate codes for multiple workflows based on the logical relationship between the calling statements, and then determine codes for multiple candidate workflows from the codes for the multiple workflows based on at least one of the complexity of the codes for the multiple workflows or the properties of the operation interfaces.
[0018] This method can reduce subsequent computational overhead by screening out high-quality candidate workflow codes from the generated workflow codes.
[0019] In some possible implementations, the logical relationships include one or more of parameter dependencies, serial execution order, parallel group numbering, conditional branching, and looping. This method supports both simple and complex logical relationships, meeting business needs.
[0020] In some possible implementations, the code development platform may further present the logical relationships between the call statements to the user and receive confirmation or update information of the logical relationships from the user. Accordingly, the code development platform may generate the code for the target workflow based on the confirmed or updated logical relationships.
[0021] This method ensures the accuracy of code generation in subsequent workflows by supporting users to confirm or assist in replacing logical relationships.
[0022] In some possible implementations, the code development platform may also send a request based on the name and input parameters of the trigger or operation interface in the call statement, and upon receiving a response, retain the trigger or operation interface in the function description text.
[0023] This method verifies whether the trigger / action in the function description text is callable by sending a request, ensuring the accuracy of code generation for subsequent workflows.
[0024] In some possible implementations, the code development platform can also present a function description text to the user, and receive confirmation information or update information from the user on the call statements in the function description text. Accordingly, the code development platform can perform mining and analysis on the function description text after the user's confirmation or the function description text after the user's replacement to obtain the logical relationship between the call statements.
[0025] This method ensures the accuracy of code generation in subsequent workflows by manually confirming or assisting in replacing trigger / action in the function description text.
[0026] In a second aspect, the present application provides a code development platform. The code development platform is used to generate workflow code, and the code development platform includes:
[0027] The interactive subsystem is used to receive the functional description information of the target workflow input by the user;
[0028] A generation subsystem is configured to obtain, based on the function description information, a function description text including a call statement, wherein the call statement includes a trigger call statement for starting the target workflow and an operation interface call statement for executing the target workflow;
[0029] The generation subsystem is further configured to mine and analyze the function description text to obtain the logical relationship between the call statements;
[0030] The generation subsystem is further configured to generate the code of the target workflow according to the logical relationship between the call statements, and render the view of the target workflow based on the code of the target workflow.
[0031] In some possible implementations, the generation subsystem is specifically configured to:
[0032] generating a code for the workflow of the current round according to the logical relationship between the call statements, and rendering a view of the workflow of the current round based on the code of the workflow of the current round, wherein the view of the workflow of the current round includes a first node, where the first node is a key node identified according to the logical relationship;
[0033] The code of the current round of workflow is iteratively updated according to the functional description text and the logical relationship to obtain the code of the target workflow, and a view of the target workflow is rendered based on the code of the target workflow, where the view of the target workflow includes the first node and the second node.
[0034] In some possible implementations, the interaction subsystem is further configured to:
[0035] presenting a view of the workflow to the user;
[0036] The generation subsystem is further configured to:
[0037] In response to the user's update operation, at least one of a node or a node connection relationship in the workflow view is updated.
[0038] In some possible implementations, the generation subsystem is specifically configured to:
[0039] generating codes of a plurality of candidate workflows according to the logical relationship between the call statements, and rendering views of the plurality of candidate workflows based on the codes of the plurality of candidate workflows;
[0040] The code development platform also includes:
[0041] The debugging and publishing subsystem is configured to determine the code of the target workflow and the view of the target workflow according to the execution results of the services orchestrated by the views of the multiple candidate workflows in the sandbox.
[0042] In some possible implementations, the generation subsystem is specifically configured to:
[0043] Generate codes for multiple workflows based on the logical relationship between the call statements;
[0044] According to at least one of the complexity of the codes of the multiple workflows or the attributes of the operation interfaces, multiple candidate workflow codes are determined from the codes of the multiple workflows.
[0045] In some possible implementations, the interaction subsystem is further configured to:
[0046] Presenting the logical relationship between the call statements to the user;
[0047] receiving confirmation information or update information of the logical relationship from the user;
[0048] The generation subsystem is specifically used for:
[0049] The code of the target workflow is generated according to the confirmed logical relationship or the updated logical relationship.
[0050] In some possible implementations, the generating subsystem is further configured to:
[0051] Send a request based on the name and input parameters of the trigger or operation interface in the call statement;
[0052] When a response is received, the trigger or the operation interface is retained in the function description text.
[0053] In some possible implementations, the interaction subsystem is further configured to:
[0054] presenting the function description text to the user;
[0055] receiving confirmation information or update information of the user regarding the call statement in the function description text;
[0056] The generation subsystem is specifically used for:
[0057] Mining and analyzing the function description text after the user confirmation or the function description text after the user replacement is performed to obtain the logical relationship between the call statements.
[0058] In a third aspect, the present application provides a computing device cluster. The computing device cluster includes at least one computing device, wherein the at least one computing device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is configured to execute instructions stored in the at least one memory, so that the computing device or computing device cluster performs the code development method described in the first aspect or any implementation of the first aspect.
[0059] In a fourth aspect, the present application provides a computer-readable storage medium storing instructions, wherein the instructions instruct a computing device or a computing device cluster to execute the code development method described in the first aspect or any implementation of the first aspect.
[0060] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when run on a computing device or a computing device cluster, enables the computing device or computing device cluster to execute the code development method described in the first aspect or any one of the implementations of the first aspect.
[0061] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical methods of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments.
[0063] FIG1 is a schematic diagram of the architecture of a code development platform provided in an embodiment of the present application;
[0064] FIG2 is a flow chart of different stages of a code development method provided in an embodiment of the present application;
[0065] FIG3 is a flow chart of a code development method provided in an embodiment of the present application;
[0066] FIG4 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0067] FIG5 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0068] FIG6 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application;
[0069] FIG7 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0070] The terms "first" and "second" in the embodiments of this application are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of the features.
[0071] First, some technical terms involved in the embodiments of this application are introduced.
[0072] A workflow is an abstract and general description of the business rules between a workflow and its various operation steps. In order to facilitate the description of the workflow process, etc., it can be displayed through a graphical view, which is also called a workflow canvas. Specifically, a workflow view (such as a workflow canvas) includes multiple nodes. Furthermore, the workflow view can include node connection relationships. The node connection relationship can be directed. In other words, the workflow view can include a directed graph. The nodes in the workflow view can be divided into triggers and operation interfaces (also referred to as operations, i.e., actions) according to their functions.
[0073] Each workflow includes a trigger, which defines the call that can instantiate and start the workflow. In other words, the trigger indicates the triggering conditions for starting the workflow. Based on this, the trigger can usually be the first node in the graph. Triggers can include different types. For example, triggers can include but are not limited to polling triggers, push triggers, repeating triggers, and request repeaters. Polling triggers periodically check the endpoint of the service. Push triggers create a subscription to the endpoint and provide a callback resource locator (uniform resource locator, URL), such as endpoint-subscribe-URL, so that the endpoint can notify the trigger when a specified event occurs or data is available. Repeating triggers are used to trigger the workflow to run periodically based on a specified recurrence set. Request triggers are used to enable the workflow to be executed by creating an endpoint that can accept incoming requests. A trigger can include at least one of the following elements: trigger name (e.g., trigger-name), trigger behavior input (e.g., trigger-inputs), and trigger frequency (e.g., time-unit).
[0074] Each workflow includes one or more operations (actions). Each action defines a method or function call to execute a step in the workflow. Specifically, it's an application programming interface (API) that performs a specific operation or function. For cloud vendors, an action can be a specific API within a cloud service. A cloud service can be a collection of actions that handle the same type of business, also known as a connector.
[0075] In order to improve the efficiency of workflow development, developers can use low-code development tools to develop workflows. Low-code development tools can generate a workflow canvas based on the function description text entered by the user (such as the developer). Specifically, when the developer develops a workflow in a low-code development tool, he first enters the text of the required function (also called the function description text) in the text box, and then the low-code development tool can automatically generate a workflow framework based on the function description text. On this basis, the developer can manually fill in the trigger / action parameters, process complex logic, debug the workflow, and publish the workflow.
[0076] Low-code development tools rely heavily on manual design by developers and lack intelligent generation and auxiliary capabilities. For example, they cannot handle complex business logic, which greatly affects development efficiency and makes it difficult to meet business needs.
[0077] In view of this, the present application provides a code development method. The method can be performed by a code development platform. In some examples, the code development platform can be a software system, which can be an independent software system or integrated into other software systems. For example, it can be integrated into a development and debugging platform or development and debugging software in the form of plug-ins, functional modules, components, scripts, etc. The development and debugging platform and development and debugging software can be an integrated development environment (IDE) or a developer desktop. The above-mentioned software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the code development method of the present application. In other examples, the code development platform can be a hardware system, and the hardware system can have intelligent generation capabilities, such as a computing device cluster with the function of generating workflow code. When the hardware system is running, the code development method of the present application is executed.
[0078] Specifically, the code development platform receives functional description information of the target workflow input by the user, and obtains functional description text including call statements based on the functional description information, wherein the call statements include trigger call statements for starting the target workflow and operation interface call statements for executing the target workflow. The functional description text is then mined and analyzed to obtain the logical relationship between the call statements. Based on the logical relationship between the call statements, the code of the target workflow is generated, and the view of the target workflow is rendered based on the code of the target workflow.
[0079] The method processes the function description information input by the user (such as the original function description text or the function description voice) to obtain the function description text including the call statement, and then uses text mining technology to analyze the logical relationship between the call statements, such as the logical relationship between the trigger and the action, or the logical relationship between the action and the action, and automatically generates the code of the target workflow corresponding to the function description information based on the logical relationship, thereby reducing the dependence on developers, saving time and cost for developers' low-code development, and improving development efficiency. Moreover, the code of the workflow generated by this method supports multi-branch complex business logic such as parallelism and conditions, and can also automatically fill in the trigger / action parameters. For example, it mines and analyzes the function description text including the call statement to obtain the trigger / action parameters, and automatically fills in the parameters based on the mining and analysis results, so as to meet business needs.
[0080] Furthermore, this approach not only provides intelligent workflow generation but also offers auxiliary capabilities such as handling different authentication methods, automatic debugging, and execution, ensuring that the generated workflows meet business expectations and can be run directly. This can help low-code workflows (applications, services) be released quickly and accurately.
[0081] In order to make the technical solution of the present application clearer and easier to understand, the architecture of the code development platform of the present application is introduced below with reference to the accompanying drawings.
[0082] Referring to the architectural diagram of a code development platform shown in FIG1 , the code development platform 10 includes an interactive subsystem 100 and a generation subsystem 200. The interactive subsystem 100 is used to receive functional description information of a target workflow input by a user. As shown in FIG1 , the functional description information can be text or voice. The generation subsystem 200 is used to obtain a functional description text including a call statement based on the functional description information, wherein the call statement includes a trigger call statement for starting the target workflow and an operation interface call statement for executing the target workflow, and then perform mining and analysis on the functional description text including the call statement to obtain the logical relationship between the call statements, and then generate a target workflow corresponding to the functional description information based on the logical relationship between the call statements.
[0083] Among them, when the function description information input by the user is text, the generation subsystem 200 can replace the keywords in the text with call statements. When the function description information input by the user is voice, the generation subsystem 200 can convert the voice through voice-to-text, and then replace the keywords in the converted text with call statements, thereby obtaining a function description text including a call statement. The call statement in the function description text can be independent, that is, the function description text includes an independent trigger / action call. Among them, the call statement can include at least one of the authentication method, request method and input parameters.
[0084] In some possible implementations, the interactive subsystem 100 can also present a function description text to the user and receive confirmation information or update information from the user on the call statements in the function description text. This can enable user-assisted confirmation or assisted replacement, thereby ensuring the accuracy of the call statements in the function description text and, in turn, ensuring the accuracy of the subsequently generated workflow.
[0085] The generation subsystem 200 uses text mining to analyze the logical relationships between call statements in the replaced (rewritten) function description text, such as the logical relationships between multiple independent trigger / action calls within the text. This mining analysis can reveal complex logical relationships between multiple triggers / actions that meet the user's desired business functions, such as one or more of parameter dependencies, serial execution order, parallel group numbering, conditional branches, and loops.
[0086] Similarly, the interactive subsystem 100 is also used to present the logical relationships between call statements to the user, thereby achieving visual presentation to the user. The interactive subsystem 100 can also receive user confirmation or update information on the logical relationships, thereby enabling user-assisted confirmation or replacement, ensuring the accuracy of the logical relationships and, in turn, the accuracy of the subsequently generated workflow.
[0087] After obtaining the logical relationship (for example, the logical relationship mined by the generation subsystem 200, the logical relationship after user confirmation, or the logical relationship after user update), the generation subsystem 200 can generate the code of the target workflow based on the logical relationship, and render the view of the target workflow based on the code of the target workflow. Among them, the generation subsystem 200 can diffusely generate the code of the target workflow corresponding to the functional description information through a language model. For example, the code of the target workflow can be in JavaScript Object Notation (JSON) format. The generation subsystem 200 can parse the code through the front-end component, for example, parse the JSON code to render the view of the target workflow (workflow canvas). It should be noted that different front-end components can render views of different colors, styles or directions (horizontal or vertical flow) for the same JSON code file. The target workflow can be a low-code workflow that includes complex business logic. In order to improve the accuracy of the generation, the code of key nodes (also called important nodes, hub nodes) can be generated first during the diffuse generation, and then the key nodes are rendered first. Among them, the identification of key nodes can be based on relevant rules or set indicators.
[0088] Specifically, the generation subsystem 200 can first generate the code of the current round of workflow based on the logical relationship between the call statements, and render the view of the current round of workflow based on the code of the current round of workflow. The view of the current round of workflow includes a first node. The first node is a key node identified according to the logical relationship. The generation subsystem 200 also iteratively updates the code of the current round of workflow based on the functional description text and the logical relationship, obtains the code of the target workflow, and renders the view of the target workflow based on the code of the target workflow. It should be noted that the generation subsystem 200 can also set a stop condition for diffusion generation. When the stop condition is met, the generation subsystem 200 stops the iterative update and determines the (most recent or last) updated workflow as the target workflow corresponding to the functional description information. The target workflow includes the above-mentioned first node and second node. Among them, the second node is a new node identified during the iterative update process.
[0089] Similar to the functional description text and logical relationships, the interaction subsystem 100 is also used to present a workflow view to the user. In response to the user's update operation, it updates at least one of the nodes or node connections in the workflow view. This allows the user to intervene promptly when generation errors occur, allowing the generation subsystem 200 to regenerate a new node in the workflow based on the last correctly generated key node.
[0090] In some possible implementations, the generation subsystem 200 can generate the code of multiple workflows based on the logical relationship between the call statements, and can determine multiple candidate workflows corresponding to the functional description information from the multiple workflows based on the complexity of the code of the multiple workflows or at least one of the attributes of the operation interface. Specifically, the generation subsystem 200 can determine the candidate workflow from the multiple workflows based on set indicators, such as complexity, cost (such as operation interface call cost). The candidate workflow can be a high-quality low-code workflow.
[0091] The target workflow can be one or more workflows among the candidate workflows. In some possible implementations, the code development platform 10 may further include a debugging and publishing subsystem 300, which is used to determine the target workflow from multiple candidate workflows. Specifically, the debugging and publishing subsystem 300 is used to determine the code of the target workflow and the view of the target workflow based on the execution results of the services orchestrated by the views of multiple candidate workflows in the sandbox. In this way, it can be ensured that the code of the target workflow can be executed smoothly, so that the optimal generation result can be recommended to the user. It should be noted that if the codes of multiple candidate workflows can all be executed smoothly, a suitable target workflow can also be recommended to the user based on preset indicators, such as performance / execution time and complexity.
[0092] Similar to functional description text and logical relationships, the interactive subsystem 100 is also used to present candidate workflows to the user and receive confirmation or update information about the candidate workflows. The update information can be information about adjusting the priority of the candidate workflow. This allows users to assist in confirming or adjusting the priority of the candidate workflows.
[0093] In the embodiment shown in FIG1 , the code development platform 10 may further include a model management subsystem 400. The model management subsystem 400 is used to construct a rule model or an AI model. The rule model may include at least one of a rule for replacing keywords with call statements, a rule for obtaining logical relationships based on function description texts including call statements, and a rule for generating workflow code based on logical relationships. The AI model may include at least one of a model for replacing keywords with call statements, a model for obtaining logical relationships based on function description texts including call statements, and a model for generating workflow code based on logical relationships. The rule model may be learned from workflow data, function description text data, and function description voice data, and the AI model may be obtained by fine-tuning a pre-trained model using workflow data, function description text data, and function description voice data.
[0094] In some possible implementations, the model management subsystem 400 includes a data collection module, a data annotation module, and a model training module. Among them, the data collection module is used to collect at least one of the function description text data and the function description voice data, and collect workflow data (such as the code of the workflow). The data annotation module is used to perform data annotation. For example, the data annotation module can determine the workflow data corresponding to the function description text data and the function description voice data, and use the workflow data as annotation information to obtain the annotation data. The model training module is used to perform model training based on the annotated data. Taking the training example of the AI model as an example, the model training module can obtain a pre-trained model, input the annotated data into the pre-trained model for fine-tuning, and thus obtain the AI model.
[0095] Among them, the code development platform 10 provides a visual user operation interface (such as the interface of the interactive subsystem 100 presenting functional description text, logical relationships or workflows) and internal tool implementations (such as the generation subsystem 200, the debugging and release subsystem 300, and the model management subsystem 400), among which the internal tool implementations are not perceived by the user.
[0096] The following will further explain the technical solution of this application from the perspectives of internal tool implementation and user interaction.
[0097] Refer to the flow chart of a code development method shown in Figure 2, where the internal implementation of the tool on the left side of Figure 2 corresponds to the training stage of the AI model (for example, a machine learning / deep learning model); the right half is the user interaction part, which corresponds to the reasoning stage of the AI model (for example, a machine learning / deep learning model).
[0098] During the AI model training phase, the code development platform 10 can collect action data, as well as at least one of the function description text or function description voice of the workflow. Furthermore, the code development platform 10 can also perform preprocessing on the action data, such as data cleaning and normalization. For the function description voice of the workflow, the code development platform 10 can perform speech-to-text conversion. For the text converted from the function description text or function description voice, the code development platform 10 can also perform text optimization and enhancement. Among them, text optimization and enhancement can be to generate a large amount of labeled data from a small amount of labeled data while ensuring that the semantics of the labels remain unchanged as much as possible.
[0099] The code development platform 10 can then replace the keywords in the function description text (such as the enhanced text, the original function description text, or the text after the function description is converted into speech) with independent call statements, and the call statements include independently callable triggers / actions. Among them, the code development platform 10 can use a language model (LM) to replace the keywords in the function description text with call statements. Taking into account the situation that some language models, especially generative models, may generate non-existent API calls, the code development platform 10 can also use the collected action data to verify the call statements in the replaced function description text, so as to facilitate the subsequent generation of controllable and executable workflows.
[0100] The code development platform 10 can mine the logical relationship between triggers and actions in the call statements based on the function description text including the call statements. Specifically, the code development platform 10 can mine and analyze the function description text including the call statements using a LM, an attention model, or a graph neural network (GNN) model to obtain the logical relationship between triggers and actions in the call statements.
[0101] The code development platform 10 can then generate workflow code based on the logical relationships. Specifically, the code development platform 10 can utilize a language model (LM) to scalably generate code for multiple workflows including complex business logic. The code development platform 10 can identify candidate workflows from multiple workflows based on at least one workflow quality evaluation metric: attention or quality, thereby determining the code for the candidate workflows. The code development platform 10 can render views of the candidate workflows based on their code. The code development platform 10 is also configured to orchestrate services for the candidate workflow views, execute the orchestrated services in a sandbox, and determine the final workflow code based on the execution results. The code development platform 10 updates model parameters based on reinforcement learning with human feedback. These model parameters include, but are not limited to, parameters of a model (such as a LM) that replaces text with independently callable triggers / actions, parameters of a model that explores logical relationships between triggers / actions (such as parameters of an attention model, a GNN model, or a LM), and parameters of a model (such as a LM) that generates workflows.
[0102] After the training is completed, the code development platform 10 can use the trained AI model for reasoning to realize code generation of the workflow.
[0103] Specifically, the code development platform 10 can receive the original function description information input by the user, and the original function description information can be the function description text or function description voice of the target workflow. When the function description information is a function description voice, the code development platform 10 can first convert the voice into text, and then the code development platform 10 can perform text optimization and enhancement. Then the code development platform 10 can use a trained AI model, such as an LM for replacing keywords to obtain call statements, to replace the text and obtain a function description text including a call statement. The code development platform 10 then uses a trained AI model, such as an attention model, a GNN model or an LM for mining the logical relationship between trigger / action, to mine the logical relationship. Furthermore, the code development platform 10 diffusely generates code for workflows including complex business logic based on trained AI models, such as LM for generating workflows. The code development platform 10 can determine the code of the candidate workflow from the codes of multiple generated workflows, and can render the view of the candidate workflow based on the code of the candidate workflow. By performing service orchestration on the view of the candidate workflow, and then executing the orchestrated service in the sandbox, the code of the final workflow, that is, the code of the target workflow, is determined based on the execution result. In addition, the code development platform 10 can also determine the view of the target workflow. Furthermore, the user can also evaluate the code of the target workflow, such as evaluating the code quality. The code development platform 10 can also receive evaluation information of the target workflow code from user feedback. For example, the model management subsystem 400 in the code development platform 10 can obtain labeled data based on the evaluation information, and the labeled data can be used for model training.
[0104] In order to make the technical solution of this application clearer and easier to understand, the code development method of this application is introduced below with reference to the accompanying drawings.
[0105] Referring to FIG3 , a flow chart of a code development method is shown, which includes:
[0106] Step 1. The code development platform 10 receives the original function description text input by the user.
[0107] Step 2. The code development platform 10 replaces the keywords in the original function description text with the function description text including the call statement.
[0108] The keyword can be a business function description. The call statement includes a trigger call statement for starting the target workflow and an operation interface call statement for executing the target workflow. The keywords in the original function description text are replaced with the function description text including the call statement. Specifically, the business function description in the text is replaced with an independent trigger / action call.
[0109] The call syntax includes the trigger / action name, authentication method, request method (e.g., Hypertext Transfer Protocol (HTTP) request method), and at least one of the following: request headers and request input parameters. During implementation, you can first define the syntax that replaces the business function description with the trigger / action call syntax.
[0110] The trigger calling rules can be defined as <trigger>trigger(header,method,params) < / trigger> ; The calling rules of the connector (for example, the operation interface action) can be defined as <action> provider_action(auth,method,params)< / action> <> is used to identify the type of trigger and action. The content before the parentheses is the name of the trigger and action. The content in the parentheses includes the authentication method (recorded as auth), HTTP request method (recorded as method), request header (recorded as header) / request input parameters (recorded as params), etc.
[0111] The essence of Step 2 is to convert a text that follows a certain grammar into / generate another text that follows another grammar, which can be implemented based on at least one of manually set rules and AI models (for example, deep learning models such as language models). This embodiment is illustrated by an example of a language model. In order to ensure the accuracy of conversion / generation and reduce the cost of manual annotation during the model training phase, a self-supervised approach can be used.
[0112] The steps for self-supervised conversion / generation of data based on a language model are as follows:
[0113] 1. Generate multiple candidate call statements: Based on the instruction learning method, the original description text is input into a pre-trained language model. The language model is used to generate data after replacing the connector call identifier. Initially, the connector call and related input parameter data with a probability greater than a certain threshold and grammatical conformance at the time of generation are retained.
[0114] 2. Preserve high-quality generation results: Based on predefined judgment rules, such as at least one of the increase in generation probability and loss reduction before and after replacement, the function description text that meets the relevant rules is retained. This function description text is the text that replaces the business function description using trigger / action calls.
[0115] In order to ensure that the generated trigger / action can be debugged, the code development platform 10 supports the use of manual methods to allow users to assist in confirmation or auxiliary modification (assisted replacement). For example, the code development platform 10 presents the replaced function description text to the user, and receives the user's confirmation information or update information on the call statement in the function description text. In some embodiments, the code development platform 10 can also use an automated method to send requests by name and input parameters and ultimately retain the trigger / action that can successfully obtain a response result. Specifically, the code development platform 10 can send a request based on the name and input parameters of the trigger or operation interface in the call statement, and when a response is received, retain the trigger or operation interface in the function description text.
[0116] It should be noted that FIG3 illustrates an example of a user inputting an original function description text. In other possible implementations of the embodiment of the present application, the user may also input an original function description voice, and the code development platform 10 may perform speech-to-text conversion on the original function description voice. The code development platform 10 may then replace the keywords in the converted text with call statements, thereby obtaining a function description text including a call statement. The above-mentioned Steps 1 and 2 are a specific implementation of the code development platform 10 receiving the function description information of the target workflow input by the user and obtaining a function description text including a call statement based on the function description information, and do not constitute a limitation on the technical solution of the present application.
[0117] Step 3. The code development platform 10 mines and analyzes the function description text including the call statements to obtain the logical relationship between the call statements.
[0118] The logical relationship between call statements includes the logical relationship between a trigger call statement and an operation interface call statement. Furthermore, the logical relationship between call statements may also include the logical relationship between a first operation interface call statement and a second operation interface call statement. In other words, the logical relationship between call statements may include the logical relationship between a trigger and an action. Furthermore, the logical relationship between call statements may also include the logical relationship between actions.
[0119] In order to explore the complex logical relationship between triggers / actions that meet the business functions required by users, the code development platform 10 can use machine learning or deep learning methods such as language models, attention models, GNN models, etc. to explore and analyze the function description text including call statements.
[0120] In some possible implementations, for a group of triggers, actions (for example, a trigger and an action) or a group of actions (for example, two actions), the code development platform 10 may include multiple logical relationships mined through different models (different algorithms). The code development platform 10 can also determine the final logical relationship based on the certainty probability (also called the confidence probability), or the code development platform 10 can determine the final logical relationship by voting on the logical relationships output by multiple models.
[0121] Furthermore, the code development platform 10 can also normalize the logical relationships. The normalized logical relationships can include one or more of parameter dependency, serial execution order, parallel group numbering, conditional branching, and looping.
[0122] To ensure the accuracy of the discovered logical relationships between triggers and actions, users can assist in confirmation or make modifications. Specifically, the code development platform 10 can present the user with the logical relationships between call statements, specifically the logical relationships between triggers and actions within a call statement. The code development platform 10 can present associated triggers and actions, or associated actions and actions, along with the corresponding relationship types.
[0123] In the example of FIG3 , the code development platform 10 may present the following logical relationship:
[0124] Trigger1→Action2:relation1
[0125] Trigger1→Action3:relation1
[0126] Action3→Action4:relation2
[0127] Trigger1→Action5:relation3
[0128] Action2→Action5:relation4
[0129] Action4→Action5:relation4
[0130] Relation1, relation2, relation3, and relation4 can represent parameter dependencies, serial execution order, parallel group numbers, conditional branches, and loops. It should be noted that some logical relationships can be directed. For example, Action3 → Action4: relation2 can indicate that Action3 and Action4 are executed serially, with Action3 executing before Action4.
[0131] The code development platform 10 can receive confirmation information or update information of a logical relationship from a user. The update information can include at least one of update information on the relationship type or update information on the endpoint of the logical relationship (e.g., trigger or action). For example, a user can modify Action4 in Action4→Action5:relation4 to Action3, and accordingly, the code development platform 10 can receive update information on the endpoint of the logical relationship. For another example, a user can modify relation4 in Action4→Action5:relation4 to relation2, and accordingly, the code development platform 10 can receive update information on the relationship type.
[0132] It should be noted that when the code development platform 10 presents the function description text including the call statement to the user for auxiliary confirmation or replacement, the code development platform 10 can mine and analyze the function description text after the user's confirmation or the updated function description text when mining the logical relationship to obtain the logical relationship between the call statements.
[0133] Step 4. The code development platform 10 generates the code of the current round of workflow according to the logical relationship between the logical call statements, renders the view of the current round of workflow based on the code of the current round of workflow, iteratively updates the code of the current round of workflow according to the functional description text and the logical relationship, obtains the code of the updated workflow, and renders the view of the updated workflow based on the code of the updated workflow.
[0134] The view of the current round of the workflow includes a first node. The view of the updated workflow includes the first node and a second node. The second node is different from the first node. In some examples, the first node may include a trigger node and a portion of an action node, and the second node may include a portion of an action node.
[0135] When using a diffusion generation method to generate the code for the target workflow, the code development platform 10 can also first identify the key nodes and generate the code for the key nodes, thereby improving the accuracy of the generation. Specifically, the first node can be a key node identified based on the logical relationship. The code development platform 10 can identify the key nodes based on at least one of the number of nodes appearing in the logical relationship, the number of nodes appearing in the branches, the confidence probability of the association relationship, and the attention of the association relationship. For example, the code development platform 10 can determine the number of action nodes that appear in the logical relationship, and determine the action node with the largest number or the top n (n greater than 1) action nodes as the first node. In this example, the first node can also include a trigger node.
[0136] In each round of diffusion, the code development platform 10 can use the context information in the previous steps, such as the function description text after trigger / action replacement, logical relationships, and the code of the workflow generated in the previous round (also called the previous round, the previous round), to generate the code for the next round of workflow (iterative update of the workflow code). Among them, the code development platform 10 can use a language model or other machine learning / deep learning algorithms to generate the code for the workflow. The stopping condition for the code development platform 10 to diffusely generate the code for a workflow can be that the diffusion rounds (iterative rounds) reach a set number of diffusion rounds, or a set end mark is generated.
[0137] It should be noted that when the code development platform 10 presents the logical relationship to the user for auxiliary confirmation or auxiliary replacement, the code development platform 10 can generate the code of the workflow corresponding to the functional description information based on the confirmed logical relationship or the updated logical relationship.
[0138] Furthermore, if errors occur during workflow generation, the code development platform 10 can allow users to intervene promptly. The code development platform 10 can then regenerate new nodes based on the last correctly generated node, thereby iteratively updating the workflow. Specifically, the code development platform 10 can present the current workflow to the user and, in response to the user's update operation, update at least one of the nodes or node connections in the current workflow.
[0139] Step 4 described above is a specific implementation of the code development platform 10 generating the code for the workflow corresponding to the functional description information based on the logical relationship, and rendering the workflow view based on the workflow code. In other possible implementations of the embodiment of the present application, the workflow may also be generated by other methods. For example, the code development platform 10 may generate the code for the workflow corresponding to the functional description information based on the logical relationship and the learned rules.
[0140] Step 5. The code development platform 10 repeats Step 4 to generate multiple workflow codes corresponding to the functional description information, and renders multiple workflow views based on the multiple workflow codes.
[0141] Specifically, the code development platform 10 can generate code for multiple workflows corresponding to the functional description information using the diffuse generation method in Step 4, and then use the front-end component to parse the code for each workflow to render a view for each workflow. For example, the code development platform 10 can repeat Step 4 multiple times to generate code for ten or more alternative workflows, and then render the views for the alternative workflows based on the code for the alternative workflows.
[0142] Furthermore, the code development platform 10 can also evaluate and screen the quality of the generated workflow code based on set indicators. For example, the code development platform 10 determines the codes of multiple candidate workflows corresponding to the functional description information from the codes of multiple workflows based on at least one of the complexity of the codes of multiple workflows or the attributes of the operation interface. Among them, the complexity of the code is usually positively correlated with the complexity of the directed graph in the view. Based on this, the complexity can be determined based on at least one of the number of branches or the average number of nodes in the branches. The larger the number of branches and the larger the average number of nodes in the branches, the greater the complexity. The attributes of the operation interface may include at least one of the action call fee, the action release date, and the action provider. For example, the code development platform 10 can determine, based on the action provider, a workflow whose action is provided by a specified provider, such as a specified manufacturer, as a candidate workflow from multiple workflows.
[0143] Furthermore, the user can assist in confirming or adjusting the priority of the candidate workflows. The code development platform 10 presents the candidate workflows to the user and receives confirmation information or update information of the candidate workflows from the user.
[0144] Step 6. The code development platform 10 performs service orchestration based on the view of the candidate workflow, executes the orchestrated service in the sandbox, and determines the code of the target workflow and the view of the target workflow based on the execution result.
[0145] The code development platform 10 can automatically populate candidate workflow code with parameters, then orchestrate services based on the populated workflow view. The orchestrated services are executed in a sandbox, and the target workflow code is filtered based on the sandbox execution results. Automatic parameter filling can be achieved through text mining. Specifically, the code development platform 10 can mine trigger and action-related parameters from the function description text and then automatically fill in parameters based on the mining results.
[0146] In some possible implementations, the code development platform 10 can also perform parameter verification. Parameter verification can be divided into tool verification and manual verification. Tool verification can be divided into static verification and dynamic verification. Static verification mainly verifies parameter types and parameter ranges through tools; dynamic verification mainly discovers runtime problems by executing workflows (for example, executing in a sandbox). Manual verification is achieved through manual assisted confirmation.
[0147] In this embodiment, the code development platform 10 can determine the code of the candidate workflow corresponding to the service that executes smoothly in the sandbox as the code of the target workflow, so as to screen out the code of high-quality workflows that can execute smoothly. When there are multiple candidate workflows corresponding to services that can execute smoothly, the code development platform 10 can also determine the code of the target workflow from the code of the candidate workflows corresponding to the multiple successfully executed services based on preset indicators. The preset indicators may include at least one of performance (e.g., execution time) and complexity.
[0148] It should be noted that the above-mentioned Step 5 and Step 6 are optional steps of the embodiment of the present application, and the code development method of the present application may not execute Step 5 and Step 6. For example, the code development platform 10 can generate the code of the current round of workflow based on the logical relationship between the calling statements, render the view of the current round of workflow based on the code of the current round of workflow (for example, including the first node), and then iteratively update the code of the current round of workflow based on the functional description text and the logical relationship to obtain the code of the target workflow, and render the view of the target workflow based on the code of the target workflow. For example, when the code of the iteratively updated workflow meets the stop condition, the code development platform 10 can determine the code of the updated workflow as the code of the target workflow, and render the view of the target workflow based on the code of the target workflow (for example, including the first node and the second node).
[0149] Based on the above description, the code development method of the embodiment of the present application can controllably and stably generate executable workflow code based on the function description text / voice input by the user. It can also build complex business logic, fill in trigger / action parameters, handle different authentication methods, and automatically debug and execute workflow code. This saves developers time and costs for low-code development, improves development efficiency, and ensures that low-code development parameters are accurate and complete, helping to quickly and accurately release low-code developed services.
[0150] The present application also provides a code development platform 10, as shown in FIG1 , which is used to generate workflow code. The code development platform 10 includes:
[0151] The interactive subsystem 100 is configured to receive functional description information of a target workflow input by a user;
[0152] A generation subsystem 200 is configured to obtain, based on the function description information, a function description text including a call statement, wherein the call statement includes a trigger call statement for starting the target workflow and an operation interface call statement for executing the target workflow;
[0153] The generation subsystem 200 is further configured to perform mining analysis on the function description text to obtain the logical relationship between the call statements;
[0154] The generation subsystem 200 is further configured to generate the code of the target workflow according to the logical relationship between the call statements, and render the view of the target workflow based on the code of the target workflow.
[0155] For example, the interaction subsystem 100 and the generation subsystem 200 can be implemented by hardware or software. The generation subsystem 200 is used as an example for description below.
[0156] When implemented via software, the generation subsystem 200 can be an application running on a computer device, such as a computing engine. Furthermore, the application can be virtualized via virtualization services. Virtualization services can include virtual machine (VM) services, bare metal server (BMS) services, and container services. VM services can be services that use virtualization technology to create a virtual machine (VM) resource pool on multiple physical hosts to provide users with VMs on demand. BMS services are services that create a virtual BMS resource pool on multiple physical hosts to provide users with BMSs on demand. Container services are services that create a virtual container resource pool on multiple physical hosts to provide users with containers on demand. A VM is a simulated virtual computer, or logically a single computer. BMS is a scalable, high-performance computing service with computing performance comparable to that of a traditional physical machine and secure physical isolation. Containers are a kernel virtualization technology that provides lightweight virtualization to isolate user space, processes, and resources. It should be understood that the VM service, BMS service and container service in the above-mentioned virtualization services are only specific examples. In actual applications, virtualization services can also be other lightweight or heavyweight virtualization services, which are not specifically limited here.
[0157] When implemented through hardware, the generation subsystem 200 may include at least one computing device, such as a server. Alternatively, the generation subsystem 200 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0158] In some possible implementations, the generation subsystem 200 is specifically configured to:
[0159] generating a code for the workflow of the current round according to the logical relationship between the call statements, and rendering a view of the workflow of the current round based on the code of the workflow of the current round, wherein the view of the workflow of the current round includes a first node, where the first node is a key node identified according to the logical relationship;
[0160] The code of the current round of workflow is iteratively updated according to the functional description text and the logical relationship to obtain the code of the target workflow, and a view of the target workflow is rendered based on the code of the target workflow, where the view of the target workflow includes the first node and the second node.
[0161] In some possible implementations, the interaction subsystem 100 is further configured to:
[0162] presenting a view of the workflow to the user;
[0163] The generation subsystem is further configured to:
[0164] In response to the user's update operation, at least one of a node or a node connection relationship in the workflow view is updated.
[0165] In some possible implementations, the generation subsystem 200 is specifically configured to:
[0166] generating codes of a plurality of candidate workflows according to the logical relationship between the call statements, and rendering views of the plurality of candidate workflows based on the codes of the plurality of candidate workflows;
[0167] The code development platform 10 further includes:
[0168] The debugging and publishing subsystem 300 is configured to determine the code of the target workflow and the view of the target workflow according to the execution results of the services orchestrated by the views of the multiple candidate workflows in the sandbox.
[0169] In some possible implementations, the generation subsystem 200 is specifically configured to:
[0170] Generate codes for multiple workflows based on the logical relationship between the call statements;
[0171] According to at least one of the complexity of the codes of the multiple workflows or the attributes of the operation interfaces, multiple candidate workflow codes are determined from the codes of the multiple workflows.
[0172] In some possible implementations, the interaction subsystem 100 is further configured to:
[0173] Presenting the logical relationship between the call statements to the user;
[0174] receiving confirmation information or update information of the logical relationship from the user;
[0175] The generation subsystem 200 is specifically used for:
[0176] The code of the target workflow is generated according to the confirmed logical relationship or the updated logical relationship.
[0177] In some possible implementations, the generating subsystem is further configured to:
[0178] Send a request based on the name and input parameters of the trigger or operation interface in the call statement;
[0179] When a response is received, the trigger or the operation interface is retained in the function description text.
[0180] In some possible implementations, the interaction subsystem 100 is further configured to:
[0181] presenting the function description text to the user;
[0182] receiving confirmation information or update information of the user regarding the call statement in the function description text;
[0183] The generation subsystem 200 is specifically used for:
[0184] Mining and analyzing the function description text after the user confirmation or the function description text after the user replacement is performed to obtain the logical relationship between the call statements.
[0185] In some possible implementations, the code development platform 10 further includes a model management subsystem 400. The model management subsystem 400 is used to construct a rule model or an AI model. The rule model may include at least one of a rule for replacing keywords with call statements, a rule for obtaining logical relationships based on function description text including call statements, and a rule for generating workflow code based on logical relationships. The AI model may include at least one of a model for replacing keywords with call statements, a model for obtaining logical relationships based on function description text including call statements, and a model for generating workflow code based on logical relationships.
[0186] This application also provides a computing device 500. As shown in Figure 4, computing device 500 includes a bus 502, a processor 504, a memory 506, and a communication interface 508. Processor 504, memory 506, and communication interface 508 communicate with each other via bus 502. Computing device 500 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 500.
[0187] Bus 502 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG4 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 502 may include a path for transmitting information between various components of computing device 500 (e.g., memory 506, processor 504, and communication interface 508).
[0188] The processor 504 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0189] The memory 506 may include a volatile memory, such as a random access memory (RAM). The memory 506 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD). The memory 506 stores executable program code, and the processor 504 executes the executable program code to implement the aforementioned code development method. Specifically, the memory 506 stores instructions for the code development platform 10 to execute the code development method.
[0190] The communication interface 508 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 500 and other devices or a communication network.
[0191] Embodiments of the present application also provide a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0192] As shown in Figure 5, the computing device cluster includes at least one computing device 500. The memory 506 of one or more computing devices 500 in the computing device cluster may store the same code development platform 10 for executing instructions of the code development method.
[0193] In some possible implementations, one or more computing devices 500 in the computing device cluster may also be used to execute some of the instructions for executing the code development method on the code development platform 10. In other words, a combination of one or more computing devices 500 may collectively execute the instructions for executing the code development method on the code development platform 10.
[0194] It should be noted that the memories 506 in different computing devices 500 in the computing device cluster may store different instructions for executing partial functions of the code development platform 10 .
[0195] FIG6 illustrates a possible implementation. As shown in FIG6 , two computing devices 500A and 500B are connected via a communication interface 508. The memory in computing device 500A stores instructions for executing the functions of the interaction subsystem 100. The memory in computing device 500B stores instructions for executing the functions of the generation subsystem 200. Optionally, the memory in computing device 500A may also store instructions for executing the functions of the model management subsystem 400, and the memory in computing device 500B may also store instructions for executing the functions of the debugging and release subsystem 300. In other words, the memories 506 of computing devices 500A and 500B jointly store instructions for the code development platform 10 to execute the code development method.
[0196] The connection method between the computing device clusters shown in Figure 6 can be considered to consider that the code development method provided by this application requires a lot of computing power for code development, especially a lot of computing power for diffusion generation. Therefore, it is considered to hand over the functions implemented by the generation subsystem 200 to the computing device 500B.
[0197] It should be understood that the functionality of the computing device 500A shown in FIG6 may also be implemented by multiple computing devices 500. Similarly, the functionality of the computing device 500B may also be implemented by multiple computing devices 500.
[0198] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network or a local area network, etc. FIG. 7 shows a possible implementation. As shown in FIG. 7 , two computing devices 500C and 500D are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 506 in the computing device 500C stores instructions for executing the functions of the interaction subsystem 100. At the same time, the memory 506 in the computing device 500D stores instructions for executing the functions of the generation subsystem 200. Optionally, the memory in the computing device 500A may also store instructions for executing the functions of the model management subsystem 400, and the memory in the computing device 500B may also store instructions for executing the functions of the debugging and release subsystem 300.
[0199] The connection method between the computing device clusters shown in Figure 7 can be that considering that the code development method provided by this application requires a large amount of computing power for diffusion generation, it is considered to entrust the functions implemented by the generation subsystem 200 to the computing device 500D for execution.
[0200] It should be understood that the functionality of the computing device 500C shown in FIG7 may also be accomplished by multiple computing devices 500. Similarly, the functionality of the computing device 500D may also be accomplished by multiple computing devices 500.
[0201] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the above-mentioned code development platform 10 for executing the code development method.
[0202] The present application also provides a computer program product comprising instructions. The computer program product may be software or a program product comprising instructions that can be run on a computing device or stored on any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the aforementioned code development method.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A code development method, It is characterized in that Applied to a code development platform, the code development platform is used to generate workflow code, the method includes: Receive functional description information of the target workflow input by the user; According to the function description information, a function description text including a call statement is obtained, wherein the call statement includes a trigger call statement for starting the target workflow and an operation interface call statement for executing the target workflow; Mining and analyzing the function description text to obtain the logical relationship between the call statements; The code of the target workflow is generated according to the logical relationship between the calling statements, and the view of the target workflow is rendered based on the code of the target workflow.
2. The method according to claim 1, It is characterized in that The step of generating the code of the target workflow according to the logical relationship between the calling statements, and rendering the view of the target workflow based on the code of the target workflow includes: Generate a code of the workflow of the current round according to the logical relationship between the call statements, and render a view of the workflow of the current round based on the code of the workflow of the current round, wherein the view of the workflow of the current round includes a first node, and the first node is a key node identified according to the logical relationship; The code of the workflow of the current round is iteratively updated according to the function description text and the logical relationship to obtain the code of the target workflow, and a view of the target workflow is rendered based on the code of the target workflow, wherein the view of the target workflow includes the first node and the second node.
3. The method according to claim 2, It is characterized in that The method further comprises: presenting a view of the workflow to the user; In response to the user's update operation, at least one of the nodes or the node connection relationship in the view of the workflow is updated.
4. The method according to any one of claims 1 to 3, It is characterized in that The step of generating the code of the target workflow according to the logical relationship between the calling statements, and rendering the view of the target workflow based on the code of the target workflow includes: Generate codes of multiple candidate workflows according to the logical relationship between the calling statements, and render views of the multiple candidate workflows based on the codes of the multiple candidate workflows; According to the execution results of the services orchestrated by the views of the multiple candidate workflows in the sandbox, the code of the target workflow is determined, and the view of the target workflow is determined.
5. The method according to claim 4, It is characterized in that The step of generating codes of multiple candidate workflows according to the logical relationship between the calling statements includes: Generate codes of multiple workflows according to the logical relationship between the calling statements; According to at least one of the complexity of the codes of the multiple workflows or the attributes of the operation interfaces, codes of multiple candidate workflows are determined from the codes of the multiple workflows.
6. The method according to any one of claims 1 to 5, It is characterized in that The method further comprises: Presenting the logical relationship between the calling statements to the user; receiving confirmation information or update information of the logical relationship from the user; The step of generating the target workflow code according to the logical relationship between the calling statements includes: The code of the target workflow is generated according to the confirmed logical relationship or the updated logical relationship.
7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: Send a request according to the name and input parameters of the trigger or operation interface in the call statement; When a response is received, the trigger or the operation interface is retained in the functional description text.
8. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: presenting the function description text to the user; Receiving confirmation information or update information of the user regarding the call statement in the function description text; The mining and analyzing of the function description text to obtain the logical relationship between the call statements includes: Mining and analyzing the function description text after confirmation by the user or the function description text after replacement by the user is performed to obtain the logical relationship between the calling statements.
9. A code development platform, It is characterized in that The code development platform is used to generate workflow code, and the code development platform includes: An interactive subsystem, used to receive functional description information of a target workflow input by a user; A generating subsystem, configured to obtain, according to the function description information, a function description text including a calling statement, wherein the calling statement includes a trigger calling statement for starting the target workflow and an operation interface calling statement for executing the target workflow; The generation subsystem is further used to mine and analyze the function description text to obtain the logical relationship between the call statements; The generation subsystem is further configured to generate the code of the target workflow according to the logical relationship between the call statements, and render the view of the target workflow based on the code of the target workflow.
10. The code development platform according to claim 9, It is characterized in that The generation subsystem is specifically used for: Generate a code of the workflow of the current round according to the logical relationship between the call statements, and render a view of the workflow of the current round based on the code of the workflow of the current round, wherein the view of the workflow of the current round includes a first node, and the first node is a key node identified according to the logical relationship; The code of the workflow of the current round is iteratively updated according to the function description text and the logical relationship to obtain the code of the target workflow, and a view of the target workflow is rendered based on the code of the target workflow, wherein the view of the target workflow includes the first node and the second node.
11. The code development platform according to claim 10, It is characterized in that The interaction subsystem is also used for: presenting a view of the workflow to the user; The generation subsystem is also used to: In response to the user's update operation, at least one of the nodes or the node connection relationship in the view of the workflow is updated.
12. The code development platform according to any one of claims 9 to 11, It is characterized in that The generation subsystem is specifically used for: Generate codes of multiple candidate workflows according to the logical relationship between the calling statements, and render views of the multiple candidate workflows based on the codes of the multiple candidate workflows; The code development platform also includes: The debugging and publishing subsystem is used to determine the code of the target workflow and the view of the target workflow according to the execution results of the services orchestrated by the views of the multiple candidate workflows in the sandbox.
13. The code development platform according to claim 12, It is characterized in that The generation subsystem is specifically used for: Generate codes of multiple workflows according to the logical relationship between the calling statements; According to at least one of the complexity of the codes of the multiple workflows or the attributes of the operation interfaces, codes of multiple candidate workflows are determined from the codes of the multiple workflows.
14. The code development platform according to any one of claims 9 to 13, It is characterized in that The interaction subsystem is also used for: Presenting the logical relationship between the calling statements to the user; receiving confirmation information or update information of the logical relationship from the user; The generation subsystem is specifically used for: The code of the target workflow is generated according to the confirmed logical relationship or the updated logical relationship.
15. The code development platform according to any one of claims 9 to 14, It is characterized in that The generation subsystem is also used to: Send a request according to the name and input parameters of the trigger or operation interface in the call statement; When a response is received, the trigger or the operation interface is retained in the functional description text.
16. The code development platform according to any one of claims 9 to 15, It is characterized in that The interaction subsystem is also used for: presenting the function description text to the user; Receiving confirmation information or update information of the user regarding the call statement in the function description text; The generation subsystem is specifically used for: Mining and analyzing the function description text after confirmation by the user or the function description text after replacement by the user is performed to obtain the logical relationship between the calling statements.
17. A computing device cluster, It is characterized in that The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory, wherein the at least one memory stores computer-readable instructions; the at least one processor executes the computer-readable instructions so that the computing device cluster executes the method as described in any one of claims 1 to 8.
18. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Code development method and related equipment
CN118860350A
Low-code application development system and method, storage medium and electronic equipment
CN114185545A
Application service generation system and service process configuration method
CN114625344A
Information processing method and system based on low-coding platform
CN114995879A
Methods, systems, and media for generating an updated workflow for an operation executable by a computing device
US20220129283A1
