Process template generation method and device, electronic equipment and storage medium

By transforming natural language requirements into structured logical descriptions through a large language model, and generating and adjusting BPMN-compliant process templates, the problem of low efficiency in process template generation and poor flexibility in adjustment in existing technologies is solved, and efficient and accurate automated generation and adjustment of process templates is achieved.

CN121960424APending Publication Date: 2026-05-01DUOYI NETWORK CO LTD +2
View PDF 0 Cites 2 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DUOYI NETWORK CO LTD
Filing Date
2026-01-14
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing technologies, process template generation is inefficient, lacks flexibility in adjustment, and has a high threshold for collaboration, resulting in long development cycles, high error rates, and difficulty in timely problem detection. Non-technical personnel find it difficult to participate in process design.

Method used

By acquiring users' process generation requirements, the system uses a pre-defined large language model to transform natural language descriptions into structured logical descriptions, generating process templates that conform to BPMN specifications. The system then uses validation plugins and the large language model for adjustments until the templates pass rule validation. Combined with automatic layout algorithms and process engine detection, the system achieves automated generation and adjustment of process templates.

Benefits of technology

It improves the efficiency and accuracy of process template generation, reduces development cycle, reduces error rate, lowers the collaboration threshold, enables non-technical personnel to participate in process design, and supports dynamic adjustment and automated repair.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121960424A_ABST
    Figure CN121960424A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a process template generation method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining a process generation demand of a user, and determining structured process logic description information based on the process generation demand, a preset process design cue word and a preset large language model; generating cue words and a preset large language model based on the process logic description information, a preset process template, and determining a first process template required by the user; performing rule verification on the first process template based on a preset verification plug-in, and determining a verification result; and if the verification result is that the verification is not passed, adjusting the first process template by utilizing a preset large language model, and determining a second process template required by the user. Through the technical scheme of the embodiment of the invention, the executable process template can be directly generated according to the demand described by the natural language, the node attribute and the logic relationship do not need to be manually configured, and the generality, the efficiency and the accuracy of the process template generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, electronic device, and storage medium for generating process templates. Technical Field

[0001] The embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a process template generation method, apparatus, electronic device and storage medium. Background Technology

[0002] In the current software development environment, business process construction mainly relies on process engine developers manually writing processes or manually configuring complex flow rules. However, this approach has many shortcomings:

[0003] (1) Low development efficiency: Traditional process design requires developers to have a deep understanding of the syntax rules of the underlying engine, which not only leads to a long development cycle, but also makes it easy to make mistakes in the process of writing the process and makes it impossible to detect them in time.

[0004] (2) Poor flexibility in adjustment: Once business requirements change, it is often necessary to rewrite the process, rather than dynamically adjusting the process based on the existing process;

[0005] (3) High collaboration threshold: It is difficult for non-technical personnel to participate directly in the process design work, which greatly increases the communication cost between different roles and affects the efficiency of project progress.

[0006] Therefore, there is an urgent need for a method that can intelligently generate process templates. Summary of the Invention

[0007] This invention provides a process template generation method, apparatus, electronic device, and storage medium that can directly generate executable process templates based on natural language descriptions, without the need for manual configuration of node attributes and logical relationships, thereby improving the versatility, efficiency, and accuracy of process template generation.

[0008] In a first aspect, embodiments of the present invention provide a method for generating a process template, comprising:

[0009] Obtain the user's process generation requirements, and determine the structured process logic description information based on the process generation requirements, preset process design prompts and preset large language models;

[0010] Based on the process logic description information, the preset process template generated prompt words, and the preset large language model, the first process template required by the user is determined.

[0011] The first process template is validated according to rules based on a preset validation plugin to determine the validation result.

[0012] If the verification result is that the verification fails, the first process template is adjusted using a preset large language model to determine the second process template required by the user.

[0013] Optionally, the method further includes: obtaining verification exception information corresponding to the verification result; and determining the second process template required by the user based on the process generation requirements, the process logic description information, the first process template, the verification exception information, preset process diagnostic prompts, and preset large language model.

[0014] Optionally, the method further includes: determining the positional relationship of each node in the second process template based on the front-end automatic layout algorithm and the second process template, and rendering the process on the front end based on the positional relationship of each node to determine the flowchart corresponding to the second process template.

[0015] Optionally, the method further includes: generating test cases corresponding to the second process template using a preset large language model; when deploying the second process template that has passed the test cases to the Camunda engine, detecting the deployed second process template through the Camunda engine to obtain a detection result; if the detection result is a failure, generating a diagnostic result corresponding to the detection result using the preset large language model, and rendering the diagnostic result to the flowchart on the front end so that the user can click to view and perform repair operations based on the diagnostic result.

[0016] Optionally, the method further includes: translating prompt words based on a preset process template, the second process template, and a preset large language model to determine natural language description information corresponding to the second process template; and generating prompt words based on the second process template, the natural language description information, preset test cases, and the preset large language model to determine test cases corresponding to the second process template.

[0017] Optionally, the method further includes: obtaining detection anomaly information corresponding to the detection result; retrieving knowledge base retrieval results similar to the detection anomaly information in a preset knowledge base; and determining the diagnostic result corresponding to the detection result based on the detection anomaly information, the second process template, the knowledge base retrieval results, preset process diagnostic prompts, and a preset large language model.

[0018] Secondly, embodiments of the present invention also provide a process template generation apparatus, the apparatus comprising:

[0019] The process logic description information determination module is used to obtain the user's process generation requirements, and determine the structured process logic description information based on the process generation requirements, preset process design prompts and preset large language models.

[0020] The first process template determination module is used to determine the first process template required by the user based on the process logic description information, the preset process template generated prompt words and the preset large language model.

[0021] The verification result determination module is used to perform rule verification on the first process template based on a preset verification plugin and determine the verification result.

[0022] The second process template determination module is used to adjust the first process template using a preset large language model if the verification result is that the verification fails, and determine the second process template required by the user.

[0023] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising:

[0024] One or more processors;

[0025] Memory, used to store one or more programs;

[0026] When the one or more programs are executed by the one or more processors, the one or more processors implement the process template generation method provided in any embodiment of the present invention.

[0027] Fourthly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the process template generation method as provided in any embodiment of the present invention.

[0028] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the process template generation method provided in any embodiment of the present invention.

[0029] The technical solution of this invention obtains the user's process generation requirements and, based on these requirements, preset process design prompts, and a preset large language model, determines structured process logic description information. This transforms the user's natural language descriptions into structured information more accurately understood by the preset large language model, providing accurate foundational information for subsequent process template generation and improving efficiency and accuracy. Based on the process logic description information, preset process template generation prompts, and the preset large language model, a first process template required by the user is determined. A preset validation plugin performs rule validation on the first process template, determining the validation result, allowing process templates that pass the rule validation to be directly output. If the validation result is a failure, the preset large language model is used to adjust the first process template to determine a second process template required by the user. This allows for direct adjustments to the existing process template to obtain a new one when a process template fails rule validation or business requirements change, eliminating the need to rewrite the process and improving the efficiency of process template generation and adjustment.

[0030] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

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

[0032] Figure 1 is a flowchart of a process template generation method provided in Embodiment 1 of the present invention;

[0033] Figure 2 is a flowchart of a process template generation method provided in Embodiment 2 of the present invention;

[0034] Figure 3 is a schematic diagram of a process template generation device provided in Embodiment 3 of the present invention;

[0035] Figure 4 is a schematic diagram of the structure of an electronic device that implements the process template generation method of this invention. Detailed Implementation

[0036] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0038] Example 1

[0039] Figure 1 is a flowchart of a process template generation method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where process templates are intelligently generated based on user-submitted requirements. This method can be executed by a process template generation device, which can be implemented in hardware and / or software and can be configured in an electronic device. As shown in Figure 1, the method includes:

[0040] S110. Obtain the user's process generation requirements, and based on the process generation requirements, preset process design prompts, and preset large language model, determine the structured process logic description information.

[0041] In this embodiment of the disclosure, process generation requirements can refer to user requirements described using natural language. Process generation requirements can be a user's expected description of a business process. Non-professional developers can also use process generation requirements and the methods of this embodiment to obtain the desired process template. For example, a process generation requirement could be a "leave application process." Preset process design prompts can refer to pre-set prompts that guide a pre-defined large language model to structure the requirements described in natural language. For example, a preset process design prompt could be for a process design expert (a functional module): "You are an expert proficient in the Camunda process engine and BPMN 2.0 specifications. Please generate a detailed, structured process logic description based on user requirements…".

[0042] In this embodiment, the pre-defined large language model can be used to realize the conversion and reasoning from natural language to structured data, from structured data to process templates (i.e., BPMN XML), and from process templates to test cases. The pre-defined large language model can include, but is not limited to, generative models such as GPT, Llama, and Claude. Process logic description information can refer to the result of structuring the requirements described in natural language. Process logic description information can be structured language (StructuredDescription). Process logic description information can be an intermediate product generated by LLM, describing the process logic in natural language while preserving the node relationship structure. Process logic description information can be used as a bridge between requirements described in natural language and process templates. For example, process logic description information can be "Node 1: [Start Event]". Node 2: [User Task: Submit Application] Node 3: [Exclusive Gateway: Approved?]

[0043] Specifically, the process generation requirements of the user are obtained. These requirements, along with preset process design prompts, are input into a preset large language model for structured processing. Based on the model output, a structured description of the process logic is obtained.

[0044] For example, upon receiving the process logic description information output by the model, this information can be sent to the front end for the user to review. The user can then verify the LLM-generated process description and confirm that the LLM understands the requirements correctly. The back end can then generate a process template based on this verified understanding. If the user finds that the LLM misunderstands the requirements, they can adjust the process logic description information on the front end. The back end will then use this adjusted (correctly understood) description to generate the process template, further improving the accuracy of the generated template.

[0045] It should be noted that all preset prompts (such as preset process design prompts, preset process template generation prompts, etc.) in the technical solutions of this invention are system prompts. Other content input into the preset Large Language Model along with system prompts is user prompt. Specifically, highly specialized system prompts can be pre-designed for different functional modules to precisely control the behavior and output format of the LLM. For example, system prompts can be used to define exclusive LLM roles and task instructions for each core function. System prompts can refer to the role configuration instructions of the preset Large Language Model (LLM), used to constrain model behavior and enhance professionalism. For example, a system prompt could be "You are a Camunda process engine expert and must strictly follow the BPMN 2.0 specification to generate XML templates...". User prompts can refer to the requirement description text submitted by the user to the LLM, used to drive the generation of target content. For example, a user prompt could be "Design a leave application process: Employee submits..." Department manager approval HR Archives.

[0046] S120: Based on the process logic description information, preset process templates, and preset large language models, generate prompt words and determine the first process template required by the user.

[0047] In this embodiment, the preset process template generation prompt can refer to a pre-set prompt that guides the preset large language model to generate a process template based on structured requirements. For example, the preset process template generation prompt could be for the BPMN template generator: "You are a Camunda process engine expert. Please strictly follow the BPMN 2.0 specification and generate a clean XML process template without layout information based on the provided structured description...". The first process template can refer to a process template generated in accordance with the BPMN 2.0 specification and meeting user requirements. BPMN (Business Process Model and Notation) can refer to a business process modeling and notation language, an international standard modeling language used to define and execute business processes. BPMN can be used to describe process nodes, events, and flow rules through graphical symbols, supporting the automated execution of the process engine. For example, the "application" in a leave application process. Review "Approval" logic chain.

[0048] In this embodiment of the invention, all process templates (such as the first process template, the second process template, etc.) can be XML files conforming to the BPMN 2.0 specification, used to define the nodes, events, and flow rules of the business process. To ensure logical integrity, the process templates may include necessary elements such as node IDs, sequence flows, and gateway conditions. The XML does not contain rendering-related data such as node coordinates (rendering is handled independently by the front end). For example, a process template could be as follows:

[0049] .

[0050] Specifically, the process logic description information and preset process template generation prompts are input into a preset large language model, so that the preset large language model can generate a process template according to user needs. Based on the model output, a first process template that meets the user's needs is obtained.

[0051] S130. Perform rule verification on the first process template based on the preset verification plugin, and determine the verification result.

[0052] In this embodiment, the preset verification plugin can refer to a software component specifically designed to verify the structural correctness of the process template. The preset verification plugin can perform preliminary rule checks on the syntax and static structure of the process template (i.e., the BPMN XML file itself). The preset verification plugin can be used for verification of node ID compliance, orphan node detection, and gateway condition completeness, etc. The verification result can refer to the compliance verification result for the syntax and static structure of the first process template. The verification result can be either verification failed or verification passed.

[0053] Specifically, the backend uses a preset validation plugin to check the compliance of multiple aspects of the first process template XML generated by the LLM, and obtains the validation result corresponding to the first process template. If the validation result is successful, the first process template is used as the second process template, so that test cases and deployment process templates can be generated for the second process template in the future.

[0054] S140. If the verification result is that the verification fails, the first process template is adjusted using the preset large language model to determine the second process template required by the user.

[0055] In this embodiment of the disclosure, the second process template may refer to a process template that conforms to the verification rules after being adjusted based on the first process template.

[0056] Specifically, if the verification result is a failure, the first process template is adjusted using a preset large language model to determine candidate process templates. Rule-based verification is performed on the candidate process templates based on a preset verification plugin to determine the corresponding verification result. If the verification result for a candidate process template is a failure, the candidate process template is adjusted using the preset large language model to obtain an adjusted candidate process template. This process continues until the verification result of a candidate process template passes, or the preset number of adjustments is reached, at which point the candidate process template is adopted as the second process template required by the user.

[0057] As an optional implementation of this disclosure, adjusting the first process template using a preset large language model to determine the second process template required by the user may specifically include: obtaining the verification exception information corresponding to the verification result; and determining the second process template required by the user based on the process generation requirements, process logic description information, the first process template, verification exception information, preset process diagnostic prompts, and the preset large language model.

[0058] In this embodiment of the disclosure, the verification anomaly information may refer to the specific reasons why the process template failed the rule verification and / or the anomalies detected. The preset process diagnostic prompt words may refer to the pre-set prompt words that guide the preset large language model to repair the problems that occurred in the process template.

[0059] Specifically, the verification anomaly information corresponding to the verification result is obtained. The process generation requirements, process logic description information, first process template, verification anomaly information, and preset process diagnostic prompts are input into a preset large language model to repair anomalies in the process template. A second process template with anomaly repair is obtained based on the model output.

[0060] The technical solution of this invention obtains the user's process generation requirements and, based on these requirements, preset process design prompts, and a preset large language model, determines structured process logic description information. This transforms the user's natural language descriptions into structured information more accurately understood by the preset large language model, providing accurate foundational information for subsequent process template generation and improving efficiency and accuracy. Based on the process logic description information, preset process template generation prompts, and the preset large language model, a first process template required by the user is determined. A preset validation plugin performs rule validation on the first process template, determining the validation result so that process templates that pass the rule validation can be directly output. If the validation result is a failure, the preset large language model is used to adjust the first process template to determine a second process template required by the user. This allows for direct adjustments to the existing process template to obtain a new one when a process template fails rule validation or business requirements change, eliminating the need to rewrite the process and improving the efficiency of process template generation and adjustment.

[0061] As an optional implementation of this disclosure, the method further includes: determining the positional relationship of each node in the second process template based on the front-end automatic layout algorithm and the second process template, and rendering the process on the front end based on the positional relationship of each node to determine the flowchart corresponding to the second process template.

[0062] In this embodiment of the disclosure, the automatic layout algorithm can refer to a computer algorithm that automatically calculates and optimizes the node positions and connection paths in a BPMN diagram. The automatic layout algorithm can be used to convert BPMN XML containing only logical information into a visually clear and aesthetically pleasing flowchart. The flowchart can refer to a visual and interactive graphical representation rendered in the front-end interface based on the BPMN standard and the automatic layout results.

[0063] Specifically, the second process template is sent to the front end, allowing the front end to determine and adjust the positional relationships of each node in the second process template using an automatic layout algorithm. This eliminates the need for manual configuration of node attributes and logical relationships. The front end renders the process based on the positional relationships of each node, determining the corresponding flowchart for the second process template. This results in a more logical layout of the rendered process template, ensuring nodes do not overlap or have reversed order. This setup decouples layout from logic (generating the business logic (XML definition) of the process template and the visual layout (front end rendering) step-by-step), generating a pure logic template without layout information. The front end's dedicated tools (such as auto-bpmn-layout) independently optimize the layout and rendering, avoiding AI layout chaos and preventing LLM from generating chaotic node coordinates.

[0064] For example, users can proofread the visual flowchart displayed on the front end. If the proofreading fails, they can modify the process generation or process logic description information and re-execute the aforementioned steps based on the modified process generation requirements or process logic description information to determine the second process template. They can also use LLM to adjust the second process template based on the user-annotated reasons for the anomalies, thereby achieving visual proofreading and making modifications based on the proofreading results.

[0065] Example 2

[0066] Figure 2 is a flowchart of a process template generation method provided in Embodiment 2 of the present invention. This embodiment, based on the above embodiments, provides a detailed description of the process of test case generation and process template deployment. Explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here. As shown in Figure 2, the method includes:

[0067] S210. Obtain the user's process generation requirements, and based on the process generation requirements, preset process design prompts, and preset large language model, determine the structured process logic description information.

[0068] S220: Based on the process logic description information, preset process templates, and preset large language models, generate prompt words and determine the first process template required by the user.

[0069] S230. Perform rule verification on the first process template based on the preset verification plugin, and determine the verification result.

[0070] S240. If the verification result is that the verification fails, the first process template is adjusted using the preset large language model to determine the second process template required by the user.

[0071] S250. Generate test cases corresponding to the second process template using a preset large language model.

[0072] In this embodiment of the disclosure, a test case can refer to a set of verification schemes designed for a specific business process template, used to systematically verify whether the process can be executed correctly and produce the expected results under various scenarios. For example, test cases can be used to test the behavior and dynamic logic of a process instance (i.e., the performance of the process after it runs). Test cases can be designed for a specific process template, containing clear operation steps and verification points, and covering test cases for various scenarios such as normal, abnormal, and boundary conditions.

[0073] Specifically, guided by prompts, the pre-defined large language model generates test cases covering various scenarios, including normal, abnormal, and boundary scenarios, based on a thorough analysis of the second process template. These test cases include clearly defined operation steps and verification points. The test cases corresponding to the second process template are obtained from the model output. This setup achieves bidirectional reversible parsing, meaning the LLM translates the XML template back into a structured natural language description, ensuring a strict correspondence between test cases and process logic. It also enhances branch coverage by traversing the parallel / conditional branches of the process through the LLM inference engine to generate boundary scenario test cases (such as timeouts and abnormal paths). This solves the problem of missing test cases in complex processes, improving test coverage to nearly 100%.

[0074] As an optional implementation of this disclosure, generating test cases corresponding to the second process template using a preset large language model may specifically include: translating prompt words based on the preset process template, the second process template, and the preset large language model to determine the natural language description information corresponding to the second process template; and generating prompt words based on the second process template, the natural language description information, the preset test cases, and the preset large language model to determine the test cases corresponding to the second process template.

[0075] In this embodiment, the preset process template translation prompt can refer to a pre-set prompt that guides the preset large language model to accurately translate the process template into an easily understandable structured natural language description. For example, the preset process template translation prompt could be for a BPMN translator: "You are a process interpretation expert. Please accurately translate the following BPMN 2.0 XML process template into an easily understandable structured natural language description, preserving node relationships and logic...". The natural language description information can refer to the structured natural language description that is easily understood by the model after the second process template is translated. The preset test case generation prompt can refer to a pre-set prompt that guides the preset large language model to analyze the process template, deduce and generate detailed test cases covering all possible branch paths (including normal, abnormal, and boundary conditions). For example, the preset test case generation prompt could be for a test case generator: "You are a Camunda process engine testing expert. Please analyze the following process template, deduce and generate detailed test cases covering all possible branch paths (including normal, abnormal, and boundary conditions)...".

[0076] Specifically, the preset process template translation prompts and the second process template are input into a preset large language model, which translates the second process template into a structured natural language description. The natural language description information corresponding to the second process template is obtained based on the model output. Users can check the natural language description information generated by the LLM to confirm whether the LLM's understanding of the process is correct. If there are errors, users can fine-tune it themselves. The second process template, natural language description information, and preset test case generation prompts are input into the preset large language model, which analyzes the process template, derives, and generates detailed test cases covering all possible branch paths (including normal, abnormal, and boundary conditions). The test cases corresponding to the second process template are obtained based on the model output.

[0077] For example, the test cases generated by LLM can be converted into an Excel spreadsheet for users to download.

[0078] S260. When the second process template that has passed the test cases is deployed to the Camunda engine, the Camunda engine will test the deployed second process template and obtain the test results.

[0079] For example, a process engine can refer to any software system component capable of parsing and executing the BPMN 2.0 standard. Process engines can include, but are not limited to, Camunda, Activiti, Flowable, jBPM, etc.

[0080] In this embodiment, the Camunda engine can refer to a core component of a process management service implemented based on the BPMN protocol. The Camunda engine is responsible for starting process instances, tracking execution status, and controlling node flow. It can also be used to detect the syntax and static structure of process templates. Compared to preset validation plugins, the Camunda engine's validation is more in-depth and comprehensive. The validation result can refer to a structured validation report returned by the Camunda engine after performing a deep validation of the process template during deployment, including whether the deployment was successful and detailed error information.

[0081] Specifically, when the second process template, which has passed the test cases, is deployed to the Camunda engine, the Camunda engine performs checks on the deployed second process template and obtains the results. The checks may include, but are not limited to, syntax checks (such as strict BPMN 2.0 XSD validation), semantic checks (such as process integrity and gateway balance), expression checks (such as EL expression syntax and variable references), resource checks (such as user / group existence and service references), and extended attributes (such as Camunda-specific attribute validation). If the checks pass, the second process template is successfully deployed. Once deployed and running, the process template is officially online and generates actual business data. The generated actual business data is continuously monitored and collected.

[0082] S270. If the detection result is "detection failed", a diagnostic result corresponding to the detection result is generated using a preset large language model, and the diagnostic result is rendered in the flowchart on the front end so that the user can click to view and perform repair operations based on the diagnostic result.

[0083] In this embodiment, the diagnostic result may refer to the detection results of a preset large language model based on the Camunda engine, analyzing and generating business-level problem explanations and specific remediation solutions. The diagnostic result can be presented to the user after front-end visualization rendering. The diagnostic result may include the cause of the problem and the remediation strategy.

[0084] Specifically, if the detection result is "detection failed," the corresponding detection anomaly information is obtained. This anomaly information, the second process template, and preset process diagnostic prompts are then input into a preset large language model (LLM) to enable the LLM to accurately locate the problem node and provide a repair solution. The diagnostic result corresponding to the detection result is obtained based on the model output. The prompts guide the LLM to wrap the problematic node with a special HTML tag. The front-end renders the result generated by the LLM and adds a click event to the node wrapped in the special HTML tag. When the user clicks, the focus is directly applied to the problematic node.

[0085] For example, the system can automatically modify based on the diagnostic results (such as using LLM repair), or the user can perform repairs based on the diagnostic results.

[0086] As an optional implementation of this disclosure, generating a diagnostic result corresponding to the detection result using a preset large language model may specifically include: obtaining detection anomaly information corresponding to the detection result; retrieving knowledge base retrieval results similar to the detection anomaly information in a preset knowledge base; and determining the diagnostic result corresponding to the detection result based on the detection anomaly information, the second process template, the knowledge base retrieval results, the preset process diagnostic prompts, and the preset large language model.

[0087] In this embodiment of the disclosure, the detected anomaly information may refer to the specific reasons why the process template failed the process engine's detection and / or the detected anomalies. For example, the detected anomaly information may be, but is not limited to:

[0088] .

[0089] In this embodiment, the preset knowledge base can refer to a dedicated database maintained by the process engine developers. The preset knowledge base stores process templates, exception cases, and rule sets. The preset knowledge base supports text slicing (512-1024 tokens) and vectorized storage (such as BERT embedding). The preset knowledge base can also provide a similarity retrieval interface to return highly relevant knowledge points to assist in LLM diagnosis. Knowledge base retrieval results can include existing problems and corresponding solutions. For example, knowledge base retrieval results can be, but are not limited to, a problem description: the process engine cannot parse the BPMN process correctly; the cause of the problem: there are multiple blank start events or timed start events. The preset process diagnosis prompt can be a prompt for process diagnosis experts: "You are a Camunda process engine expert. Please analyze the following failed deployment process template and error message, and combine relevant knowledge to accurately locate the problem node (using..."). (Label identification), and provide repair solutions...”.

[0090] Specifically, when a user triggers the deployment of a process template, the process engine checks the template's validity. Based on the detected issues, it retrieves similar problems and solutions from a pre-defined knowledge base. The detected anomaly information, the second process template, the knowledge base search results, and pre-defined process diagnostic prompts are input into a pre-defined large language model. This model analyzes the input to generate the cause of the problem and a solution. The diagnostic results corresponding to the detected issues are then obtained based on the model's output.

[0091] When a process template deployment error occurs, the system combines a pre-defined knowledge base search with LLM analysis to locate the abnormal node and provide a repair solution. The advantage of this setup is that it allows for precise problem localization and collaborative reasoning using the pre-defined knowledge base. Precise problem localization means that the abnormal node ID is embedded in specific HTML tags (such as...) in the diagnostic results output by the LLM. This enables the front-end to have tag click positioning functionality, allowing users to focus on the corresponding node in the flowchart simply by clicking. Knowledge base collaborative reasoning involves using a pre-set knowledge base to retrieve anomalies from the flowchart engine, filtering highly relevant cases to assist in LLM diagnosis, and then using the LLM to integrate the retrieval results to generate repair solutions (such as deleting redundant nodes and correcting attribute syntax). This reduces problem-solving time from hours to minutes, achieving a "what you see is what you fix" interactive experience.

[0092] For example, a pre-defined knowledge base retrieval is used. Its purpose is to enhance the LLM's expertise and contextual understanding capabilities by retrieving relevant knowledge fragments in real time while performing critical tasks (especially diagnostics and complex generation) within the LLM system. For instance, user prompts or currently processed content (such as error messages or process template fragments) can be used as query input. The knowledge base retrieval interface is invoked, and highly relevant knowledge fragments are returned based on vector similarity matching. The search results are then filtered for relevance, selecting the most relevant knowledge points. These filtered knowledge points, along with the system and user prompts, are submitted to the LLM system as additional context.

[0093] The technical solution of this invention enhances branch coverage by generating test cases corresponding to the second process template using a preset large language model. Specifically, it uses an LLM inference engine to traverse the parallel / conditional branches of the process and generate boundary scenario test cases (such as timeouts and abnormal paths). This solves the problem of missing test cases in complex processes and improves test coverage to nearly 100%. When the second process template, which has passed the test cases, is deployed to the Camunda engine, the Camunda engine performs a test on the deployed template to obtain the test results. If the test result is a failure, a diagnostic result corresponding to the test result is generated using the preset large language model and rendered into the flowchart on the front end. This allows users to click to view and perform repair operations based on the diagnostic results, thus helping users who are not proficient in BPMN specifications avoid problems that may easily occur during the process template editing process. It also enables automatic anomaly detection and repair, further improving the accuracy of process template generation.

[0094] For example, a pre-prepared knowledge base is established. Its purpose is to build a domain-specific knowledge base to provide accurate auxiliary information for LLM processes in design, generation, and diagnosis. For instance, knowledge collection involves systematically collecting professional knowledge covering BPMN 2.0 specifications, Camunda engine features, common anomaly patterns, best practices, and user-defined rules and configurations (with applicable scenario descriptions). Knowledge processing involves cleaning and formatting the collected knowledge, and segmenting it into text fragments suitable for retrieval (e.g., 512-1024 tokens). Vectorization and storage involves using pre-trained embedding models (e.g., BERT, Sentence-BERT) to convert the text fragments into high-dimensional vectors, storing them in a vector database (e.g., Pinecone, Qdrant), establishing an efficient index, and providing a similarity retrieval interface. (Note: This step can be simplified by integrating existing knowledge base solutions such as Dify and LangChain.)

[0095] For example, consider LLM invocation. Its purpose is to intelligently select and invoke a suitable LLM based on task complexity, real-time requirements, and output quality needs. For instance, model selection strategies influence LLM invocation. For high-complexity, high-precision tasks (such as process template generation and full-branch test case generation), advanced LLMs with large parameter sizes, long context windows, and support for deep thinking (such as Chain-of-Thought) (e.g., GPT-4, Claude Opus) can be used, sacrificing some speed for higher accuracy and logical integrity. For high real-time tasks (such as interactive problem diagnosis), lightweight LLMs with fast response times and moderate parameter sizes (e.g., GPT-3.5 Turbo, Claude Haiku) should be selected to prioritize the immediacy of diagnostic feedback. The specific invocation process may include combining corresponding system prompts (including role definitions and task instructions), knowledge base retrieval results (if applicable), and user prompts (based on specific requirements), and submitting them to the selected LLM model interface. The processing of LLM output includes: receiving the response content generated by LLM (structured description, BPMN XML, test cases, diagnostic reports, etc.) and passing it to subsequent processing modules.

[0096] For example, during the official launch and runtime of the process template, actual business data is monitored and collected for continuous optimization and iteration. Runtime data collection includes: process execution time, task processing duration, gateway branch selection frequency, and error location and frequency. The collected data is then used for AI analysis and optimization. For instance, performance bottleneck identification: AI analysis found that "Director Approval" takes an average of 48 hours; the corresponding intelligent suggestion is: LLM suggestion "Set a 24-hour timeout for approvals exceeding 3 days to automatically approve." Based on historical data, suggestions for optimizing the approval path can also be generated, thus producing process refactoring recommendations. After AI analysis and optimization, an optimized process template can be regenerated, and test cases can be regenerated.

[0097] The following are embodiments of the process template generation device provided in this invention. This device and the process template generation method of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiments of the process template generation device, please refer to the embodiments of the above process template generation method.

[0098] Example 3

[0099] Figure 3 is a schematic diagram of a process template generation device provided in Embodiment 3 of the present invention. As shown in Figure 3, the device includes: a process logic description information determination module 310, a first process template determination module 320, a verification result determination module 330, and a second process template determination module 340.

[0100] The process logic description information determination module 310 is used to obtain the user's process generation requirements and determine the structured process logic description information based on the process generation requirements, preset process design prompts, and preset large language models. The first process template determination module 320 is used to determine the first process template required by the user based on the process logic description information, preset process template generation prompts, and preset large language models. The verification result determination module 330 is used to perform rule verification on the first process template based on preset verification plugins and determine the verification result. The second process template determination module 340 is used to adjust the first process template using preset large language models if the verification result is that the verification fails, and determine the second process template required by the user.

[0101] The technical solution of this invention obtains the user's process generation requirements and, based on these requirements, preset process design prompts, and a preset large language model, determines structured process logic description information. This transforms the user's natural language descriptions into structured information more accurately understood by the preset large language model, providing accurate foundational information for subsequent process template generation and improving efficiency and accuracy. Based on the process logic description information, preset process template generation prompts, and the preset large language model, a first process template required by the user is determined. A preset validation plugin performs rule validation on the first process template, determining the validation result so that process templates that pass the rule validation can be directly output. If the validation result is a failure, the preset large language model is used to adjust the first process template to determine a second process template required by the user. This allows for direct adjustments to the existing process template to obtain a new one when a process template fails rule validation or business requirements change, eliminating the need to rewrite the process and improving the efficiency of process template generation and adjustment.

[0102] Based on the above technical solution, the second process template determination module 340 is specifically used to: obtain the verification exception information corresponding to the verification result; and determine the second process template required by the user based on the process generation requirements, process logic description information, first process template, verification exception information, preset process diagnostic prompts and preset large language model.

[0103] Based on the above technical solution, the device also includes:

[0104] The flowchart determination module is used to determine the positional relationship of each node in the second process template based on the front-end automatic layout algorithm and the second process template, and to render the flowchart corresponding to the second process template on the front end based on the positional relationship of each node.

[0105] Based on the above technical solution, the device also includes:

[0106] The test case generation module is used to generate test cases corresponding to the second process template using a preset large language model;

[0107] The detection result determination module is used to detect the deployed second process template that has passed the test cases when it is deployed to the Camunda engine, and obtain the detection result by the Camunda engine.

[0108] The diagnostic result generation module is used to generate a corresponding diagnostic result based on a preset large language model if the test result is "not passed". The diagnostic result is then rendered into a flowchart on the front end so that users can click to view it and perform repair operations based on the diagnostic result.

[0109] Based on the above technical solution, the test case generation module is specifically used to: determine the natural language description information corresponding to the second process template based on the translated prompt words of the preset process template, the second process template, and the preset large language model; and determine the test cases corresponding to the second process template based on the second process template, the natural language description information, the preset test case generation prompt words, and the preset large language model.

[0110] Based on the above technical solution, the diagnostic result generation module is specifically used to: obtain the detection anomaly information corresponding to the detection result; retrieve knowledge base search results similar to the detection anomaly information in the preset knowledge base; and determine the diagnostic result corresponding to the detection result based on the detection anomaly information, the second process template, the knowledge base search results, the preset process diagnostic prompt words, and the preset large language model.

[0111] The process template generation device provided in this embodiment of the invention can execute the process template generation method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the process template generation method.

[0112] It is worth noting that in the above-mentioned embodiments of generating process templates, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0113] Example 4

[0114] Figure 4 illustrates a schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0115] As shown in Figure 4, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0116] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0117] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the process template generation method.

[0118] In some embodiments, the process template generation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the process template generation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the process template generation method by any other suitable means (e.g., by means of firmware).

[0119] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0120] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0121] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. 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 thereof.

[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0123] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0124] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0125] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the process template generation method provided in any embodiment of this application.

[0126] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). This program product belongs to the same inventive concept as the process template generation method disclosed in the embodiments of this application, and therefore will not be described further here.

[0127] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0128] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for generating a process template, characterized in that, include: Obtain the user's process generation requirements, and determine the structured process logic description information based on the process generation requirements, preset process design prompts and preset large language models; Based on the process logic description information, the preset process template generated prompt words, and the preset large language model, the first process template required by the user is determined. The first process template is validated according to rules based on a preset validation plugin to determine the validation result. If the verification result is that the verification fails, the first process template is adjusted using a preset large language model to determine the second process template required by the user.

2. The method according to claim 1, characterized in that, The step of adjusting the first process template using a preset large language model to determine the second process template required by the user includes: obtaining the verification exception information corresponding to the verification result; and determining the second process template required by the user based on the process generation requirements, the process logic description information, the first process template, the verification exception information, preset process diagnostic prompts, and the preset large language model.

3. The method according to claim 1, characterized in that, The method further includes: determining the positional relationship of each node in the second process template based on the front-end automatic layout algorithm and the second process template, and rendering the process on the front end based on the positional relationship of each node to determine the flowchart corresponding to the second process template.

4. The method according to claim 1, characterized in that, The method further includes: generating test cases corresponding to the second process template using a preset large language model; when the second process template that has passed the test cases is deployed to the Camunda engine, the Camunda engine is used to detect the deployed second process template to obtain a detection result; if the detection result is a failure, a diagnostic result corresponding to the detection result is generated using the preset large language model, and the diagnostic result is rendered in the flowchart on the front end so that the user can click to view and perform repair operations based on the diagnostic result.

5. The method according to claim 4, characterized in that, The step of generating test cases corresponding to the second process template using a preset large language model includes: translating prompt words based on the preset process template, the second process template, and the preset large language model to determine the natural language description information corresponding to the second process template; and generating prompt words based on the second process template, the natural language description information, the preset test cases, and the preset large language model to determine the test cases corresponding to the second process template.

6. The method according to claim 4, characterized in that, The step of generating a diagnostic result corresponding to the detection result using a preset large language model includes: obtaining detection anomaly information corresponding to the detection result; retrieving knowledge base retrieval results similar to the detection anomaly information in a preset knowledge base; and determining the diagnostic result corresponding to the detection result based on the detection anomaly information, the second process template, the knowledge base retrieval results, preset process diagnostic prompts, and the preset large language model.

7. A process template generation device, characterized in that, The device includes: a process logic description information determination module, used to acquire the user's process generation requirements, and determine structured process logic description information based on the process generation requirements, preset process design prompts, and a preset large language model; a first process template determination module, used to determine the first process template required by the user based on the process logic description information, preset process template generation prompts, and a preset large language model; a verification result determination module, used to perform rule verification on the first process template based on a preset verification plugin and determine the verification result; and a second process template determination module, used to adjust the first process template using the preset large language model if the verification result is a verification failure, and determine the second process template required by the user.

8. An electronic device, characterized in that, The electronic device includes: one or more processors; a memory for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the process template generation method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the process template generation method as described in any one of claims 1-6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the process template generation method as described in any one of claims 1-6.

Citation Information

Cited By

  • Process page display method and device, electronic equipment and computer readable medium

    CN122152422A

  • Process page display method and device, electronic equipment and computer readable medium

    CN122152422B