A workflow generation method, system, device and computer readable storage medium

By using methods of filtering, transforming, and incrementally generating large language models, the problem of low workflow generation efficiency was solved, resulting in a significant reduction in workflow generation time and an improvement in efficiency.

CN122390692APending Publication Date: 2026-07-14ZHEJIANG TONGHUASHUN INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG TONGHUASHUN INTELLIGENT TECH CO LTD
Filing Date
2026-06-12
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing technologies that rely on large language models to generate workflows are inefficient, resulting in workflow generation time being on the order of minutes, which cannot meet the requirements for efficient generation.

Method used

By acquiring natural language instructions, filtering existing workflows associated with them, converting them into initial domain-specific language code, generating incremental prompts, and inputting them into a pre-trained workflow incremental generation large model, assembling and mapping to obtain the target domain-specific language code, and finally generating the target workflow.

Benefits of technology

Workflow generation time has been reduced from 5 minutes to 20-30 seconds, improving generation efficiency. Incremental generation has also reduced the length of generated content, enhancing the efficiency and generalizability of workflow generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390692A_ABST
    Figure CN122390692A_ABST
Patent Text Reader

Abstract

The application discloses a kind of workflow generation method, system, equipment and computer readable storage medium, please involve artificial intelligence technical field, obtain natural language instruction;Filter and have the existing workflow associated with natural language instruction;The existing workflow is converted into initial domain-specific language code;According to natural language instruction and initial domain-specific language code, generate incremental prompt word;Incremental prompt word is input to pre-trained workflow incremental generation big model;Get the incremental domain-specific language code that workflow incremental generation big model outputs;Initial domain-specific language code and incremental domain-specific language code are assembled, and target domain-specific language code is obtained;Target domain-specific language code is mapped, and target workflow is obtained.The application takes existing workflow as benchmark, and generates target workflow in domain-specific language code level incrementally, reduces the generation time consumption of target workflow, improves the generation efficiency of workflow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a workflow generation method, system, device, and computer-readable storage medium. Background Technology

[0002] With the development of Large Language Models (LLMs), natural language generation workflows have become one of the directions for improving efficiency. Users input natural language prompts, and then the LLM directly outputs workflow steps or configuration files, such as JSON / YAML.

[0003] However, current solutions that use large language models to generate workflows often consume minutes of time due to the repeated use of the large language model for decision-making and the full generation of workflows. This results in low workflow generation efficiency.

[0004] In conclusion, improving the efficiency of workflow generation is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this invention is to provide a workflow generation method that can, to a certain extent, solve the technical problem of how to improve the efficiency of workflow generation. This invention also provides a workflow generation system, an electronic device, and a computer-readable storage medium.

[0006] To achieve the above objectives, the present invention provides the following technical solution: A workflow generation method, comprising: Obtain natural language commands; Filter existing workflows associated with natural language instructions; Convert existing workflows into initial domain-specific language code; Incremental prompts are generated based on natural language instructions and the initial domain-specific language code; The incremental prompts are input into a pre-trained workflow incremental generation large model; Obtain incremental domain-specific language code for generating large model output from workflow increments; The initial domain-specific language code and the incremental domain-specific language code are assembled to obtain the target domain-specific language code; Mapping the target domain-specific language code yields the target workflow.

[0007] Preferably, existing workflows associated with natural language instructions are filtered, including: The workflow generation type is parsed based on natural language instructions; In response to the workflow generation type being "new", the natural language instructions are broken down into sub-requirements. In the workflow knowledge base, existing workflows that match the sub-requirements are filtered out. Existing workflows include historical workflows, workflow fragments, and components. If the workflow generation type is edit, the existing workflow of the natural language instructions will be used as the existing workflow.

[0008] Preferably, incremental prompts are generated based on natural language instructions and the initial domain-specific language code, including: Obtain the set prompt word template, which includes a first token for limiting the content of historical workflows, a second token for limiting the content of workflow segments, a third token for limiting the content of component examples, and a fourth token for limiting the domain-specific language code to be modified. Based on the natural language instructions and the initial domain-specific language code, the prompt word template is filled in to generate incremental prompt words.

[0009] Preferably, after assembling the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code, and before mapping the target domain-specific language code to obtain the target workflow, the method further includes: The business function evaluation, content specification evaluation, and node connection specification evaluation of the target domain-specific language code are carried out to obtain the evaluation results. Based on the evaluation results, analyze whether the target domain-specific language code is complete; If incomplete, analyze the business function problems based on the evaluation results and update the existing workflow, then return to the step of converting the existing workflow into the initial domain-specific language code; If complete, the steps of mapping the target domain-specific language code to obtain the target workflow are executed.

[0010] Preferably, after analyzing whether the target domain-specific language code is complete based on the evaluation results, the method further includes: If the evaluation is incomplete and the evaluation results represent non-business function problems, then structural error repair should be performed on the target domain-specific language code. Return to the steps of performing business function evaluation, content specification evaluation, and node connection specification evaluation on the target domain-specific language code.

[0011] Preferably, after mapping the target domain-specific language code to obtain the target workflow, the process also includes: Based on the target workflow, a business test suite is generated, which covers the main process, target business exception scenarios, boundary scenarios, and functional tests. Import the target workflow into the workflow platform, and use the business test set to verify the workflow platform's process execution, and obtain the verification results. Based on the verification results, the target workflow is optimized to obtain an optimized workflow.

[0012] Preferably, after mapping the target domain-specific language code to obtain the target workflow, the process also includes: The target workflow is evaluated to obtain performance indicators, which include first-time generation executability rate, first-time execution success availability rate, first-time availability rate, second-time repair executability rate, second-time execution success availability rate, and second-time availability rate. The target workflow is evaluated to obtain business metrics, which include workflow generation time and workflow generation cost. Based on the performance metrics and business metrics, generate the quality assessment results for the target workflow.

[0013] A workflow generation system, comprising: The instruction acquisition module is used to acquire natural language instructions; The workflow filtering module is used to filter existing workflows associated with natural language commands; The code mapping module is used to convert existing workflows into initial domain-specific language code; The prompt word generation module is used to generate incremental prompt words based on natural language instructions and the initial domain-specific language code; The input module is used to input the incremental prompts into a pre-trained workflow incremental generation model; The incremental code acquisition module is used to acquire incremental domain-specific language code for the output of the large model generated by the workflow incremental generation. An assembly module is used to assemble the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code; The workflow mapping module is used to map target domain-specific language code to obtain the target workflow.

[0014] An electronic device, comprising: Memory, used to store computer programs; A processor for implementing the steps of any of the workflow generation methods described above when executing the computer program.

[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the workflow generation methods described above.

[0016] This invention provides a workflow generation method, which includes: acquiring natural language instructions; filtering existing workflows associated with the natural language instructions; converting the existing workflows into initial domain-specific language (DNS) code; generating incremental prompts based on the natural language instructions and the initial DNS code; inputting the incremental prompts into a pre-trained workflow incremental generation model; acquiring the incremental DNS code output by the workflow incremental generation model; assembling the initial DNS code and the incremental DNS code to obtain target DNS code; and mapping the target DNS code to obtain the target workflow. The beneficial effects of this invention are as follows: Converting existing workflows into initial domain-specific language (DNS) code compresses the workflow content length while isolating the model from platform-specific configuration formats, thus improving generalization. Subsequently, in the generation of the target DNS code, incremental prompts guide the incremental generation of the large workflow model, ensuring that each adjustment only requires outputting incremental DNS code, eliminating the need to output the complete DNS code, thereby reducing the length of the generated content. Finally, when using the incremental DNS code to generate the target workflow, it can be based on the existing workflow, incrementally generating the target workflow at the DNS code level, reducing the generation time and improving workflow generation efficiency. This invention also provides a workflow generation system, electronic device, and computer-readable storage medium that solve the corresponding technical problems. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 A flowchart of a workflow generation method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a workflow generation system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an exemplary workflow generation system; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention; Figure 5 This is another structural schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Please see Figure 1 , Figure 1 This is a flowchart of a workflow generation method provided in an embodiment of the present invention.

[0021] An embodiment of the present invention provides a workflow generation method, which may include the following steps: Step S101: Obtain natural language instructions.

[0022] In practical applications, natural language commands can be generated to guide workflow creation under user operation or interaction with smart devices. These commands can include financial data analysis commands, enterprise business process automation commands, cross-system business integration commands, IoT device linkage rule arrangement commands, and intelligent customer service Q&A process commands. For ease of understanding, natural language commands could be, for example, "Push the news announcements and research reports of selected stocks at 8:30 every morning and organize the key content" or "Add search and email sending functions to the Q&A analysis system."

[0023] Step S102: Filter existing workflows associated with natural language instructions.

[0024] In practical applications, considering the universality of the underlying logic of workflows, new workflows can be generated based on existing workflows, thus eliminating the need to generate workflows from scratch and improving workflow generation efficiency. In other words, existing workflows associated with natural language instructions can be filtered, such as filtering existing workflows whose functions are consistent with the types of natural language instructions.

[0025] It should be noted that workflows can be JSON configuration files, etc., and the components required for workflow generation can be flexibly determined according to the application scenario. For example, components can be general components, plugins, sub-workflows, etc. General components can include LLM (Large Language Model) large models, Agent components, MCP (Master Component Protocol) components, conditional branching, branch merging, and looping components. Plugins can include individual stock research report retrieval, financial intraday data retrieval, table export, information search, etc.

[0026] In an exemplary embodiment, during the process of filtering existing workflows associated with natural language instructions, the workflow generation type can be parsed based on the natural language instructions; in response to the workflow generation type being "new", the natural language instructions are broken down into sub-requirements, and existing workflows matching the sub-requirements are filtered from the workflow knowledge base. Existing workflows include historical workflows, workflow fragments, and components. Where i represents the i-th incremental modification, Let S represent the content recalled during the i-th incremental modification, and let S represent the workflow knowledge base. This indicates that the i-th incremental modification is when the knowledge base index is selected. This indicates a specific historical workflow that is being recalled. This indicates a specific workflow segment related to the recall. This indicates a relevant component example for recall; in response to a workflow generation type of "edit," the existing workflow containing the natural language instructions is treated as an existing workflow. This allows for adaptive and targeted filtering of existing workflows through creation or editing, improving the efficiency of existing workflow filtering and laying a foundation for the rapid generation of new workflows.

[0027] Understandably, the workflow knowledge base is used to collect, store, update, and maintain historical workflows built independently by various business groups and generated by AI. Considering that workflow data of different granularities will provide different business perspectives to the large model, which helps improve the model's generation effect, the content stored in the workflow knowledge base can include complete workflows, workflow fragments, and component examples. The storage method can adopt a distributed storage approach combined with a hierarchical heatsink mechanism, that is, the more frequently accessed data, the faster the access speed and the faster the retrieval. Furthermore, the workflow knowledge base can be updated periodically by collecting online feedback data. Feedback data can include workflow execution data and user operation records, etc. Workflow execution data can include call frequency, execution success rate, exception rate, related business, etc., while user operation records can include user reuse and modification of workflow operation records, etc. In addition, components can be managed as needed, such as allowing only extended access, offline update management, multi-version coexistence maintenance, and component metadata description governance. Specifically, for extended access, this can include the expansion of new business components or iterative updates of current component capabilities, which can be managed according to the process of requirement submission, review and approval, unit testing, canary release, and full release. For the coexistence of new and old version components, old version components can be phased out smoothly in batches, and the historical workflows involved in the old components can be updated offline. For component metadata description, it can be updated regularly, and the updated data can include version number, function description, interface parameter protocol, existence of dependencies, and current status of the component.

[0028] Step S103: Convert the existing workflow into initial domain-specific language code.

[0029] In practical applications, directly modifying existing workflows is difficult. To avoid this, existing workflows can be converted into initial Domain Specific Language (DSL) code. For example, the existing workflow can be converted according to a left-to-right and top-to-bottom logic to obtain the initial DSL code. wait, , This represents the current DSL code under the i-th incremental modification. This represents the x-th segment in the DSL code. By adding a DSL language component, component information can be more effectively and standardizedly represented, facilitating understanding by larger models and enabling workflow generation using the DSL code. In other words, this invention requires abstracting and modeling the underlying capabilities of the proprietary platform engine and establishing a domain-specific language as a semantic mapping between natural language instructions and the workflow execution layer, achieving reliable and reversible conversion between natural language instructions, DSL, and workflow.

[0030] It should be noted that the content of the DSL code can be determined based on the component. For example, the DSL code should at least include the following fields: component name (name), function identifier (funcId), node identifier (nodeId), list of preceding node identifiers (preNodeId), list of succeeding node identifiers (nextNodeId), position coordinates (position), and parameter object (param). For ease of understanding, taking the start node in a workflow as an example, the DSL code could be: {"name":"Start","funcid":"startcomponent","nodeid":"","prenodeid":[], "nextnodeid":[""],"position":[],"param":{"variables":[]}}; Taking a functional node in a workflow as an example, the DSL code can be: {"name":"Query XX Company's 2025 Financial Report","funcid":"plugincomponent", "nodeid":"4_plugincomponent","prenodeid":["2_plugincomponent"], "nextnodeid":["5_llmcomponent"],"position":[1800,400], "param":{"toolid":"16255_X","variables":[{"description": "Target Stock Name","value":"["XX Company"]","type":"manual"}]}}.

[0031] Step S104: Generate incremental prompt words based on natural language instructions and initial domain-specific language codes.

[0032] Step S105: Input the incremental prompts into the pre-trained workflow incremental generation large model.

[0033] Step S106: Obtain the incremental domain-specific language code for the output of the large model generated by the workflow incremental generation.

[0034] In practical applications, research on the workflow generation process revealed that workflow adjustment consumes the most time, sometimes reaching 70%. Therefore, it's necessary to reduce the time spent on workflow generation. To achieve this, incremental prompts need to be generated based on natural language instructions and initial domain-specific language (DNS) codes. For example, natural language instructions can be converted into reference DNS codes, and then operations can be performed on both the reference and initial DNS codes to generate incremental prompts. These incremental prompts are then input into a pre-trained workflow incremental generation model, enabling the model to generate incremental DNS codes under the constraints of the prompts. This workflow incremental generation model can be trained using SFT (Supervised Fine-Tuning) on ​​a large language model through 20,000 high-quality synthetic datasets and token expansion.

[0035] In an exemplary embodiment, during the process of generating incremental prompts based on natural language instructions and initial domain-specific language codes, a predefined prompt template can be obtained. The prompt template includes a first token (wf_content) for defining the content of historical workflows, a second token (wf_b_content) for defining the content of workflow segments, a third token (component_content) for defining the content of component examples, and a fourth token (local_workflow_content_X) for defining the current domain-specific language code to be modified. The prompt template can be: #WorkFlow Reference Content ## Workflow Content<wf_content_1> ...<wf_content_2> ; ## Workflow block content<wf_b_content_1> ...<wf_b_content_2> ; ## Workflow Component<compoent_content_1> ...<compoent_content_2> ; # workflow<local_workflow_content_1> ...<local_workflow_content_2> ; Based on natural language instructions and initial domain-specific language codes, the prompt word template is populated to generate incremental prompt words. This allows for targeted differentiation and restriction of specific content, improving the model's processing efficiency.

[0036] To facilitate understanding of incremental domain-specific language code, let's assume the workflow generation type is to complete component parameters. For example, if the function requires completing components to successfully retrieve 300K line data for a certain stock, then the original code would be...<local_workflow_content_2> for

[0037] {"name":"Get 300K line data of a stock","funcId":"httpComponent", "nodeId":"2_httpComponent","preNodeId":["1_startComponent"], "nextNodeId":["3_codeComponent"],"position":[1000,200], "param":{"url":"","method":"POST","header":{"Content-Type": "application / json"},"requestBodyStr":":","stream":false,"outVariables": [{"nodeName":"Get 300K line data of a stock","valueType":"MAP", "description":"HTTP response data","customName":"response_data", "nodeId":"2_httpComponent"}]}}; Revised<local_workflow_content_2> for: {"name":"Get 300K line data of a stock","funcId":"httpComponent", "nodeId":"2_httpComponent","preNodeId":["1_startComponent"], "nextNodeId":["3_codeComponent"],"position":[1000,200], "param":{"url":"https: / / dq.10jqka.com.cn / X","method":"POST", "header":{"Content-Type":"application / json"},"requestBodyStr":"{ "code_list":[{"codes":["1B0300"],"market":"16"}],"trade_class":"intraday", "time_period":"day_1","trade_date":-1,"begin_time":-31,"end_time":0, "adjust_type":"forward","gpid":0}","stream":false,"outVariables":[{ "nodeName":"Get 300K line data for a stock","valueType":"MAP", "description":"HTTP response data","customName":"response_data", "nodeId":"2_httpComponent"}]}}.

[0038] Assuming the workflow involves adding search functionality to a financial Q&A system and sending me an email, the incremental DSL code would be as follows: adding a Bing search component, a direct return component, and an email sending component. Specifically: <local_workflow_content_6>:{"name":"Macroeconomic and Scale Data Query", "funcId":"pluginComponent","nodeId":"3_pluginComponent", "preNodeId":["2_classifyComponent"],"nextNodeId": ["6_branchMergeComponent"],"position":[1800,-200],"param":{"toolId": "16204_X","variables":[{"description":"Enter the query you want to find...", "nodeId":"1_startComponent","key":"question","valueType":"STRING", {"type":"VARIABLE"},{"description":"Security Name or Abbreviation","value":"[]", "type":"MANUAL"}]}},{"name":"Bing Search","funcId":"pluginComponent", "nodeId":"5_pluginComponent","preNodeId":["2_classifyComponent"], "nextNodeId":["6_branchMergeComponent"],"position":[1800,600], "param":{"toolId":"Search","variables":[{"description":"User query...", "nodeId":"1_startComponent","key":"question","valueType":"STRING", "type":"VARIABLE"}]}};<local_workflow_content_9> :{"name": "Large Model Group","funcId":"llmComponent","nodeId":"9_llmComponent", "preNodeId":["6_branchMergeComponent"],"nextNodeId":[ "11_responseComponent","12_pluginComponent"],"position":[3400,0], "param":{"system":"You are a financial analyst, skilled at integrating various financial data and information to generate professional analysis reports. Please generate a structured financial analysis report based on the provided information, including data analysis, market views, and investment advice.","prompt":"Generate a professional financial analysis report based on the following information:\n\nUser questions: 1_startComponent / question / STRING\n\nAnalytical data: 6_branchMergeComponent / X"}},{"name":"Direct return component","funcId":"responseComponent","nodeId":"11_responseComponent","preNodeId":["9_llmComponent"],"nextNodeId":["13_pluginComponent"],"position":[4200,0],"param":{"text":"Financial Analysis Report - 1_startComponent / question / STRING"}},{"name":"Email Sending", "funcId":"pluginComponent","nodeId":"13_pluginComponent","preNodeId": ["11_responseComponent"],"nextNodeId":["14_endComponent"],"position": [5000,0],"param":{"toolId":"3821_Xn","variables":[{"description":"email content", "nodeId":"9_llmComponent","key":"text","valueType":"STRING","type": {"VARIABLE"},{"description":"Recipient's email address","nodeId":"1_startComponent", "key":"email","valueType":"STRING","type":"VARIABLE"},{"description": "Email Subject","nodeId":"11_responseComponent","key":"output", "valueType":"STRING","type":"VARIABLE"},{"description": "Is it Mark...","value":"true","type":"MANUAL"}]}}.

[0039] Step S107: Assemble the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code.

[0040] Step S108: Map the target domain-specific language code to obtain the target workflow.

[0041] In practical applications, after obtaining the incremental domain-specific language code, the initial domain-specific language code and the incremental domain-specific language code can be assembled to obtain the target domain-specific language code; then the target domain-specific language code can be mapped to obtain the target workflow.

[0042] In an exemplary embodiment, the quality of the target domain-specific language code affects the quality of the target workflow. To control the quality of the target workflow, the target domain-specific language code can be evaluated, and adaptive adjustments can be made based on the evaluation results. This involves assembling the initial and incremental domain-specific language codes to obtain the target domain-specific language code, mapping the target domain-specific language code, and before obtaining the target workflow. Furthermore, the target domain-specific language code can undergo business function evaluation, content specification evaluation, and node connection specification evaluation to obtain evaluation results. The business function evaluation can include assessing whether functional requirements are met, checking for component redundancy, checking data flow interface parameter consistency, and checking logical integrity. The content specification evaluation can include checking JSON... The evaluation process includes checking the schema and structure, component data types and value ranges, and external dependency configuration information. Node connection specification evaluation may include checking the uniqueness of node connection identifiers, variable referencing, and required fields. Based on the evaluation results, the completeness of the target domain-specific language code is analyzed. If incomplete, business function issues are analyzed based on the evaluation results, and existing workflows are updated accordingly. The process then returns to the step of converting the existing workflow into the initial domain-specific language code to incrementally modify the workflow and fix business issues. If complete, the process involves mapping the target domain-specific language code to obtain the target workflow.

[0043] In specific application scenarios, after analyzing whether the target domain-specific language code is complete based on the evaluation results, if it is incomplete and the evaluation results indicate non-business function problems, structural error repair can be performed on the target domain-specific language code; then return to the steps of evaluating the business function, content specification, and node connection specification of the target domain-specific language code.

[0044] In an exemplary embodiment, workflow links can be optimized through a self-iterative approach. This allows operations personnel to focus on building test data for boundary cases, enhancing the coverage of the self-generated test set of the large model, and further improving workflow effectiveness while reducing operational labor costs. Based on this, after mapping the target domain-specific language code to obtain the target workflow, a business test set can be generated. This business test set covers the main process, target business anomaly scenarios, boundary scenarios, and functional tests. Target business anomaly scenarios can include ambiguous user questions, user follow-up questions, and loss of context in multi-turn dialogues. Boundary scenarios can include empty input, special characters, and excessively long text. Functional tests can include testing whether feedback / correction mechanisms are available, and whether secondary queries or generation are supported. The target workflow is imported into the workflow platform, and the business test set is used to verify the workflow platform's process execution. During this process, a pass / fail condition can be set when the execution success rate is above 95%. Based on the verification results, the target workflow is optimized, including functional optimization and business boundary issue repair, resulting in an optimized workflow. Based on online business testing, the deployment time for complex workflows can be reduced from one week to less than one day.

[0045] In an exemplary embodiment, to facilitate user awareness of the workflow generation quality, the target domain-specific language code is mapped to obtain the target workflow. After obtaining the target workflow, its effectiveness can be evaluated to obtain performance metrics, including first-time generation executability rate, first-time execution success availability rate, first-time availability rate, second-time repair executability rate, second-time execution success availability rate, and second-time availability rate. A business evaluation is also performed on the target workflow to obtain business metrics, including workflow generation time and workflow generation cost. Based on the performance metrics and business metrics, a quality assessment result for the target workflow is generated. Of course, the workflow generation process can also be adjusted based on the quality assessment result of the target workflow, such as adjusting the domain-specific language code type, incremental prompt word template, and workflow incremental generation model, to further improve the quality of workflow generation.

[0046] In specific application scenarios, the first-time generation executability rate in this invention refers to the success rate of generating configuration files that can complete the task without errors when no test module is connected; the first-time execution success availability rate refers to the percentage of successful executions that meet business requirements in all successful executions; the first-time availability rate refers to the percentage of successful executions that meet business requirements in all generation processes; the second-time repair executability rate refers to the success rate of generating configuration files that can complete the task without errors when a test module is connected; the second-time execution success availability rate refers to the percentage of successful executions that meet business requirements in all successful executions when a test module is connected; the second-time availability rate refers to the percentage of successful executions that meet business requirements in all generation processes when a test module is connected; the workflow generation time refers to the total time spent generating the workflow from end to end; the workflow generation cost refers to the total amount of preceding and following text consumed by the large model, and different large language models can be calculated separately.

[0047] This invention provides a workflow generation method, which includes: acquiring natural language instructions; filtering existing workflows associated with the natural language instructions; converting the existing workflows into initial domain-specific language (DNS) code; generating incremental prompts based on the natural language instructions and the initial DNS code; inputting the incremental prompts into a pre-trained workflow incremental generation model; acquiring the incremental DNS code output by the workflow incremental generation model; assembling the initial DNS code and the incremental DNS code to obtain target DNS code; and mapping the target DNS code to obtain the target workflow. The beneficial effects of this invention are as follows: Converting existing workflows into initial domain-specific language (DSM) code can compress the workflow content length, with an online compression ratio of 45%. Simultaneously, it isolates the model from platform-specific configuration formats, improving generalization. Then, in the generation of the target DSM code, incremental prompts guide the incremental generation of the large workflow model, ensuring that each adjustment only requires outputting incremental DSM code, eliminating the need for the complete DSM code. This reduces the length of the generated content; online statistics show that the generated content is on average only about 20% of the full amount. Finally, applying the incremental DSM code to generate the target workflow allows for incremental generation at the DSM code level, using the existing workflow as a benchmark. This reduces the generation time from an average of 5 minutes to approximately 20-30 seconds, improving workflow generation efficiency.

[0048] Please see Figure 2 , Figure 2 This is a schematic diagram of a workflow generation system provided in an embodiment of the present invention.

[0049] An embodiment of the present invention provides a workflow generation system, which may include: Instruction acquisition module 101 is used to acquire natural language instructions; Workflow filtering module 102 is used to filter existing workflows associated with natural language commands; Code mapping module 103 is used to convert existing workflows into initial domain-specific language code; The prompt word generation module 104 is used to generate incremental prompt words based on natural language instructions and initial domain-specific language codes; Input module 105 is used to input incremental prompts into a pre-trained workflow incremental generation model; The incremental code acquisition module 106 is used to acquire incremental domain-specific language code for the output of the large model generated by the workflow incremental generation. Assembly module 107 is used to assemble the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code; Workflow mapping module 108 is used to map target domain-specific language code to obtain the target workflow.

[0050] This invention provides a workflow generation system, in which the workflow filtering module can: The type parsing unit is used to parse the workflow generation type based on natural language instructions; The new unit is used to respond to the workflow generation type as new, and then the natural language instructions are broken down into sub-requirements. In the workflow knowledge base, existing workflows that match the sub-requirements are filtered. Existing workflows include historical workflows, workflow fragments and components. The editing unit is used to treat the existing workflow of natural language instructions as an existing workflow in response to the workflow generation type being edit.

[0051] An embodiment of the present invention provides a workflow generation system, wherein the prompt word generation module may include: The template acquisition unit is used to acquire the set prompt word template. The prompt word template includes a first token for limiting the content of the historical workflow, a second token for limiting the content of the workflow segment, a third token for limiting the content of the component example, and a fourth token for limiting the domain-specific language code to be modified. The prompt word generation unit is used to fill in the prompt word template based on natural language instructions and initial domain-specific language codes to generate incremental prompt words.

[0052] The workflow generation system provided in this embodiment of the invention may further include: The code evaluation module is used to assemble the initial domain-specific language code and incremental domain-specific language code into the target domain-specific language code. After that, the workflow mapping module maps the target domain-specific language code into the target workflow. Before that, the target domain-specific language code is evaluated for business functions, content specifications, and node connection specifications to obtain the evaluation results. The code analysis module is used to analyze whether the target domain-specific language code is complete based on the evaluation results. If it is incomplete, it analyzes business function problems based on the evaluation results and updates the existing workflow, and returns to execute the step of converting the existing workflow into the initial domain-specific language code. If it is complete, it executes the step of mapping the target domain-specific language code to obtain the target workflow.

[0053] The workflow generation system provided in this embodiment of the invention includes a code analysis module that is further configured to: analyze whether the target domain-specific language code is complete based on the evaluation results; if it is incomplete and the evaluation results indicate non-business function problems, then perform structural error repair on the target domain-specific language code; and return to execute the steps of evaluating the business function, content specification, and node connection specification of the target domain-specific language code.

[0054] The workflow generation system provided in this embodiment of the invention may further include: The test suite generation module is used by the workflow mapping module to map the target domain-specific language code to obtain the target workflow. Based on the target workflow, a business test suite is generated, which covers the main process, target business exception scenarios, boundary scenarios, and functional tests. The verification module is used to import the target workflow into the workflow platform and use the business test set to verify the workflow platform's process execution and obtain the verification results. The optimization module is used to optimize the target workflow based on the verification results, resulting in an optimized workflow.

[0055] The workflow generation system provided in this embodiment of the invention may further include: The performance evaluation module is used by the workflow mapping module to map the target domain-specific language code to obtain the target workflow. After obtaining the target workflow, the performance evaluation of the target workflow is performed to obtain performance indicators, including the first generation executability rate, the first execution success availability rate, the first availability rate, the second repair executability rate, the second execution success availability rate, and the second availability rate. The business evaluation module is used to evaluate the target workflow and obtain business metrics, including workflow generation time and workflow generation cost. The quality assessment module is used to generate quality assessment results for the target workflow based on performance indicators and business indicators.

[0056] It should be noted that the results of the workflow generation system of this invention can be flexibly adjusted as needed, as long as the workflow generation scheme of this invention can be implemented. For example, the workflow generation system can be as follows: Figure 3 As shown, the framework includes a core intelligent agent, a component governance module, a workflow knowledge base module, an underlying semantic mapping module, and a workflow testing module. The core intelligent agent is the core module of the complex intelligent agent framework, responsible for user requirement decomposition and planning, requirement planning, knowledge base retrieval, DSL evaluation, DSL generation / incremental generation, and planning exit. The component governance module is responsible for underlying component governance, maintaining and updating the standard components, plugins, and sub-workflows needed for workflow generation (hereinafter referred to as components). The workflow knowledge base stores historical workflows and maintains and updates the backflow of online workflow data for easy recall during generation. The underlying semantic mapping module is responsible for underlying semantic mapping, introducing an intermediate DSL language to convert the platform's workflow configuration files into a language more understandable to the larger model. The workflow testing module is responsible for test case generation and testing, workflow execution testing, and workflow optimization. It should be noted that the workflow testing module can be configured during complex workflow generation to improve generation quality; however, if the online service requires high performance and low latency, this step can be skipped.

[0057] This invention also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of the workflow generation method provided in the embodiments of this invention. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0058] An electronic device provided by an embodiment of the present invention includes a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the workflow generation method described in any of the above embodiments.

[0059] Please see Figure 5Another electronic device provided in this embodiment of the invention may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the electronic device and the outside. The display unit 204 may be a display panel, a laser scanning display, etc.; the communication methods adopted by the communication module 205 include, but are not limited to, Mobile High-Definition Link (MHL), Universal Serial Bus (USB), High-Definition Multimedia Interface (HDMI), wireless connectivity: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and communication technology based on IEEE 802.11s.

[0060] The present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the workflow generation method described in any of the above embodiments.

[0061] The computer-readable storage media involved in this invention include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (compact disc read-only memory), or any other form of storage media known in the art.

[0062] The present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the workflow generation method described in any of the above embodiments.

[0063] For descriptions of relevant parts of the workflow generation system, electronic device, and computer-readable storage medium provided in this embodiment of the invention, please refer to the detailed description of the corresponding parts in the workflow generation method provided in this embodiment of the invention, which will not be repeated here. Furthermore, parts of the technical solutions provided in this embodiment of the invention that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0064] 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.

[0065] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. 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 the invention. Therefore, the invention 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 workflow generation method, characterized in that, include: Obtain natural language commands; Filter existing workflows associated with natural language instructions; Convert existing workflows into initial domain-specific language code; Incremental prompts are generated based on natural language instructions and the initial domain-specific language code; The incremental prompts are input into a pre-trained workflow incremental generation large model; Obtain incremental domain-specific language code for generating large model output from workflow increments; The initial domain-specific language code and the incremental domain-specific language code are assembled to obtain the target domain-specific language code; Mapping the target domain-specific language code yields the target workflow.

2. The workflow generation method according to claim 1, characterized in that, Filter existing workflows associated with natural language instructions, including: The workflow generation type is parsed based on natural language instructions; In response to the workflow generation type being "new", the natural language instructions are broken down into sub-requirements. In the workflow knowledge base, existing workflows that match the sub-requirements are filtered out. Existing workflows include historical workflows, workflow fragments, and components. If the workflow generation type is edit, the existing workflow of the natural language instructions will be used as the existing workflow.

3. The workflow generation method according to claim 2, characterized in that, Based on the natural language instructions and the initial domain-specific language code, incremental prompt words are generated, including: Obtain the set prompt word template, which includes a first token for limiting the content of historical workflows, a second token for limiting the content of workflow segments, a third token for limiting the content of component examples, and a fourth token for limiting the domain-specific language code to be modified. Based on the natural language instructions and the initial domain-specific language code, the prompt word template is filled in to generate incremental prompt words.

4. The workflow generation method according to claim 1, characterized in that, After assembling the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code, and before mapping the target domain-specific language code to obtain the target workflow, the process further includes: The business function evaluation, content specification evaluation, and node connection specification evaluation of the target domain-specific language code are carried out to obtain the evaluation results. Based on the evaluation results, analyze whether the target domain-specific language code is complete; If incomplete, analyze the business function problems based on the evaluation results and update the existing workflow, then return to the step of converting the existing workflow into the initial domain-specific language code; If complete, the steps of mapping the target domain-specific language code to obtain the target workflow are executed.

5. The workflow generation method according to claim 4, characterized in that, After analyzing whether the target domain-specific language code is complete based on the evaluation results, the following steps are also included: If the evaluation is incomplete and the evaluation results represent non-business function problems, then structural error repair should be performed on the target domain-specific language code. Return to the steps of performing business function evaluation, content specification evaluation, and node connection specification evaluation on the target domain-specific language code.

6. The workflow generation method according to claim 1, characterized in that, After mapping the target domain-specific language code to obtain the target workflow, the following steps are also included: Based on the target workflow, a business test suite is generated, which covers the main process, target business exception scenarios, boundary scenarios, and functional tests. Import the target workflow into the workflow platform, and use the business test set to verify the workflow platform's process execution, and obtain the verification results. Based on the verification results, the target workflow is optimized to obtain an optimized workflow.

7. The workflow generation method according to claim 1, characterized in that, After mapping the target domain-specific language code to obtain the target workflow, the following steps are also included: The target workflow is evaluated to obtain performance indicators, which include first-time generation executability rate, first-time execution success availability rate, first-time availability rate, second-time repair executability rate, second-time execution success availability rate, and second-time availability rate. The target workflow is evaluated to obtain business metrics, which include workflow generation time and workflow generation cost. Based on the performance metrics and business metrics, generate the quality assessment results for the target workflow.

8. A workflow generation system, characterized in that, include: The instruction acquisition module is used to acquire natural language instructions; The workflow filtering module is used to filter existing workflows associated with natural language commands; The code mapping module is used to convert existing workflows into initial domain-specific language code; The prompt word generation module is used to generate incremental prompt words based on natural language instructions and the initial domain-specific language code; The input module is used to input the incremental prompts into a pre-trained workflow incremental generation model; The incremental code acquisition module is used to acquire incremental domain-specific language code for the output of the large model generated by the workflow incremental generation. An assembly module is used to assemble the initial domain-specific language code and the incremental domain-specific language code to obtain the target domain-specific language code; The workflow mapping module is used to map target domain-specific language code to obtain the target workflow.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the workflow generation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the workflow generation method as described in any one of claims 1 to 7.