A task flow repairing method, device, equipment, medium and product applied to a low-code platform
By using language models in the process engine to automatically repair errors in the task flow, the problems of insufficient correctness and stability of the task flow are solved, and the repair efficiency and reliability of the process are improved.
Patent Information
- Application Number
- CN202510581835.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-05-07
AI Technical Summary
The existing technology lacks the correctness and stability of the task flow, resulting in low repair efficiency and an inability to efficiently and automatically repair errors in the task flow.
The task flow is presented on the process configuration page, and the process nodes with execution errors are found through test operations. By using the natural language processing capabilities of the language model, the node parameters or execution logic are modified to generate an error-free task flow.
It enables automatic repair of errors in the task flow, improves the correctness and stability of the task flow, and ensures the normal execution of business tasks.
Smart Images

Figure CN120086054B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a task flow repair method, apparatus, electronic device, computer-readable storage medium, and computer program product applied to a low-code platform. Background Technology
[0002] With the continuous development of computer technology, workflow engines have emerged. A workflow engine typically refers to a system used to define, execute, and manage task processes (also known as workflows). For example, a workflow engine can be deployed in a low-code platform, providing task-related services as a functional module within the platform. Users can orchestrate workflow nodes and their execution order within the workflow engine. In this way, the workflow engine can process workflow nodes sequentially according to their execution order, thus advancing the task process.
[0003] However, task processes often suffer from deficiencies in correctness and stability, making efficient repair of task processes an urgent problem to be solved. Summary of the Invention
[0004] This application provides a task flow repair method. This method reduces the workload of manual operation by the user and automatically repairs errors in the task flow. This application also provides apparatus, electronic devices, computer-readable storage media, and computer program products corresponding to the above method.
[0005] Firstly, this application provides a task flow repair method applied to a flow engine, the method comprising:
[0006] The first task flow is displayed on the process configuration page;
[0007] In response to a test operation on the first task flow, the test results of the first task flow are presented; wherein the test results are used to characterize whether each process node in the first task flow generates an execution error, and the reason for the error of the process node that generates the execution error.
[0008] In response to the test result indicating that the first process node in the first task flow has an execution error, the first process node in the first task flow is repaired to generate a second task flow. The second task flow includes the second process node obtained by repairing the first process node. The second process node does not generate an execution error. The second process node is different from the first process node in at least one of the following: node parameters or execution logic.
[0009] The second task flow is generated through the following steps:
[0010] Generate a first prompt word; wherein the first prompt word includes: the first task flow described in a domain-specific language, the test results of the first task flow, and prompt information for indicating that the first task flow should be repaired;
[0011] Send the first prompt word to the first language model, and receive the second task flow described in a domain-specific language returned by the first language model;
[0012] The second task flow is generated based on the second task flow described in a domain-specific language.
[0013] Secondly, this application provides a task flow repair device, which includes:
[0014] The first presentation module is used to present the first task process in the process configuration page;
[0015] The second presentation module is used to present the test results of the first task flow in response to the test operation for the first task flow; wherein the test results are used to characterize whether each process node in the first task flow generates an execution error, and the reason for the error of the process node that generates the execution error.
[0016] A generation module is used to respond to the test result indicating that an execution error has occurred in the first process node of the first task process, repair the first process node in the first task process, and generate a second task process. The second task process includes a second process node obtained by repairing the first process node. The second process node differs from the first process node in at least one of the following: node parameters or execution logic.
[0017] The generation module is specifically used to generate a first prompt word; wherein the first prompt word includes: a first task flow described in a domain-specific language, the test result of the first task flow, and prompt information for indicating that the first task flow should be repaired; sending the first prompt word to a first language model, receiving a second task flow described in a domain-specific language returned by the first language model; and generating the second task flow based on the second task flow described in the domain-specific language.
[0018] Thirdly, this application provides an electronic device including a processor and a memory. The processor and the memory communicate with each other. The processor is used to execute instructions stored in the memory to cause the electronic device to perform a task flow repair method as described in the first aspect or any implementation thereof.
[0019] Fourthly, this application provides a computer-readable storage medium storing instructions that instruct an electronic device to perform the task flow repair method described in the first aspect or any implementation thereof.
[0020] Fifthly, this application provides a computer program product containing instructions that, when run on an electronic device, causes the electronic device to perform the task flow repair method described in the first aspect or any implementation thereof.
[0021] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.
[0022] As can be seen from the above technical solutions, this application has the following advantages:
[0023] This application provides a task flow repair method applied to a process engine. In a process configuration page, a first task flow is presented. In response to a test operation on the first task flow, test results of the first task flow are presented. The test results characterize whether each process node in the first task flow generates an execution error, and the cause of the error in the process node generating the error. In response to the test results indicating that the first process node in the first task flow generates an execution error, the first process node in the first task flow is repaired to generate a second task flow. The second task flow includes a second process node obtained by repairing the first process node. The second process node differs from the first process node in at least one of the following: node parameters or execution logic. The second task flow is generated through the following steps: generating a first prompt word, wherein the first prompt word includes: a first task flow described in a domain-specific language, the test results of the first task flow, and prompt information indicating that the first task flow should be repaired; sending the first prompt word to a first language model; receiving a second task flow described in a domain-specific language returned by the first language model; and generating the second task flow based on the second task flow described in the domain-specific language.
[0024] In this method, the original task flow is tested in the process engine, such as the process engine in a low-code platform, to identify process nodes with execution errors. The natural language processing capabilities of the language model are used to specifically repair the process nodes with execution errors. By modifying the node parameters or execution logic, a task flow without execution errors is obtained after repair. This method automatically repairs errors in the task flow, improves the correctness and stability of the task flow, and ensures that the task flow executes business tasks normally. Attached Figure Description
[0025] To more clearly illustrate the technical methods of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly described below.
[0026] Figure 1 A flowchart illustrating a task flow repair method provided in an embodiment of this application;
[0027] Figure 2 A schematic diagram of a first task flow provided for an embodiment of this application;
[0028] Figures 3A to 3D A schematic diagram of a process configuration page provided in an embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the structure of a task flow repair device provided in an embodiment of this application;
[0030] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0031] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.
[0032] First, some technical terms and application scenarios involved in the embodiments of this application will be introduced.
[0033] A workflow engine, also known as a workflow orchestration engine or workflow orchestration tool, is typically used to define, execute, and manage task workflows. Workflow engines usually support visual operations, allowing users (such as workflow orchestrators) to arrange workflow nodes and generate task workflows through drag-and-drop and connection operations on the workflow orchestration page.
[0034] Process engines are typically deployed within an Application Platform as a Service (aPaaS) platform, existing as a service component of that platform. An aPaaS platform, also known as a low-code platform, is a cloud service platform that simplifies application deployment and management by providing scalable application infrastructure services. As part of an aPaaS platform, the process engine enables the platform to support complex business process management and automation.
[0035] A task flow, also known as a workflow or process template, can be understood as an execution sequence composed of a series of process nodes. The dependencies between these nodes represent their execution order. A process node can be understood as a module used to perform a specific task, thereby achieving a specific function or providing a specific capability.
[0036] Task workflows are typically used to execute business tasks, such as onboarding approvals, store inspections, and product requirement status management. As business tasks become more complex, the number of workflow nodes and the dependencies between them also increase. Complex task workflows are prone to errors in correctness and stability. In related technologies, fixing these defects is usually done manually by the user (e.g., workflow orchestrator). While this method can improve the correctness of the task workflow to some extent, it is inefficient.
[0037] In view of this, this application provides a task flow repair method. This method is applied to a flow engine. In the flow configuration page, a first task flow is presented. In response to a test operation on the first task flow, the test results of the first task flow are presented. The test results characterize whether each flow node in the first task flow generates an execution error, and the cause of the error in the flow node generating the execution error. In response to the test results indicating that the first flow node in the first task flow generates an execution error, the first flow node in the first task flow is repaired to generate a second task flow. The second task flow includes a second flow node obtained by repairing the first flow node. The second flow node differs from the first flow node in at least one of the following: node parameters or execution logic. The second task flow is generated through the following steps: generating a first prompt word, wherein the first prompt word includes: a first task flow described in a domain-specific language, the test results of the first task flow, and prompt information indicating that the first task flow should be repaired; sending the first prompt word to a first language model; receiving the second task flow described in the domain-specific language returned by the first language model; and generating the second task flow based on the second task flow described in the domain-specific language.
[0038] In this method, the original task flow is tested in the process engine, such as the process engine in a low-code platform, to identify process nodes with execution errors. The natural language processing capabilities of the language model are used to specifically repair the process nodes with execution errors. By modifying the node parameters or execution logic, a task flow without execution errors is obtained after repair. This method automatically repairs errors in the task flow, improves the correctness and stability of the task flow, and ensures that the task flow executes business tasks normally.
[0039] To facilitate understanding of the technical solutions provided in the embodiments of this application, the following description will be provided in conjunction with the accompanying drawings. See also... Figure 1 The diagram shows a flowchart of a task flow repair method, which specifically includes the following steps:
[0040] S101: The first task process is displayed on the process configuration page.
[0041] The process configuration page, also known as the process configuration canvas, can be understood as a page provided by the process engine for configuring task processes. In other words, users (such as process orchestrators) can arrange the process nodes and their execution order in the task process on the process configuration page. In addition, users can also configure node parameters for each process node on the process configuration page.
[0042] In the embodiments of this application, the first task flow can be understood as a task flow with testing or repair needs. For example, the first task flow can be any task flow with process execution logic.
[0043] This application embodiment supports determining a first task flow with testing or repair needs through different methods. In some embodiments, the first task flow is presented in response to a selection operation for the first task flow on the process configuration page. The selection operation is used to select a configured task flow.
[0044] In other words, since the process engine usually stores pre-configured task processes, users (such as process orchestrators) can select the task processes that need to be tested or repaired from the pre-configured task processes, and determine the first task process based on the user-triggered selection operation.
[0045] In other embodiments, a first task flow is presented in response to a task flow configuration operation triggered on the process configuration page. The task flow configuration operation is used to configure the first task flow.
[0046] In other words, users (such as process orchestrators) can configure task flows on the process configuration page, such as orchestrating process nodes and the execution order between them. Based on the task flow configuration operation triggered by the user, the currently configured task flow is determined as the first task flow.
[0047] In some other embodiments, a first task flow is presented in response to a task flow generation operation triggered in the process configuration page. The task flow generation operation is associated with natural language text describing the first task flow, and the task flow generation operation triggers a first language model to generate the first task flow based on the natural language text describing the first task flow.
[0048] In other words, users (such as process orchestrators) can describe the task process that needs to be configured by entering natural language text on the process configuration page. For example, they can enter natural language text describing the business tasks that the task process needs to achieve. Based on the task process generation operation triggered by the user, the first language model is called, and the natural language processing capability of the first language model is used to automatically generate a task process that meets the user's needs. The task process automatically generated by the first language model is then determined as the first task process.
[0049] The first language model can be understood as a natural language processing model based on deep learning technology. Language models typically have the ability to understand, process, and generate natural language, and can handle different types of natural language tasks.
[0050] This application embodiment does not limit the way the user inputs natural language text to describe the first task process. For example, the user can directly input natural language text to describe the first task process through text input, or the user can input voice to describe the first task process through voice input. Natural language text to describe the first task process is obtained through voice recognition and text conversion.
[0051] In some possible implementations, the workflow engine deploys a digital assistant, through which users input natural language text. The digital assistant can be understood as a module providing human-computer dialogue services. That is, the user inputs natural language text describing the first task flow through the digital assistant, which then invokes a first language model to generate the first task flow, thus achieving automatic task flow generation.
[0052] This application does not limit the presentation method of the first task flow in its embodiments. For example, the first task flow can be presented in the form of a topology graph on the process configuration page. In other words, the process nodes of the first task flow constitute the nodes of the topology graph, and the execution order between the process nodes of the first task flow indicates the connection relationship between the nodes in the topology graph.
[0053] S102: In response to the test operation for the first task flow, present the test results of the first task flow.
[0054] The test operation for the first task process can be understood as triggering an operation to test the executability of the first task process. In other words, when a user has a need to test or fix the first task process, the process of testing or fixing the first task process is initiated by triggering the test operation for the first task process.
[0055] This application embodiment supports users triggering test operations on the first task flow in different ways. In some embodiments, in response to a trigger operation on a test control, the test results of the first task flow are presented. The test control is used to trigger testing on the first task flow.
[0056] In other words, the process configuration page provides test controls. Users can trigger the test controls, such as by clicking the test controls, to start the process of testing and repairing the first task process, thus achieving quick and convenient task process repair.
[0057] In other embodiments, test results of the first task flow are presented in response to interactions with the digital assistant. These interactions are associated with prompts used to test the first task flow.
[0058] In other words, the process engine is equipped with a digital assistant. Users can interact with the digital assistant by inputting natural language text to test the first task process, such as "Please help me test this task process". In this way, the process of testing and repairing the first task process is automatically started through the dialogue between the user and the digital assistant.
[0059] In some possible implementations, in response to a trigger operation on the digital assistant, the digital assistant interactive interface is presented; in response to receiving a trigger operation in the digital assistant interactive interface for testing the first task process, a prompt message for testing the first task process is generated based on the trigger operation, and the test results of the first task process are presented on the process configuration page.
[0060] The digital assistant interface can be understood as an interface for human-computer dialogue. In other words, users can interact with the digital assistant through the digital assistant interface, and both the user's input text and the digital assistant's generated text can be displayed on the digital assistant interface. The digital assistant interface can have different display formats; for example, it can be a floating window for the digital assistant.
[0061] Triggering an action for a digital assistant can be understood as an action used to initiate interaction with the digital assistant. For example, a triggering action for a digital assistant could be an action used to bring up the digital assistant's interactive interface. By triggering an action for the digital assistant, the interactive interface of the digital assistant is presented, allowing the user to interact with the digital assistant.
[0062] The triggering operation for testing the first task process can be understood as an operation to test the first task process through interaction with a digital assistant. For example, the triggering operation for testing the first task process can be that the user sends natural language text for testing the first task process in the digital assistant's interactive interface. Similarly, the embodiments of this application do not limit the way the user inputs natural language text for testing the first task process. For example, the user can directly input natural language text for testing the first task process in the digital assistant's interactive interface through text input. Alternatively, the user can also input voice for testing the first task process in the digital assistant's interactive interface through voice input, and obtain the natural language text for testing the first task process through voice recognition and text conversion.
[0063] Through the digital assistant's interactive interface, users can describe their needs related to the task process at any time by inputting natural language content in the digital assistant's interactive interface while using the process engine. The digital assistant helps users use the process engine conveniently and quickly.
[0064] The test results of the first task process can be understood as the results obtained after testing the first task process. The test results can be used to characterize whether each process node in the first task process produces an execution error, and the reason for the error of the process node that produces the execution error.
[0065] In other words, by testing the first task process, we can determine whether the first task process can correctly execute the business task. If the first task process can correctly execute the business task, then no execution error will occur at any process node in the first task process. If the first task process cannot correctly execute the business task, then we can locate the process node in the first task process that caused the execution error and analyze the cause of the execution error.
[0066] In this embodiment, test cases are used to test the first task process. In some embodiments, test cases can be manually configured by the user; in other embodiments, test cases can be automatically generated by a language model.
[0067] The following describes the process of automatically generating test cases from a language model and then testing the first task flow.
[0068] In practice, test cases are generated by the first language model. The first language model implements the above process of generating test cases based on prompting engineering technology. In generative tasks (such as text generation tasks, question answering tasks, and dialogue tasks), prompt words can be used to guide the language model to make specific outputs. By configuring prompt words, the language model can be helped to understand the background and requirements of the task. Without retraining the language model, the language model can handle different types of natural language processing tasks, increasing the scalability and flexibility of the language model.
[0069] Specifically, a second prompt word is generated and sent to the first language model, and the first test case is received from the first language model. The second prompt word includes: a first task flow described in a domain-specific language (DSL) and prompt information indicating the generation of test cases.
[0070] A DSL is a computer programming language used to solve problems in a specific domain. In this embodiment, by describing task flows using a task flow DSL, the syntax and semantics are made more closely aligned with the concepts and requirements of the task flow domain.
[0071] In some embodiments, to enable the first language model to analyze a first task flow described by a DSL, the second prompt word may also include syntactic knowledge of the DSL. Thus, based on the prompting capability of the second prompt word, the first language model understands the syntax of the DSL, and then analyzes the first task flow based on the syntax of the DSL to generate test cases for testing the first task flow.
[0072] For example, the grammar knowledge of DSL can be partially summarized as follows:
[0073] "The workflow is described using a YAML-formatted DSL. The DSL uses a `nodes` array to describe nodes in the workflow and an `edges` array to describe the edge relationships between nodes. The `id` field of a node serves as its identifier, the `name` field as its name, and the `type` field indicates its type. The `definition` field of a node contains the following fields: `inputs`, `outputs`, `info`, `blocks`, `code`, `language`, `condition`, and `data`. Each edge relationship must contain `sourceNodeID` and `targetNodeID`, representing the originating node and the target node of the edge. The `definition.inputs` parameter of a downstream node can reference the `definition.outputs` variable of an upstream node, and the reference relationship is defined through the `data` field."
[0074] The first task flow described by DSL can be partially as follows:
[0075] “edges:
[0076] - sourceNodeID: start1
[0077] targetNodeID: llm1
[0078] - sourceNodeID: llm1
[0079] targetNodeID: end1
[0080] nodes:
[0081] - definition:
[0082] info:
[0083] Description: Receives text input from the user.
[0084] outputs:
[0085] - name: query
[0086] required: true
[0087] type: string
[0088] id: start1
[0089] name: Start
[0090] type: start
[0091] - data:
[0092] modelType: "123456"
[0093] modelName: Tool Invocation
[0094] prompt: ref(start1.outputs.query)
[0095] systemPrompt:xxxxxx
[0096] definition:
[0097] info:
[0098] Description: Generate 5 related queries based on the text of the start node.
[0099] inputs:
[0100] - description: User prompt word used to generate content
[0101] name: prompt
[0102] type: string
[0103] - description: System prompt used to guide content generation
[0104] name: systemPrompt
[0105] type: string
[0106] - description: The type ID of the model used
[0107] name: modelType
[0108] outputs:
[0109] - name: output
[0110] type: string”
[0111] Thus, by configuring the above information in the second prompt word, the first language model can intuitively understand the first task flow based on the prompting capability of the second prompt word, accurately analyze the first task flow, and generate the first test case for testing the first task flow.
[0112] In this embodiment of the application, the first test case includes: the input parameters of the start node and the correct output result of the end node in the first task flow. That is, the first language model generates the initial input of the first task flow (i.e., the input parameters of the start node) by analyzing the overall structure and execution logic of the first task flow, and generates the expected output of the first task flow (i.e., the correct output result of the end node) when the input parameters of the start node are input into the first task flow.
[0113] Next, the first task flow is executed using the first test case to obtain the test results of the first task flow. For example, by calling the execution interface of the process engine, the first task flow is executed with the input parameters of the start node in the first test case. Combining the execution status of the first task flow with the correct output results of the end node in the first test case, it is determined whether each process node in the first task flow has generated execution errors. Furthermore, for the process nodes that have generated execution errors, the cause of the errors is determined, thereby determining the test results of the first task flow.
[0114] In some embodiments, the test results of the first task process can be manually analyzed by the user; in other embodiments, the test results of the first task process can be automatically generated by the language model.
[0115] The process of automatically generating test results for the first task flow using a language model is described below.
[0116] First, the first task flow is executed using the first test case to obtain the execution data of the first task flow. The execution data includes at least one of the following: the execution path of the first task flow, the execution status of each process node in the first task flow, and the output result of the first task flow.
[0117] The execution path of the first task flow can be understood as the path composed of the process nodes executed during the execution of the first task flow. For example, when the first task flow has branch nodes, only one process branch can be executed in one execution process. In this case, the execution path of the first task flow can include the process nodes in the executed process branches. The execution status of each process node in the first task flow can be used to characterize whether each process node was executed successfully during the execution of the first task flow. For example, if a process node in the first task flow has a defect (bug), an error will be reported when the process node is executed. In this case, the execution status of the process node can characterize the execution failure. The output result of the first task flow can be understood as the final output after the first task flow is completed, such as the output result of the end node of the first task flow.
[0118] Next, a third prompt word is generated and sent to the first language model. The test results of the first task flow returned by the first language model are then received. The third prompt word includes: the first task flow described in DSL, the first test case, the execution data of the first task flow, and prompt information used to indicate the determination of the test result based on the execution data of the first task flow.
[0119] Since the third prompt word includes the above information, the first language model can, based on the prompting capability of the third prompt word and combined with the overall structure of the first task flow, determine which process nodes in the first task flow produce execution errors, based on the execution data of the first task flow under the premise that the input parameters of the starting node in the first test case execute the first task flow, locate the process nodes that produce execution errors, analyze the reasons for the execution errors, and generate test cases for the first task flow.
[0120] In some possible implementations, the error cause of a process node that generates an execution error may include at least one of the following: the node parameter of the process node that generates the execution error has a syntax error, the node parameter of the process node that generates the execution error has a runtime error, or the process node that generates the execution error has an execution logic error.
[0121] Syntax errors in node parameters can be understood as configuration errors in node parameters that can be identified without executing the process node. Examples include missing reference parameters, incorrect expressions, incorrect dependencies, incorrect node naming, and duplicate node names. Runtime errors in node parameters are configuration errors that occur during the execution of the process node. Examples include incorrect array subscripts, empty data, and missing data. Execution logic errors occur when the execution logic of the process node is flawed, causing it to fail to execute its function correctly. For example, for a process node used for addition, if the input parameters are 1 and 1, the process node should output 2, but it actually outputs 3. In this case, the process node has an execution logic error.
[0122] In this way, the test results of the first task process can be analyzed to identify the specific reasons for the errors in the process nodes that caused the execution errors, which will facilitate targeted repairs to the first task process in the future.
[0123] S103: In response to the test result indicating that the first process node in the first task process has an execution error, repair the first process node in the first task process and generate the second task process.
[0124] In this embodiment of the application, the second task flow can be understood as the task flow obtained after repairing the first task flow. The second task flow includes the second process node obtained after repairing the first process node. That is, the second task flow is the task flow after updating the first process node in the first task flow to the second process node. The second process node and the first process node have at least one of the following differences: node parameters or execution logic.
[0125] In other words, since there is an execution error in the first process node in the first task process, the first process node is repaired by modifying the node parameters or execution logic of the first process node, and the first process node with the execution error is repaired into a second process node without the execution error, thereby forming the repaired second task process.
[0126] In this embodiment, a first language model is used to repair the first task flow and generate a second task flow. Specifically, a first prompt word is generated and sent to the first language model. The second task flow described in DSL is received from the first language model, and the second task flow is generated based on the second task flow described in DSL.
[0127] The first prompt includes: a first task flow described in DSL, the test results of the first task flow, and prompts indicating that the first task flow should be repaired.
[0128] Similarly, in order to enable the first language model to analyze the first task flow described by the DSL, the first prompt word may also include syntactic knowledge of the DSL.
[0129] Thus, by configuring the above information in the first prompt word, the first language model can modify the first process node that represents the execution error in the test results based on the prompting capability of the first prompt word, combined with the overall structure of the first task process and the error cause of the execution error, to fix the runtime defects in the first task process, generate the repaired second task process, and realize automatic repair of the first task process.
[0130] In some embodiments, the first task flow includes multiple flow branches, and the first test case includes multiple test cases. In the execution data corresponding to the multiple test cases, the set of execution paths of the first task flow covers the multiple flow branches of the first task flow.
[0131] In other words, considering that there may be branch nodes in the first task process, if the execution path in the execution data can only cover some process branches after the first task process is executed using the generated test cases, it is impossible to test the remaining process branches and obtain a comprehensive test result of the first task process. Therefore, in this embodiment of the application, by generating multiple test cases, the set of execution paths corresponding to the multiple test cases can cover all process branches of the first task process during the testing process, thereby improving the coverage of test cases and achieving comprehensive testing.
[0132] In some possible implementations, adding a new test case can be achieved as follows: The first task flow has a first flow branch and a second flow branch, and the execution path of the first task flow corresponding to the first test case includes the first flow branch but does not include the second flow branch. In this case, a fourth prompt word is generated and sent to the first language model, and the second test case returned by the first language model is received. The fourth prompt word includes: the first task flow described in DSL, and prompt information indicating the generation of a test case passing through the second flow branch.
[0133] See Figure 2 The diagram illustrates a first task flow, which includes two flow branches. The first flow branch consists of flow nodes A, B, C1, C2, C3, and E, while the second flow branch consists of flow nodes A, B, D1, D2, and E. After executing the first task flow using the first test case, the execution path is the first flow branch. In this case, to improve coverage, a prompt message is configured in the fourth prompt word to indicate the generation of test cases that pass the second flow branch, enabling the first language model to generate second test cases that can cover the second flow branch.
[0134] In some possible implementations, to enable the first language model to efficiently generate second test cases, the prompt message in the fourth prompt word indicating the generation of test cases through the second process branch may include: prompt message indicating the generation of test cases through the second process branch in a backtracking manner. In this way, the first language model can start from the next process node after the branch node in the second process branch (i.e., the first process branch and the second process branch produce different first process nodes), backtrack to the starting node of the first task process, redesign the input parameters of the starting node, so that the second test cases can pass through the second process node, enriching the test cases and making the test results more comprehensively cover the first task process.
[0135] In some embodiments, the user may be prompted for confirmation before the second task flow is presented. Specifically, the first prompt word further includes: prompt information indicating a repair solution for generating the first task flow, and the first language model also returns the repair solution for the first task flow. In response to a test result indicating that an execution error occurred in a first process node of the first task flow, the repair solution for the first task flow is presented; in response to a confirmation operation for the repair solution for the first task flow, the first process node in the first task flow is repaired according to the repair solution for the first task flow, and the second task flow is generated.
[0136] The repair solution for the first task process includes at least one of the following, described in natural language: the cause of the error in the first process node and the repair method to repair the first process node into a second process node.
[0137] For example, when a user triggers a test operation for the first task process through interaction with the digital assistant, a solution for the first task process can be presented in the digital assistant's interface, and controls for providing feedback on the solution can be provided. The user can then trigger a confirmation operation for the solution by triggering the controls.
[0138] In other words, by configuring prompt information in the first prompt word to indicate the repair solution for generating the first task flow, the first language model can generate a repair solution in natural language to repair the first task flow into the second task flow. In this way, by presenting the repair solution, the user is asked to confirm whether to repair the first task flow according to the repair solution. After the user confirms the repair solution, the first task flow is then repaired into the second task flow, thus avoiding the repair of the first task flow from being inconsistent with the user's needs.
[0139] In this method, the original task flow is tested in the process engine, such as the process engine in a low-code platform, to identify process nodes with execution errors. The natural language processing capabilities of the language model are used to specifically repair the process nodes with execution errors. By modifying the node parameters or execution logic, a task flow without execution errors is obtained after repair. This method automatically repairs errors in the task flow, improves the correctness and stability of the task flow, and ensures that the task flow executes business tasks normally.
[0140] The preceding text introduced the task flow repair method provided in this application. The following text will explain it in conjunction with specific page screenshots.
[0141] See Figures 3A to 3D A schematic diagram of a process configuration page is provided. Figure 3A In the process configuration page 30, the first task process 32 is displayed. Simultaneously, the process configuration page 30 also displays a test control 31 and a control 33 for triggering the digital assistant. Users can trigger test operations for the first task process by triggering the test control 31, or by interacting with the digital assistant.
[0142] exist Figure 3BIn response to a triggering operation on the control 33 used to trigger the digital assistant, the digital assistant interaction interface 34 is presented. The digital assistant interaction interface 34 provides an input box in which the user can enter natural language text for testing the first task process. After the user sends the natural language text for testing the first task process, the digital assistant interaction interface 34 presents the natural language text 341 for testing the first task process, such as "test task process".
[0143] exist Figure 3C In the process, the digital assistant calls the first language model to generate the first test case, and uses the first test case to execute the first task flow, generates the test result of the first task flow, and presents the test result 35 of the first task flow on the flow configuration page 30, such as "the node parameters of the "flow node B" are incomplete".
[0144] exist Figure 3D In the digital assistant's interactive interface, a repair solution 342 for the first task flow is presented, such as "A task flow execution error has been detected; parameter A is missing from 'flow node B.' Would you like to complete it?". Simultaneously, the digital assistant's interactive interface also presents controls 343 for providing feedback on the repair solution for the first task flow, such as an accept control and a reject control. Users can trigger the accept control to confirm the repair solution for the first task flow, thereby updating the first task flow to the second task flow. In this way, automatic testing and repair of the task flow are achieved through interaction with the digital assistant.
[0145] The above text combined Figure 1 Figure 3 provides a detailed description of the task flow repair method provided in the embodiments of this application. The apparatus and equipment provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0146] See Figure 4 The schematic diagram of the task flow repair device shown is deployed in the process engine. The device 40 includes:
[0147] The first presentation module 401 is used to present the first task process in the process configuration page;
[0148] The second presentation module 402 is used to present the test results of the first task process in response to the test operation for the first task process; wherein the test results are used to characterize whether each process node in the first task process generates an execution error, and the reason for the error of the process node that generates the execution error.
[0149] The generation module 403 is used to respond to the test result indicating that the first process node in the first task process has an execution error, repair the first process node in the first task process, and generate a second task process. The second task process includes a second process node obtained by repairing the first process node. The second process node is different from the first process node in at least one of the following: node parameters or execution logic.
[0150] The generation module 403 is specifically used to generate a first prompt word; wherein the first prompt word includes: a first task flow described in a domain-specific language, the test result of the first task flow, and prompt information for indicating that the first task flow should be repaired; sending the first prompt word to a first language model, receiving a second task flow described in a domain-specific language returned by the first language model; and generating the second task flow according to the second task flow described in the domain-specific language.
[0151] In some possible implementations, the first presentation module 401 is specifically used for:
[0152] In response to a selection operation for the first task flow on the process configuration page, the first task flow is displayed, whereby the selection operation is used to select a configured task flow; or...
[0153] In response to a task flow configuration operation triggered on the process configuration page, the first task flow is presented, wherein the task flow configuration operation is used to configure the first task flow; or...
[0154] In response to a task flow generation operation triggered in the process configuration page, the first task flow is presented. The task flow generation operation is associated with natural language text describing the first task flow. The task flow generation operation is used to trigger the first language model to generate the first task flow based on the natural language text describing the first task flow.
[0155] In some possible implementations, the second presentation module 402 is specifically used for:
[0156] In response to a trigger operation on the test control, the test results of the first task flow are displayed, wherein the test control is used to trigger testing of the first task flow; or,
[0157] In response to an interaction with the digital assistant, the test results of the first task flow are presented, and the interaction with the digital assistant is associated with prompts used to test the first task flow.
[0158] In some possible implementations, the second presentation module 402 is specifically used for:
[0159] In response to a trigger action on the digital assistant, the digital assistant's interactive interface is displayed;
[0160] In response to receiving a trigger operation for testing the first task flow in the digital assistant interaction interface, a prompt message for testing the first task flow is generated according to the trigger operation, and the test result of the first task flow is presented in the process configuration page.
[0161] In some possible implementations, the first prompt word further includes: prompt information for indicating the generation of a repair solution for the first task flow, and the first language model also returns the repair solution for the first task flow; the generation module 403 is specifically used for:
[0162] In response to the test results indicating that an execution error occurred in the first process node of the first task flow, a repair scheme for the first task flow is presented; wherein, the repair scheme for the first task flow includes at least one of the following described in natural language: the cause of the error in the first process node and the repair method of repairing the first process node into the second process node;
[0163] In response to the confirmation operation of the repair plan for the first task flow, the first process node in the first task flow is repaired according to the repair plan of the first task flow, and the second task flow is generated.
[0164] In some possible implementations, the generation module 403 is further configured to:
[0165] Generate a second prompt word; wherein the second prompt word includes: the first task flow described in a domain-specific language and prompt information for instructing the generation of test cases;
[0166] The second prompt word is sent to the first language model, and the first test case returned by the first language model is received; wherein, the first test case includes: the input parameters of the start node and the correct output result of the end node in the first task flow;
[0167] The first task flow is executed using the first test case to obtain the test results of the first task flow.
[0168] In some possible implementations, the generation module 403 is specifically used for:
[0169] The first task flow is executed using the first test case to obtain the execution data of the first task flow; wherein, the execution data includes at least one of the following: the execution path of the first task flow, the execution status of each process node in the first task flow, and the output result of the first task flow;
[0170] Generate a third prompt word; wherein the third prompt word includes: the first task flow described in a domain-specific language, the first test case, the execution data of the first task flow, and prompt information for indicating the determination of test results based on the execution data of the first task flow;
[0171] The third prompt word is sent to the first language model, and the test results of the first task flow returned by the first language model are received.
[0172] In some possible implementations, the first task flow includes multiple flow branches, and the first test case includes multiple test cases; in the execution data corresponding to the multiple test cases, the set of execution paths of the first task flow covers the multiple flow branches of the first task flow.
[0173] In some possible implementations, the error cause of the process node that generates the execution error includes at least one of the following: the node parameter of the process node that generates the execution error has a syntax error, the node parameter of the process node that generates the execution error has a runtime error, or the process node that generates the execution error has an execution logic error.
[0174] The task flow repair apparatus 40 according to the embodiments of this application can correspond to the execution of the method described in the embodiments of this application, and the above and other operations and / or functions of each module / unit of the task flow repair apparatus 40 are respectively for implementing Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0175] This application also provides an electronic device. This electronic device is specifically used to implement, as described above. Figure 4 The function of the task flow repair device 40 in the illustrated embodiment.
[0176] Figure 5 A structural schematic diagram of an electronic device 500 is provided, such as... Figure 5 As shown, the electronic device 500 includes a bus 501, a processor 502, a communication interface 503, and a memory 504. The processor 502, the memory 504, and the communication interface 503 communicate with each other via the bus 501.
[0177] Bus 501 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 5 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0178] The processor 502 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0179] Communication interface 503 is used for external communication. For example, communication interface 503 can be used to communicate with a terminal.
[0180] Memory 504 may include volatile memory, such as random access memory (RAM). Memory 504 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0181] The memory 504 stores executable code, and the processor 502 executes the executable code to perform the aforementioned task flow repair method.
[0182] Specifically, in achieving Figure 4 In the case of the illustrated embodiment, and Figure 4 When the modules or units of the task flow repair device 40 described in the embodiment are implemented by software, the following steps are performed: Figure 4 The software or program code required for the functions of each module / unit can be partially or wholly stored in memory 504. Processor 502 executes the program code corresponding to each unit stored in memory 504 to perform the aforementioned task flow repair method.
[0183] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the task flow repair method applied to the task flow repair apparatus 40 described above.
[0184] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.
[0185] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0186] When the computer program product is executed by a computer, the computer performs any of the aforementioned task flow repair methods. The computer program product can be a software installation package; when any of the aforementioned task flow repair methods is required, the computer program product can be downloaded and executed on the computer.
[0187] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0188] The units described in the embodiments of this application can be implemented in software or hardware. The names of the units / modules do not necessarily limit the specific unit itself.
[0189] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0190] In the context of embodiments of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0191] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems or apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and relevant parts can be referred to the method section.
[0192] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0193] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0194] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0195] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A task flow repair method applied to a low-code platform, characterized in that, A process engine applied to the low-code platform, the method comprises: In a process configuration page, a first task flow is presented, the process configuration page is used to arrange the execution order between process nodes in the first task flow and configure node parameters of each process node; In response to a trigger operation for a digital assistant, a digital assistant interaction interface is presented; In response to receiving a trigger operation for testing the first task flow in the digital assistant interaction interface, prompt information for testing the first task flow is generated according to the trigger operation, and the test result of the first task flow is presented in the process configuration page; wherein the test result is used to represent whether each process node in the first task flow produces an execution error, and the error cause of the process node that produces an execution error; In response to the test result representing that a first process node in the first task flow produces an execution error, a repair scheme of the first task flow described in natural language is presented; wherein the repair scheme of the first task flow described in natural language includes at least one of the following described in natural language: the error cause of the first process node and the repair method of repairing the first process node into a second process node; In response to confirmation of the repair scheme of the first task flow, the first process node in the first task flow is repaired according to the repair scheme of the first task flow, a second task flow is generated, the second task flow includes a second process node obtained by repairing the first process node, and the second process node is different from the first process node in at least one of the following: node parameters and execution logic; The second task flow is generated by the following steps: Generate a first prompt word; wherein the first prompt word includes: the first task flow described in a domain-specific language, the test result of the first task flow, prompt information for indicating the repair of the first task flow, prompt information for indicating the generation of the repair scheme of the first task flow, and syntax knowledge of the domain-specific language; Send the first prompt word to a first language model, receive the second task flow described in a domain-specific language returned by the first language model, and the first language model also returns the repair scheme of the first task flow described in natural language; According to the second task flow described in a domain-specific language, the second task flow is generated.
2. The method of claim 1, wherein, The first task flow is presented in the process configuration page, which comprises: In response to a selection operation for the first task flow in the process configuration page, the first task flow is presented, the selection operation is used to select the configured task flow; or, In response to a task flow configuration operation triggered in the process configuration page, the first task flow is presented, the task flow configuration operation is used to configure the first task flow; or, In response to a task flow generation operation triggered in a flow configuration page, the first task flow is presented, the task flow generation operation is associated with natural language text used to describe the first task flow, and the task flow generation operation is used to trigger the first language model to generate the first task flow based on the natural language text used to describe the first task flow.
3. The method of claim 1, wherein, The test result is generated by the following steps: A second prompt word is generated; wherein the second prompt word includes: the first task flow described in a domain-specific language and prompt information for indicating the generation of test cases; The second prompt word is sent to the first language model, and the first test case returned by the first language model is received; wherein the first test case includes: input parameters of a start node and correct output results of an end node in the first task flow; The first task flow is executed using the first test case, and a test result of the first task flow is obtained.
4. The method of claim 3, wherein, The first test case is used to execute the first task flow, and the test result of the first task flow is obtained, including: The first test case is used to execute the first task flow, and the execution data of the first task flow is obtained; wherein the execution data includes at least one of: an execution path of the first task flow, an execution state of each flow node in the first task flow, and an output result of the first task flow; A third prompt word is generated; wherein the third prompt word includes: the first task flow described in a domain-specific language, the first test case, the execution data of the first task flow, and prompt information for indicating the determination of a test result based on the execution data of the first task flow; The third prompt word is sent to the first language model, and the test result of the first task flow returned by the first language model is received.
5. The method of claim 4, wherein, The first task flow includes multiple flow branches, and the first test case includes multiple test cases; in the execution data corresponding to the multiple test cases, a set of execution paths of the first task flow covers the multiple flow branches of the first task flow.
6. The method according to any one of claims 1 to 5, characterized in that, The error cause of the flow node that produces an execution error includes at least one of: a syntax error in the node parameter of the flow node that produces an execution error, a running error in the node parameter of the flow node that produces an execution error, or an execution logic error in the flow node that produces an execution error.
7. A task flow repair apparatus applied to a low-code platform, characterized in that, A flow engine deployed in the low-code platform, the device includes: A first presentation module is configured to present a first task flow in a flow configuration page, the flow configuration page is used to arrange the execution order between flow nodes in the first task flow and configure the node parameters of each flow node; The second presentation module is configured to present a digital assistant interaction interface in response to a trigger operation for the digital assistant; in response to receiving a trigger operation for testing the first task flow in the digital assistant interaction interface, generate prompt information for testing the first task flow according to the trigger operation, and present a test result of the first task flow in the flow configuration page; wherein the test result is used to represent whether each flow node in the first task flow produces an execution error, and an error cause of a flow node that produces an execution error; The generation module is configured to present a repair scheme of the first task flow described in a self-heating language in response to the test result representing that a first flow node in the first task flow produces an execution error; wherein the repair scheme of the first task flow includes at least one of the following described in a natural language: an error cause of the first flow node and a repair manner of repairing the first flow node into a second flow node; In response to a confirmation of the repair scheme of the first task flow, the first flow node in the first task flow is repaired according to the repair scheme of the first task flow, and a second task flow is generated, the second task flow including a second flow node obtained by repairing the first flow node, and the second flow node being different from the first flow node in at least one of the following: a node parameter or an execution logic; The generation module is specifically configured to generate a first prompt word; wherein the first prompt word includes: the first task flow described in a domain-specific language, a test result of the first task flow, prompt information for indicating repair of the first task flow, prompt information for indicating generation of a repair scheme of the first task flow, and a grammar of the domain-specific language; the first prompt word is sent to a first language model, a second task flow described in a domain-specific language returned by the first language model is received, the first language model also returns a repair scheme of the first task flow described in a natural language; and the second task flow is generated according to the second task flow described in the domain-specific language.
8. An electronic device, comprising: The electronic device includes a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the electronic device performs the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The instructions instruct the electronic device to perform the method of any one of claims 1 to 6.
10. A computer program product, characterised in that, The computer program product includes computer readable instructions for implementing the method of any one of claims 1 to 6. The computer program product includes computer readable instructions for implementing the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Process-based visualization test and visualization analogue simulation test system and method
CN115794639A
High-quality micro-benchmark performance test automatic generation method and device based on large language model
CN119440992A