Process model generation method and device, equipment, storage medium and program product

By generating prompt templates and combining building blocks in the process tree model library, the problem of inaccurate process models in the existing technology is solved, and process model generation is achieved that is more in line with business needs.

CN120218836APending Publication Date: 2025-06-27BEIJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510179165.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

When generating business-related process models, the prior art lacks a deep understanding of business needs, resulting in the generated process models that are not accurate enough or cannot meet actual business needs.

Method used

By generating a prompt template based on the input information and process rules of the target business, combined with the process building blocks in the process tree model library, the target process building blocks are dynamically determined and the process model is generated.

Benefits of technology

It improves the accuracy and flexibility of the generated process model, making it more in line with business needs and more applicable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120218836A_ABST
    Figure CN120218836A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a process model generation method and device, equipment, a storage medium and a program product, and the method comprises the steps: generating a prompt template corresponding to a target service based on the input information of the target service and a process rule corresponding to the target service; wherein the flow rule corresponding to the target service is determined from a domain knowledge base corresponding to the target service based on input information of the target service; based on a prompt template corresponding to the target service, determining a target process building block from at least one process building block of a process tree model library; and generating a process model corresponding to the target business based on the target process building block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of information technology, and particularly relates to a method, apparatus, device, storage medium, and program product for generating a process model. Background Art

[0002] In related technologies, when generating a process model corresponding to a service, there is a lack of in-depth understanding of service requirements, and the generated process model is often inaccurate or unable to meet actual service requirements. Summary of the Invention

[0003] In view of this, embodiments of this application at least provide a method, apparatus, device, storage medium, and program product for generating a process model.

[0004] The technical solution of the embodiments of this application is implemented as follows:

[0005] Embodiments of this application provide a method for generating a process model, including:

[0006] Generating a prompt template corresponding to a target service based on input information of the target service and process rules corresponding to the target service; wherein, the process rules corresponding to the target service are determined from a domain knowledge base corresponding to the target service based on the input information of the target service;

[0007] Determining a target process building block from at least one process building block in a process tree model library based on the prompt template corresponding to the target service;

[0008] Generating a process model corresponding to the target service based on the target process building block.

[0009] Embodiments of this application provide a device for generating a process model, including:

[0010] A first generation module, configured to generate a prompt template corresponding to a target service based on input information of the target service and process rules corresponding to the target service; wherein, the process rules corresponding to the target service are determined from a domain knowledge base corresponding to the target service based on the input information of the target service;

[0011] A determination module, configured to determine a target process building block from at least one process building block in a process tree model library based on the prompt template corresponding to the target service;

[0012] A second generation module, configured to generate a process model corresponding to the target service based on the target process building block.

[0013] Embodiments of this application provide a computer device, including a memory and a processor, where the memory stores a computer program that can run on the processor, and the processor implements some or all of the steps in the above method when executing the program.

[0014] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above method are implemented.

[0015] An embodiment of the present application provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, some or all of the steps in the above method are implemented.

[0016] In an embodiment of the present application, according to the input information of the target service and the process rules corresponding to the target service, a prompt template corresponding to the target service is generated. The process rules corresponding to the target service are determined from the domain knowledge base corresponding to the target service according to the input information of the target service; according to the prompt template corresponding to the target service, a target process building block is determined from at least one process building block in the process tree model library, and a process model corresponding to the target service is generated according to the target process building block. In this way, on the one hand, the input information and process rules corresponding to the target service are combined through the prompt template and used to guide the selection of the target process building block, so that the process model generated according to the target process building block better meets the business requirements, thereby improving the accuracy of the generated process model; on the other hand, the process tree model library provides a variety of process building blocks, and the flexibility and applicability of the generated process model are improved by flexibly selecting the target process building block from the process tree model library.

[0017] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the technical solution of the present application. Description of the Drawings

[0018] The drawings here are incorporated into the specification and form a part of this specification. These drawings show embodiments that conform to the present application and are used together with the specification to explain the technical solution of the present application.

[0019] Figure 1 Schematic diagram of the implementation process of a method for generating a process model provided by an embodiment of the present application Figure 1

[0020] Figure 2 Schematic diagram of the implementation process of a method for generating a process model provided by an embodiment of the present application Figure 2 ;

[0021] Figure 3 Schematic diagram of the UML-like modeling language of a process tree model library provided by an embodiment of the present application;

[0022] Figure 4 Schematic diagram of the generation and optimization of a process model provided by an embodiment of the present application;

[0023] Figure 5 Schematic diagram of the implementation process of a method for generating a process model of a recruitment service provided by an embodiment of the present application;

[0024] Figure 6 Schematic diagram of a graphical flow chart corresponding to a recruitment service provided by an embodiment of the present application;

[0025] Figure 7 Schematic diagram of the composition structure of a device for generating a process model provided by an embodiment of the present application;

[0026] Figure 8 Schematic diagram of the hardware entity of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0027] In order to make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be further elaborated in detail below with reference to the accompanying drawings and embodiments. The described embodiments should not be construed as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0028] In the following descriptions, reference is made to "some embodiments" which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0029] The terms "first / second / third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0031] With the accelerating advancement of the digital transformation of enterprises, business process management has gradually become a key link in improving enterprise operation efficiency and competitiveness.

[0032] In the related art, in process design and optimization, manual analysis and coding methods are time-consuming and error-prone, and it is difficult to quickly respond to changes in business requirements. In recent years, artificial intelligence technologies, especially large model technologies, have provided new possibilities for the automated generation and optimization of business processes. However, when existing large models generate process models, they lack a deep understanding of business requirements, and the generated process models are often inaccurate or unable to meet actual business requirements.

[0033] Based on the above description, an embodiment of the present application provides a method for generating a process model, Figure 1 which is a schematic implementation process of a method for generating a process model provided by an embodiment of the present application Figure 1 as Figure 1 shown, the method includes the following steps S101 to S103:

[0034] Step S101: Generate a prompt template corresponding to the target business based on the input information of the target business and the process rules corresponding to the target business; wherein, the process rules corresponding to the target business are determined from the domain knowledge base corresponding to the target business based on the input information of the target business.

[0035] Here, the input information of the target business can be a natural language description of the business process of the target business. The target business can include, but is not limited to, at least one of recruitment business, industrial production business, etc. The input information can include any suitable content of the target business. For example, for the recruitment business, the input information can include "The recruitment manager will first formulate a recruitment plan and job description according to the company's needs and post recruitment advertisements. After receiving applications, the HR will screen the resumes, select eligible candidates, and arrange multiple rounds of interviews (at least one round). If the interview result is passed, the next round of interviews will be conducted or a job offer will be sent to the candidate. If the interview result is not passed, an email will be sent to inform the candidate and the entire process will end."

[0036] The input information can be obtained in any suitable way. For example, the user inputs the input information through devices such as a keyboard or a touch screen, or reads the input information from a file.

[0037] Process rules may include, but are not limited to, semantic understanding of complex business process branches corresponding to target services, logical relationships between various business processes, etc. In some embodiments, based on Retrieval-Augmented Generation (RAG), relevant domain knowledge corresponding to the target service can be retrieved from the domain knowledge base, and then the process rules corresponding to the target service can be determined according to the relevant domain knowledge. Among them, the knowledge in the domain knowledge base can be increased or decreased at any time according to business requirements. During implementation, different services can correspond to different domain knowledge bases. In some embodiments, the domain knowledge base may include, but is not limited to, the correspondence between each service and process rules. According to this correspondence, the process rules corresponding to the target service can be obtained.

[0038] In some embodiments, according to the input information, the activity name corresponding to the target service, the dependency relationship of the business process, time limit, etc. can be determined. According to the process rules, the complex business process branch structure corresponding to the target service, the logical relationship between various business processes, etc. can be determined; the activity name corresponding to the target service, the dependency relationship of the business process, time limit, etc. and the complex business process branch structure corresponding to the target service, the logical relationship between various business processes, etc. are combined to generate a prompt template.

[0039] In some embodiments, the input information and process rules can be input into a template generator to obtain the prompt template. The template generator can be any suitable unit capable of generating templates.

[0040] In some embodiments, the prompt template can be generated according to the key information in the input information and the process rules corresponding to the target service. Among them, the key information may include, but is not limited to, at least one of the activity name corresponding to the target service, the dependency relationship of the business process, time limit, etc. In some embodiments, a large model is used to extract the input information of the target service to obtain the key information.

[0041] In some embodiments, according to the process rules, the complex business process branch structure corresponding to the target service, the logical relationship between various business processes, etc. can be determined; the key information and process rules are combined to generate the prompt template.

[0042] In some embodiments, the key information and process rules can be input into a template generator to obtain the prompt template. The template generator can be any suitable unit capable of generating templates.

[0043] In some embodiments, a hint template can be generated according to the key information in the input information, the process rules corresponding to the target service, and the template generation strategy corresponding to the target service; wherein, the template generation strategy is the logical framework and generation method relied on during the hint template generation process.

[0044] In some embodiments, the key information, as well as the complex business process branch structure corresponding to the target service determined according to the process rules, the logical relationships between each business process, etc. are combined together and integrated into the logical framework corresponding to the template generation strategy to obtain the hint template.

[0045] In some embodiments, first, according to the process rules, the complex business process branch structure corresponding to the target service, the logical relationships between each business process, etc. can be determined; the complex business process branch structure corresponding to the target service, the logical relationships between each business process, etc. are integrated into the logical framework corresponding to the template generation strategy to obtain an initial hint template; the key information in the input information is added to the initial hint template to obtain the hint template corresponding to the target service.

[0046] The hint template is used to guide the generation of a process model that meets the requirements corresponding to the target service. The hint template can include, but is not limited to, knowledge base support, evaluation, security review, few-shot prompting, etc.

[0047] Knowledge base support includes the key information extracted from the input information, a custom Process Tree model library, etc.

[0048] Evaluation is to guide the process model to self-check the generation result, so that the execution logic of the process model is consistent with the input information of the target service, and at the same time avoid structural errors (such as unclosed loops, dependency conflicts, etc.).

[0049] Security review is to conduct a security review on the input information and ensure that the generated process model does not contain illegal content or sensitive information.

[0050] Few-shot prompting is to provide multiple generation examples of typical process models, illustrate the applicable scenarios and rules of the process model, and avoid common problems such as generating redundant or reused sub-models. At the same time, to avoid common errors, some common errors are listed in the hint template, and guidance on avoiding these errors is provided, including ensuring that the transitive closure of the process model does not violate irreflexivity, correctly modeling optional or repeatable parts, and avoiding the reuse of sub-models, etc.

[0051] Step S102: Based on the hint template corresponding to the target service, determine a target process building block from at least one process building block in the process tree model library.

[0052] Here, the process tree model library provides diverse process building blocks for the large model to select the target process building blocks corresponding to the target business. The process building blocks may include at least one of, but are not limited to, business process building blocks, operator building blocks, logical building blocks, etc. Among them, the business process building blocks may include building blocks for any activity and any node in the business. For example, for the recruitment business, the business process building blocks may include, but are not limited to, building blocks corresponding to nodes such as "formulating a recruitment plan" and "screening resumes". The operator building blocks may include, but are not limited to, building blocks corresponding to operators such as exclusive OR, parallel, OR, AND, etc. The logical building blocks may include, but are not limited to, building blocks corresponding to logics such as sequential structure and loop structure.

[0053] The target process building blocks include at least one process building block. The target process building blocks include at least one of the following: target business process building blocks, target operator building blocks, and target logical building blocks. The target business process building block is at least one business process building block among multiple business process building blocks. The target operator building block is at least one operator building block among multiple operator building blocks. The target logical building block is at least one logical building block among multiple logical building blocks.

[0054] In some embodiments, in the process tree model library, the ProcessTreeGenerator class is provided to generate different types of process building blocks. The ProcessTreeGenerator class avoids reusing the same submodel by tracking node usage. The ability to create business process building blocks is provided, and the business process building blocks can be used as the basic units of the process model. The ability to create operator building blocks is provided to ensure that the number and structure of nodes meet the requirements. The ability to create logical building blocks is provided. The logical building blocks may include sequential structure, loop structure, etc., and support generating a partial order model with clear dependencies and a loop model including execution and repetition parts. A conversion method for converting the process tree model into a Petri net model is provided to facilitate the subsequent verification and processing of the process model.

[0055] In some embodiments, according to the actual business needs, the expansion and adjustment of the process tree model library can be supported. For example, adding new types of business process building blocks, operator building blocks, logical building blocks, etc. to adapt to new business scenarios.

[0056] In some embodiments, using the large model, the target process building blocks are dynamically selected from the process tree model library according to the prompt template, so that the target process building blocks can meet the business needs.

[0057] In some embodiments, an indexing mechanism is established for each process building block in the process tree model library, and the index of each process building block is corresponded to the information in the prompt template. Using any suitable search algorithm, the corresponding index can be quickly found in the process tree model library according to the information in the prompt template, and the corresponding target process building block can be matched according to the index.

[0058] In some embodiments, the business processes corresponding to the target business and the logical relationships between the business processes can be determined according to the prompt template; according to the business processes corresponding to the target business, the corresponding target business process building blocks are matched from the process tree model library; according to the logical relationships between the business processes, the corresponding target operator building blocks and / or target logic building blocks are matched from the process tree model library.

[0059] Step S103: Generate a process model corresponding to the target business based on the target process building block.

[0060] In some embodiments, by executing the code corresponding to the target process building block for generating the process model, a process model corresponding to the target business is obtained.

[0061] In some embodiments, according to the target process building block, a suitable process model template is selected, the target process building block is integrated into the process model template, and appropriate adjustments are made according to the target business logic to obtain a process model corresponding to the target business.

[0062] In some embodiments, any suitable process modeling tool can be used to generate a process model corresponding to the target business according to the target process building block.

[0063] In some embodiments, a large model (such as GPT, Gemini, or Llama series, etc.) is used to generate an initial process model corresponding to the target business according to the target process building block; according to the initial process model, a process model corresponding to the target business is determined.

[0064] In some embodiments, the initial process model can be converted into a visual process model, and it is verified whether the visual process model meets the preset conditions. When the visual process model meets the preset conditions, the initial process model is determined as the process model corresponding to the target business. When the visual process model does not meet the preset conditions, the initial process model is updated according to the feedback information of the initial process model corresponding to the target business to obtain a process model corresponding to the target business.

[0065] In some embodiments, the method of converting an initial process model into a visual process model may include, but is not limited to: selecting a suitable visualization tool and directly importing the initial process model into the visualization tool to convert the initial process model into a visual process model; or, using process modeling software to convert the initial process model into a visual process model, where the process modeling software has an automated conversion function from the initial process model to the visual process model.

[0066] The preset condition can be any suitable condition. For example, whether it meets the business requirements corresponding to the target business. Another example is whether it meets the requirements of operability and logical conflict - free.

[0067] The feedback information may include, but is not limited to, errors existing in the generated process model, optimization directions, etc. For example, in the recruitment business scenario, if the multi - round interview link needs to be further optimized, the user can adjust the loop logic or branch conditions and use the adjusted loop logic or branch conditions as feedback information to further update the process model, so that the generated final process model can better meet the user's needs. Another example is that in the recruitment business scenario, if the generated process model omits the operation of sending the "employment notice", the generated model can be directly modified, and the modified generated model can be used as feedback information to regenerate the process model. This feedback mechanism will continuously optimize the generated model to make it more in line with the actual needs.

[0068] In some embodiments, the process model corresponding to the target business is exported as a graphical flowchart, and a corresponding download function is provided to facilitate the user to directly use it in the business system.

[0069] In the embodiments of the present application, according to the input information of the target business and the process rules corresponding to the target business, a prompt template corresponding to the target business is generated; the process rules corresponding to the target business are determined from the domain knowledge base corresponding to the target business according to the input information of the target business; according to the prompt template corresponding to the target business, a target process building block is determined from at least one process building block in the process tree model library, and according to the target process building block, a process model corresponding to the target business is generated. In this way, on the one hand, by combining the input information and process rules corresponding to the target business through the prompt template and using it to guide the selection of the target process building block, the process model generated according to the target process building block is more in line with the business requirements, thereby improving the accuracy of the generated process model; on the other hand, the process tree model library provides a variety of process building blocks, and by flexibly selecting the target process building block from the process tree model library, the flexibility and applicability of the generated process model are improved.

[0070] In some embodiments, the step of "generating a prompt template corresponding to the target service based on the input information of the target service and the process rules corresponding to the target service" in step S101 may include the following steps S111 to S113:

[0071] Step S111: Determine the key information of the target service based on the input information of the target service.

[0072] In some embodiments, a text analysis tool can be used to analyze the input information to obtain the key information; alternatively, a neural network model can be used to extract information from the input information to obtain the key information.

[0073] In some embodiments, a large model can be used to extract key information from the input information of the target service. For example, when the target service is a recruitment service, a large model is used to extract the key information corresponding to the business processes involved in the recruitment service according to the description of the input information, including "formulating a recruitment plan", "screening resumes", "arranging interviews", "sending employment notices", etc.

[0074] In some embodiments, a large model can also be used to identify the dependency relationships between key information. For example, in the above recruitment service, a large model is used to identify the dependency relationships between multiple key information. For example, "screening resumes" is a task after "receiving applications".

[0075] Step S112: Based on the key information of the target service, determine the process rules corresponding to the target service from the domain knowledge base corresponding to the target service.

[0076] In some embodiments, keywords are extracted based on the key information; based on the keywords, relevant knowledge entries are retrieved from the domain knowledge base; according to the retrieved knowledge entries, the process rules corresponding to the target service are determined.

[0077] In some embodiments, keywords are extracted based on the key information, and synonyms, near-synonyms, or related words of the keywords are expanded to obtain expanded keywords; based on the expanded keywords, relevant knowledge entries are retrieved from the domain knowledge base; according to the retrieved knowledge entries, the process rules corresponding to the target service are determined.

[0078] In some embodiments, in combination with the RAG technology, relevant domain knowledge is retrieved from the domain knowledge base, and according to the retrieved relevant knowledge domains, the process rules corresponding to the target service are determined. For example, when the target service is a recruitment service, the RAG technology is used to retrieve relevant domain knowledge from the domain knowledge base of the recruitment industry, such as best recruitment practices or common process structures, to further enhance the understanding of the recruitment process and determine the process rules corresponding to the recruitment service.

[0079] Step S113: Generate a prompt template corresponding to the target service based on the key information of the target service and the process rules corresponding to the target service.

[0080] Here, the key information may include, but is not limited to, at least one of the activity name corresponding to the target service, the dependency relationship of the business process, the time limit, etc.

[0081] In some embodiments, according to the process rules, the complex business process branch structure corresponding to the target service, the logical relationship between each business process, etc. can be determined; the key information and the process rules are combined to generate the prompt template.

[0082] In some embodiments, the key information and the process rules can be input into a template generator to obtain the prompt template. The template generator can be any suitable unit capable of generating a template.

[0083] In some embodiments, the key information and the complex business process branch structure corresponding to the target service determined according to the process rules, the logical relationship between each business process, etc. are combined together and integrated into the logical framework corresponding to the template generation strategy to obtain the prompt template.

[0084] In some embodiments, first, according to the process rules, the complex business process branch structure corresponding to the target service, the logical relationship between each business process, etc. can be determined; the complex business process branch structure corresponding to the target service, the logical relationship between each business process, etc. are integrated into the logical framework corresponding to the template generation strategy to obtain an initial prompt template; the key information is added to the initial prompt template to obtain the prompt template corresponding to the target service.

[0085] In the embodiments of the present application, key information is extracted from the input information of the target service, and the process rules corresponding to the target service are determined from the domain knowledge base corresponding to the key information of the target service; according to the key information of the target service and the process rules corresponding to the target service, a prompt template corresponding to the target service is generated. In this way, the key information and the process rules corresponding to the target service are combined in the prompt template, so that the generated prompt template can meet the business requirements of the target service and has accurate logic.

[0086] In some embodiments, the above step S111 may include the following steps S121 and S122:

[0087] Step S121: Verify the input information of the target service to obtain a verification result.

[0088] Here, the verification can be any suitable verification, for example, security verification, business logic verification, etc. The security verification can include but is not limited to illegal information verification, privacy information verification, sensitive information verification, etc.

[0089] The verification result can include but is not limited to verification passed, verification failed, etc.

[0090] In some embodiments, the input information of the target service is subjected to security verification to determine whether there is illegal content, sensitive information, and / or personal privacy in the input information, and the verification result corresponding to the security verification is obtained. In implementation, when the security verification includes illegal information verification, privacy information verification, and sensitive information verification, if the input information does not include illegal content, does not include sensitive information, and does not include personal privacy, the verification passed is taken as the verification result; if the input information includes illegal content, includes sensitive information, and / or includes personal privacy, the verification failed is taken as the verification result.

[0091] In some embodiments, the input information of the target service is subjected to business logic verification to determine whether the input information conforms to the business logic and rules, and the verification result corresponding to the business logic verification is obtained. In implementation, if the input information does not conform to the business logic and rules, the verification failed is taken as the verification result; on the contrary, if the input information conforms to the business logic and rules, the verification passed is taken as the verification result.

[0092] Step S122: When the verification result indicates that the verification is passed, use a preset large model to extract the input information of the target service to obtain the key information of the target service.

[0093] Here, the large model can include but is not limited to GPT, ResNet, Llama, etc.

[0094] In the embodiments of the present application, the input information of the target service is verified to obtain a verification result; when the verification result indicates that the verification is passed, a preset large model is used to extract the input information of the target service to obtain the key information of the target service. In this way, the input information of the target service is verified, so that the input information that passes the verification meets the requirements corresponding to the target service, and the generation efficiency of the process model of the target service is improved.

[0095] In some embodiments, the above step S113 may include the following steps S131 to S133:

[0096] Step S131: Obtain the template generation strategy corresponding to the target service.

[0097] Here, the template generation strategy can be any suitable generation strategy.

[0098] In some embodiments, the template generation strategy is the logical framework and generation method relied on during the prompt template generation process. Among them, the logical framework can be a specific template structure (such as structures like knowledge base support, evaluation, security review, etc.).

[0099] In some embodiments, the template generation strategy may include, but is not limited to: reusing existing prompt templates, creating new prompt templates, etc.

[0100] In some embodiments, different services may correspond to the same or different template generation strategies.

[0101] The acquisition method of the template generation strategy can be any suitable method. For example, receiving the template generation strategy sent by other devices. Another example is to pre - establish the correspondence between each service and each template generation strategy. According to this correspondence, the template generation strategy corresponding to the target service can be obtained.

[0102] Step S132: Based on the process rules corresponding to the target service and the template generation strategy corresponding to the target service, generate the initial prompt template corresponding to the target service.

[0103] Here, the process rules corresponding to the target service can be determined according to the domain - related knowledge retrieved from the domain knowledge base corresponding to the target service. The process rules may include, but are not limited to, semantic understanding of complex service process branches corresponding to the target service, logical relationships between each service process, etc.

[0104] In some embodiments, according to the process rules corresponding to the target service, with the logical framework and generation method corresponding to the template generation strategy, an initial prompt template is generated, and the initial prompt template has a specific template structure.

[0105] In some embodiments, when the template generation strategy is to reuse an existing prompt template, an existing process model that is structurally similar to the process model of the target service can be selected first. According to the prompt template of the existing process model, it is updated according to the process rules corresponding to the target service to obtain the initial prompt template corresponding to the target service.

[0106] In some embodiments, when the template generation strategy is to create a new prompt template, the process rules corresponding to the target service are deeply analyzed and abstracted into reusable template elements. The template elements include step names, conditional judgments, decision branches, input and output parameters, etc. And according to the specific service requirements of the target service, each template element is combined and arranged to generate an initial prompt template that conforms to the logic of the target service.

[0107] Step S133: Based on the initial prompt template corresponding to the target service and the key information of the target service, generate the prompt template corresponding to the target service.

[0108] In some embodiments, key information is supplemented to the corresponding positions of the initial prompt template, making the generated prompt template more complete and accurate.

[0109] In some embodiments, a consistency check is performed on the key information and the business process information in the initial prompt template, and the parts of the initial template that do not meet the business requirements corresponding to the target business are corrected to obtain the prompt template corresponding to the target business.

[0110] In the embodiments of the present application, an initial prompt template corresponding to the target business is generated according to the process rules corresponding to the target business and the template generation strategy corresponding to the target business; based on the initial prompt template corresponding to the target business and the key information of the target business, a prompt template corresponding to the target business is generated. In this way, the prompt template generated according to the template generation strategy is a prompt template with a unified structure, which simplifies the logic of generating the process model corresponding to the target business according to the prompt template in the subsequent process.

[0111] In some embodiments, the target process building block includes at least one of the following: a target business process building block, a target operator building block, and a target logic building block; the above step S102 may include the following steps S141 to S143:

[0112] Step S141: Based on the prompt template corresponding to the target business, determine at least two business processes corresponding to the target business and the logical relationship between the at least two business processes.

[0113] In some embodiments, the prompt template includes key information extracted from the input information and the process rules corresponding to the target business. Therefore, the main activities (i.e., business processes) corresponding to the target business can be identified according to the key information, and the logical relationship between the business processes can be determined according to the process rules.

[0114] In some embodiments, the method for determining at least two business processes corresponding to the target business according to the prompt template may include, but is not limited to: analyzing the content in the prompt template, extracting the key information corresponding to the target business, and matching the corresponding business processes according to the key information; or analyzing the structure of the prompt template, analyzing the structure of the prompt template, including the components, arrangement order, and logical relationship of the template structure, and inferring the potential business processes according to the components, arrangement order, and logical relationship of the template structure.

[0115] In some embodiments, the method for determining the logical relationship between at least two business processes according to the prompt template may include, but is not limited to: analyzing the content in the prompt template, analyzing the internal relationships between each business process, including the sequence, dependency, parallel relationship, etc., and thus the logical relationship between at least two business processes can be obtained; or, analyzing the business rules or conditions included in the prompt template to infer the logical relationship between business processes.

[0116] Step S142: Determine the target business process building block from at least one business process building block in the business process building block set of the process tree model library.

[0117] In some embodiments, according to the business process corresponding to the target business, select the target business process building blocks corresponding to the business process corresponding to the target business from at least one business process building block in the business process building block set.

[0118] In some embodiments, establish a correspondence relationship in advance between the index of each process building block in the process tree model library and the information in the prompt template. According to this correspondence relationship, quickly find the process building blocks corresponding to the information in the prompt template from the process tree model library, and use these process building blocks as the target business process building blocks.

[0119] In some embodiments, utilize a large model to select the target business process building blocks corresponding to the business process corresponding to the target business from the process tree model library according to the business process corresponding to the target business.

[0120] Step S143: Based on the logical relationship between the at least two business processes, respectively determine the target operator building block from at least one operator building block in the operator building block set of the process tree model library and determine the target logic building block from at least one logic building block in the logic building block set of the process tree model library.

[0121] In some embodiments, according to the logical relationship between at least two business processes, the operators between at least two business processes can be determined, for example, operators such as exclusive OR, parallel, etc.; according to the operators between at least two business processes, select the target operator building block from at least one operator building block.

[0122] In some embodiments, according to the logical relationship between at least two business processes, the logical structure required to combine at least two business processes can be determined, for example, partial order structure, loop structure, etc.; according to the logical structure required to combine at least two business processes, determine the target logic building block from at least one logic building block.

[0123] In some embodiments, any suitable search algorithm may be utilized to select a target operator building block and a target logic building block from a process tree model library respectively according to the logical relationship between at least two business processes.

[0124] In some embodiments, a large model may be utilized to select a target operator building block and a target logic building block from a process tree model library respectively according to the logical relationship between at least two business processes.

[0125] In the embodiments of the present application, the target process building block includes at least one of a target business process building block, a target operator building block, and a target logic building block; according to the prompt template corresponding to the target business, at least two business processes corresponding to the target business and the logical relationship between the at least two business processes are determined; the target business process building block is determined from at least one business process building block in the business process building block set of the process tree model library; according to the logical relationship between the at least two business processes, the target operator building block is determined from at least one operator building block in the operator building block set of the process tree model library and the target logic building block is determined from at least one logic building block in the logic building block set of the process tree model library respectively. In this way, support is provided for selecting the target business process building block, the target operator building block, and the target logic building block from the process tree model library, enabling flexible nesting between the target business process building blocks in the generated process model and with clear logic, thereby improving the accuracy of the generated process model.

[0126] In some embodiments, the above step S102 may include the following steps S151 and S152:

[0127] Step S151: Using a preset large model, an initial process model corresponding to the target business is generated based on the target process building block.

[0128] In some embodiments, using a preset large model, the target business process building block, the target operator building block, and the target logic building block in the target process building block are combined to generate an initial process model.

[0129] In some embodiments, the target business process building block, the target operator building block, and the target logic building block are integrated into a suitable process model template to obtain an initial process model.

[0130] In some embodiments, a process modeling tool is used to model the target business process building block, the target operator building block, and the target logic building block to obtain an initial process model.

[0131] Step S152: Based on the initial process model corresponding to the target business, the process model corresponding to the target business is determined.

[0132] Here, the process model corresponding to the target service may be an initial process model or a process model obtained by updating the initial process model.

[0133] In the embodiments of the present application, a preset large model is used to generate an initial process model corresponding to the target service according to the target process building blocks; and a process model corresponding to the target service is determined according to the initial process model corresponding to the target service. In this way, the large model can quickly and accurately generate the initial process model.

[0134] In some embodiments, the above step S152 may include the following steps S161 to S163:

[0135] Step S161: Convert the initial process model corresponding to the target service into a visual process model.

[0136] Here, the visual process model may include, but is not limited to, a Petri net model, a business process model, a Business Process Model and Notation (BPMN), etc.

[0137] In some embodiments, a model verification tool may be used to check the correctness and operability of the initial process model. Through an automated verification process, the generated process model can meet the business objectives in the actual scenario. Among them, the model verification tool may include, but is not limited to, bpmnlint, Reactis, etc.

[0138] In some embodiments, the conversion function in the PM4Py library is used to convert the initial process model into a Petri net model, and at the same time, an initial token and a final token are generated for process model verification.

[0139] In some embodiments, after converting the initial process model into a Petri net model, a corresponding BPMN model may be further generated through a converter. To improve readability, a layout optimization tool is used to automatically adjust the BPMN model to generate a clear flowchart. Among them, the layout optimization tool may include, but is not limited to, bpmn-auto-layout, Lucidchart, etc.

[0140] In some embodiments, the initial process model, the Petri net model, and the BPMN model may be displayed through a visualization tool, and the compliance check method in the pm4py library is used to determine whether the generated initial process model meets the business requirements corresponding to the target service, and / or whether it meets the requirements of operability and logical conflict-freeness. The visualization tool may include, but is not limited to, Microsoft Visio, Lucidchart, etc.

[0141] Step S162: When the visual process model meets the preset conditions, use the initial process model corresponding to the target service as the process model corresponding to the target service.

[0142] In some embodiments, when the visual process model meets the business requirements corresponding to the target service, it is determined that the visual process model meets the preset conditions.

[0143] In some embodiments, when the visual process model meets the requirements of operability and non-logical conflict, it is determined that the visual process model meets the preset conditions.

[0144] Step S163: When the visual process model does not meet the preset conditions, determine the process model corresponding to the target service based on the feedback information of the initial process model corresponding to the target service.

[0145] In some embodiments, when the visual process model does not meet the preset conditions, according to the inspection results of the visual process model, determine the feedback information for the initial process model, and based on the feedback information, update the initial process model to obtain the final process model corresponding to the target service.

[0146] In some embodiments, directly modify the initial process model according to the feedback information of the initial process model corresponding to the target service to obtain the process model corresponding to the target service.

[0147] In some embodiments, update the prompt template and / or the process tree model library according to the feedback information of the initial process model corresponding to the target service, and based on the updated prompt template and / or process tree model library, determine the process model corresponding to the target service.

[0148] In some embodiments, by repeatedly inspecting the visual process model, continuously adjust the process model to make the finally obtained process model more accurate.

[0149] In the embodiments of the present application, the initial process model corresponding to the target service is transformed into a visual process model; when the visual process model meets the preset conditions, the initial process model corresponding to the target service is used as the process model corresponding to the target service; when the visual process model does not meet the preset conditions, determine the process model corresponding to the target service based on the feedback information of the initial process model corresponding to the target service. In this way, according to the feedback information of the initial process model, adjust the initial process model to improve the accuracy and logic of the adjusted process model, so that the adjusted process model is closer to the actual business requirements.

[0150] In some embodiments, the above Step S163 may include the following Steps S171 to S173:

[0151] Step S171: based on the feedback information of the initial process model corresponding to the target business, the target object is updated to obtain an updated target object; wherein the target object includes at least one of the following: a prompt template corresponding to the target business and the process tree model library.

[0152] In some implementations, the prompt template and / or the process tree model library is adjusted based on the feedback information.

[0153] In some embodiments, the method of adjusting the prompt template according to feedback information includes but is not limited to: modifying the text description, order, logical conjunctions, etc. in the prompt template according to the feedback information to make the prompt template more accurate, clear and easy to understand; or, when the structure of the prompt template is not reasonable, reorganizing the structure of the prompt template according to the feedback information, for example, adjusting the order of the business process, splitting or merging steps, etc.

[0154] In some implementations, the method of adjusting the process tree model library according to the feedback information includes but is not limited to: updating the process building blocks in the process tree model library according to the business process changes or new requirements mentioned in the feedback information; or analyzing the process model performance problems or deficiencies mentioned in the feedback information and optimizing the process tree model library. For example, adjusting the complexity of the process building blocks, adding or reducing nodes, etc.

[0155] Step S172: Determine a new target process building block based on the updated target object.

[0156] In some implementations, a new target process building block is determined from at least one process building block in the process tree model library according to the adjusted prompt template.

[0157] In some implementations, a new target process building block is determined from at least one process building block in the adjusted process tree model library according to the prompt template.

[0158] In some implementations, a new target process building block is determined from at least one process building block in the adjusted process tree model library according to the adjusted prompt template.

[0159] Step S173: Generate a process model corresponding to the target business based on the new target process building block.

[0160] Here, the above step S173 corresponds to the above step S103. When implementing, please refer to the specific implementation of the above step S103.

[0161] In the embodiments of the present application, according to the feedback information of the initial process model corresponding to the target business, the target object is updated to obtain the updated target object; wherein, the target object includes at least one of the prompt template corresponding to the target business and the process tree model library; according to the updated target object, a new target process building block is determined; based on the new target process building block, a process model corresponding to the target business is generated. In this way, by adjusting the prompt template and / or the process tree model library, the logic of the generated process model is made more accurate and closer to the business requirements corresponding to the target business.

[0162] The following describes the application of the embodiments of the present application in actual scenarios.

[0163] With the accelerating advancement of enterprise digital transformation, business process management has gradually become a key link in improving enterprise operation efficiency and competitiveness.

[0164] In the related art, in process design and optimization, manual analysis and coding methods are time-consuming and error-prone, and it is difficult to quickly respond to changes in business requirements. In recent years, artificial intelligence technologies, especially large model technologies, have provided new possibilities for the automated generation and optimization of business processes. However, when existing large models generate process models, they lack a deep understanding of business requirements, and the generated process models are often inaccurate or cannot directly meet actual business needs.

[0165] In response to the above problems, a business process generation technology based on prompt engineering has emerged. However, existing methods still face challenges in practical applications: firstly, they lack a deeper understanding of business logic, and therefore, the accuracy of the generated process models is relatively low; secondly, the generated models are usually one-time, lacking a feedback mechanism and unable to be continuously optimized and adjusted according to the actual needs of users, thus making it difficult to meet the flexibility requirements in dynamic business scenarios. Therefore, how to improve the accuracy, scalability, applicability, and application efficiency of large models in generating business processes has become the research focus of current business process generation systems.

[0166] Based on the above description, the embodiments of the present application provide a method for generating a process model, which parses the natural language description of the target business (corresponding to the input information in the foregoing embodiments) to extract key information; retrieves relevant business process knowledge from the domain knowledge base corresponding to the target business based on the RAG technology to determine the process rules corresponding to the target business; generates a prompt template according to the key information and the process rules; determines target process building blocks from a custom process tree model library according to the prompt template, and generates a process model based on the target process building blocks. At the same time, the generation result of the process model is continuously optimized through a multi-round feedback mechanism, making the generated process model more accurate, flexible, and highly practical.

[0167] Figure 2Implementation process schematic of a method for generating a process model provided by an embodiment of this application Figure 2 , as Figure 2 shown, may include the following steps S201 to S205:

[0168] Step S201: Generate a prompt template according to the natural language description of the target business and the process rules corresponding to the target business.

[0169] Here, the large model is used to parse the natural language description of the target business provided by the user, extract the key information in the natural language description (such as activity name, task dependency relationship, time limit, etc.); and based on the RAG technology, dynamically retrieve relevant domain knowledge from the domain knowledge base to supplement the semantic understanding of complex conditional branches and parallel relationships, and determine the process rules corresponding to the target business. According to the key information and process rules, combined with the template generation strategy of prompt engineering, a prompt template for the large model is generated. The prompt template includes a knowledge base support, evaluation, security review, and few-shot prompt parts, which guide the subsequent generation of the process model, where:

[0170] The knowledge base support includes the key information extracted from the input information and the custom process tree model library, etc. Among them, the core function of the custom process tree model library is to recursively construct a process model, and form a complex model through basic structures (such as exclusive or, loop, sequence).

[0171] Evaluation is to guide the process model to self-check the generation result, so that the execution logic of the process model is consistent with the input information, and at the same time avoid structural errors (such as unclosed loops, dependency conflicts, etc.).

[0172] Security review is to conduct a security review on the input information and ensure that the generated process model does not contain illegal content or sensitive information.

[0173] The few-shot prompt is to provide multiple generation examples of typical process models, illustrate the applicable scenarios and rules of the process model, and avoid common problems such as generating redundant or reused sub-models. At the same time, to avoid common errors, some common errors are listed in the prompt template, and guidance on avoiding these errors is provided, including ensuring that the transitive closure of the process model does not violate irreflexivity, correctly modeling optional or repeatable parts, and avoiding the reuse of sub-models, etc.

[0174] Step S202: Determine the target process building block from the process tree model library according to the prompt template.

[0175] Here, the custom process tree model library provides diverse process building blocks for the large model, including business process building blocks (activity names corresponding to the target business), operator building blocks (such as exclusive OR, parallel, etc.), and logic building blocks (such as loop structures, sequential structures, etc.). The process tree model library supports dynamically constructing process trees based on nested descriptions and can achieve automatic conversion of process trees to Petri nets.

[0176] Figure 3 It is a schematic diagram of the modeling language of a process tree model library class UML provided by an embodiment of this application, as Figure 3 shown, where:

[0177] init() is used to initialize the ProcessTreeGenerator class for constructing and managing process trees;

[0178] create_activity(label) is used to create business process building blocks;

[0179] create_silent() is used to create silent node building blocks;

[0180] build_from_structure(structure) is used to combine business process building blocks and operator building blocks according to nested descriptions to obtain a process model;

[0181] convert_to_petri_net(tree) is used to support converting a process model to a Petri net model;

[0182] create_operator(operator_type) is used to support creating various types of operator building blocks.

[0183] In the process tree model library, the ProcessTreeGenerator class is provided to generate different types of process building blocks. The ProcessTreeGenerator class avoids reusing the same submodel by tracking node usage. It provides the ability to support creating business process building blocks, which can be used as the basic units of process models. It provides the ability to support creating operator building blocks to ensure that the number and structure of nodes meet the requirements. It provides the ability to support creating logic building blocks, which can include sequential structures, loop structures, etc., and supports generating partial order models with clear dependency relationships and loop models containing execution and repetition parts. It provides a conversion method to convert the process tree model to a Petri net model (Petri net model) for facilitating subsequent verification and processing of process models.

[0184] In some embodiments, according to the actual business requirements, subsequent expansion and adjustment of the process tree model library are supported, and new types of business process building blocks, operator building blocks, logic building blocks, etc. are added to adapt to new business scenarios.

[0185] Using a large model, according to the prompt template, determine the target process building block from at least one process building block in the process model library, where the target process building block includes, but is not limited to, the target business process building block, the target operator building block, the target logic building block, etc.

[0186] Step S203: Generate an initial process model corresponding to the target business according to the target process building block.

[0187] In some embodiments, using a large model (such as GPT, Gemini, or Llama series, etc.), combine the target business process building block, the target operator building block, and the target logic building block in the target process building block to generate an initial process model corresponding to the target business.

[0188] Step S204: Generate a process model corresponding to the target business based on the initial process model.

[0189] Here, the generated process model code can be converted into a visual process model such as a Petri net or a BPMN model. For example, using the conversion function in the PM4Py library, convert the initial process model into a Petri net model, and after converting the initial process model into a Petri net model, further generate the corresponding BPMN model through a converter.

[0190] Use a model verification tool to check whether the visual process model meets the business requirements corresponding to the target business, and / or whether it meets the requirements of operability and no logical conflict.

[0191] When the visual process model meets the business requirements corresponding to the target business, and / or meets the requirements of operability and no logical conflict, it is determined that the visual process model meets the preset conditions; when the visual process model does not meet the business requirements corresponding to the target business, and / or does not meet the requirements of operability and no logical conflict, it is determined that the visual process model does not meet the preset conditions.

[0192] When the visual process model meets the preset conditions, use the initial process model as the process model corresponding to the target business; when the visual process model does not meet the preset conditions, update the prompt template and / or the process tree model library based on the feedback information of the initial process model corresponding to the target business, and determine the process model corresponding to the target business based on the updated prompt template and / or process tree model library. By repeatedly checking the visual process model, continuously adjust the process model to make the finally obtained process model more accurate.

[0193] Figure 4 This is a schematic diagram for generating and optimizing a process model provided by an embodiment of the present application. As Figure 4 shown, the generation process of the process model may include the following steps S401 to step S414:

[0194] Step S401: Input the natural language description of the business process to be generated.

[0195] Step S402: Security check;

[0196] Step S403: Obtain key information and process rules;

[0197] Step S404: Generate a prompt template;

[0198] Step S405: Generate an initial process model;

[0199] Step S406: Whether the initial process model meets the preset conditions; if so, go to step S407; if not, go to step S408;

[0200] Step S407: Take the initial process model as the process model corresponding to the target business, and go to step S414 to download the process model;

[0201] Step S408: Return feedback comments;

[0202] Step S409: Perform text security check on the feedback comments corresponding to the initial process model;

[0203] Step S410: Update the prompt template and / or the process tree model library according to the feedback comments;

[0204] Step S411: Generate a new process model;

[0205] Step S412: Whether the new process model meets the preset conditions, if so, go to step S414, if not, go to step S413;

[0206] Step S413: Return feedback comments again, and go to step S411;

[0207] Step S414: Download the process model.

[0208] Step S205: Export the process model corresponding to the target business as a graphical flow chart and provide the corresponding download function.

[0209] Here, the process model is exported as a graphical flowchart, and the function of downloading the corresponding model code is provided to facilitate users to directly use it in the business system. For example, by using the visualization methods in the PM4Py library, the BPMN, Petri net, and process model are exported into common image formats (such as SVG, PNG, etc.). By using different exporters in the objects of the PM4Py library, the BPMN model and Petri net model are respectively converted into corresponding code file formats (for example,.bpmn or.pnml files).

[0210] Taking the recruitment process as an example below, the method for generating the process model will be described.

[0211] Figure 5 It is a schematic flowchart of a method for generating a process model of a recruitment business provided by an embodiment of the present application, as Figure 5 shown. This method may include the following steps S501 to step S505:

[0212] Step S501: Parse the natural language description of the recruitment process, extract key information; determine the process rules corresponding to the recruitment process from the domain knowledge base corresponding to the recruitment process; generate a corresponding prompt template according to the key information and the process rules corresponding to the recruitment process.

[0213] Here, the prompt template includes parts such as knowledge base support, evaluation, security review, and few-shot prompts.

[0214] For example, the natural language description of the recruitment process can be "The recruitment manager will first formulate a recruitment plan and job description according to the company's needs and post recruitment advertisements. After receiving applications, the HR will screen the resumes, select eligible candidates, and arrange multiple rounds of interviews (at least one round). If the interview result is passed, the next round of interviews will be conducted or a job offer will be sent to the candidate. If the interview result is not passed, an email will be sent to inform the candidate and the entire process will end". According to the above description, key information can be extracted, such as "formulate a recruitment plan", "screen resumes", "arrange interviews", "send a job offer", etc., and the dependency relationships between tasks can be identified (for example, "screen resumes" is a task after "receive applications").

[0215] According to the key information and the process rules corresponding to the recruitment process, a prompt template is generated with a template generation strategy.

[0216] Step S502: According to the prompt template corresponding to the recruitment process, determine the target process building blocks corresponding to the recruitment process from at least one process building block in the process tree model library.

[0217] The target process building blocks may include, but are not limited to, target business process building blocks, target operator building blocks, and target logic building blocks; using a large model, according to the prompt template, determine the corresponding target business process building blocks such as "screening resumes", "arranging interviews", "sending employment notices", etc. from the process tree model library, as well as the logical relationships between "screening resumes", "arranging interviews", "sending employment notices", etc.; according to the logical relationships between "screening resumes", "arranging interviews", "sending employment notices", etc., determine the required target operator building blocks and target logic building blocks between "screening resumes", "arranging interviews", "sending employment notices", etc. from the process tree model library.

[0218] Step S503: Generate an initial process model corresponding to the recruitment process according to the target process building blocks corresponding to the recruitment process.

[0219] Using a large model (such as GPT, Gemini, or Llama series, etc.), combine the target business process building blocks (such as the process building blocks corresponding to "screening resumes", "arranging interviews", "sending employment notices", etc.), target operator building blocks (such as the process building blocks corresponding to exclusive OR, parallel, etc.), and target logic building blocks (such as the process building blocks corresponding to sequential structure, loop structure) in the target process building blocks to generate an initial process model corresponding to the target business.

[0220] Step S504: Determine the process model corresponding to the recruitment process according to the initial process model corresponding to the recruitment process.

[0221] Check the initial process model to determine whether the initial process model meets the preset conditions. The preset conditions can be any suitable conditions. For example, whether it meets the business requirements corresponding to the target business. Another example is whether it meets the requirements of operability and no logical conflicts.

[0222] If the initial process model meets the preset conditions, use the initial process as the process model corresponding to the recruitment process.

[0223] If the initial process model does not meet the preset conditions, update the prompt template and process tree model library corresponding to the recruitment process according to the feedback information corresponding to the initial process model, and generate the process model corresponding to the recruitment process according to the new prompt template and process tree model library.

[0224] For example, if the multi-round interview process needs to be further optimized, the user can adjust the loop logic or branch conditions and use the adjusted loop logic or branch conditions as feedback information to further update the process model, so that the generated final process model can better meet the user's needs. Another example is that if the generated process model misses the operation of sending the "employment notice", the generated model can be directly modified and the modified generated model can be used as feedback information to regenerate the process model. This feedback mechanism will continuously optimize the generated model to make it more in line with the actual needs.

[0225] Step S505: Export the process model corresponding to the recruitment process as a graphical flow chart and provide a corresponding download function.

[0226] The graphical flow chart exported from the recruitment process model is as Figure 6 shown. The recruitment process corresponding to the recruitment business may include the following steps S601 to S609:

[0227] Step S601: Develop a recruitment plan and job description;

[0228] Step S602: Post recruitment advertisements;

[0229] Step S603: Screen resumes;

[0230] Step S604: Conduct interviews;

[0231] Step S605: Evaluate candidates; if passed, in the case of needing the next round of interviews, enter Step S604; in the case of not needing the next round of interviews, enter Step S607; if not passed, enter Step S606;

[0232] Step S606: Send a thank-you letter and end;

[0233] Step S607: Send an offer letter;

[0234] Step S608: Start work;

[0235] Step S609: Training and integration.

[0236] In the embodiments of the present application, a prompt template is generated according to the input information corresponding to the target service input by the user and the process rules determined from the domain knowledge base corresponding to the target service; according to the prompt template, a target process building block is determined from the process tree model library, and a process model corresponding to the target service is generated based on the target process building block. In this way, on the one hand, the input information corresponding to the target service and the process rules are combined through the prompt template and used to guide the selection of the target process building block, so that the process model generated according to the target process building block better meets the business requirements, thereby improving the accuracy of the generated process model; on the other hand, the process tree model library provides a variety of process building blocks, and the flexibility and applicability of the generated process model are improved by flexibly selecting the target process building block from the process tree model library.

[0237] Based on the foregoing embodiments, an embodiment of the present application provides a device for generating a process model. The device for generating a process model includes each module included therein, as well as each unit included in each module, etc., which can be implemented by a processor in a computer device; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.

[0238] Figure 7 FIG. is a schematic structural diagram of a device for generating a process model provided by an embodiment of the present application, as Figure 7 shown, the device 700 for generating a process model includes: a first generation module 701, a determination module 702, and a second generation module 703, where:

[0239] The first generation module 701 is configured to generate a prompt template corresponding to the target service based on the input information of the target service and the process rules corresponding to the target service; wherein, the process rules corresponding to the target service are determined from the domain knowledge base corresponding to the target service based on the input information of the target service.

[0240] The determination module 702 is configured to determine a target process building block from at least one process building block of the process tree model library based on the prompt template corresponding to the target service.

[0241] The second generation module 703 is configured to generate a process model corresponding to the target service based on the target process building block.

[0242] In some embodiments, the first generation module includes: a first determination unit configured to determine key information of the target service based on input information of the target service; a second determination unit configured to determine a process rule corresponding to the target service from a domain knowledge base corresponding to the target service based on the key information of the target service; and a first generation unit configured to generate a prompt template corresponding to the target service based on the key information of the target service and the process rule corresponding to the target service.

[0243] In some embodiments, the first determination unit includes: a verification subunit configured to verify the input information of the target service to obtain a verification result; and an extraction subunit configured to, when the verification result indicates that the verification is passed, use a preset large model to extract the input information of the target service to obtain the key information of the target service.

[0244] In some embodiments, the first generation unit includes: an acquisition subunit configured to acquire a template generation strategy corresponding to the target service; a first generation subunit configured to generate an initial prompt template corresponding to the target service based on the process rule corresponding to the target service and the template generation strategy corresponding to the target service; and a second generation subunit configured to generate a prompt template corresponding to the target service based on the initial prompt template corresponding to the target service and the key information of the target service.

[0245] In some embodiments, the target process building block includes at least one of the following: a target service process building block, a target operator building block, and a target logic building block; the determination module includes: a third determination unit configured to determine at least two service processes corresponding to the target service and a logical relationship between the at least two service processes based on the prompt template corresponding to the target service; a fourth determination unit configured to determine the target service process building block from at least one service process building block in a service process building block set of the process tree model library; and a fifth determination unit configured to determine the target operator building block from at least one operator building block in an operator building block set of the process tree model library and determine the target logic building block from at least one logic building block in a logic building block set of the process tree model library respectively based on the logical relationship between the at least two service processes.

[0246] In some embodiments, the second generation module includes: a second generation unit configured to use a preset large model to generate an initial process model corresponding to the target service based on the target process building block; and a sixth determination unit configured to determine a process model corresponding to the target service based on the initial process model corresponding to the target service.

[0247] In some embodiments, the sixth determination unit includes: a conversion subunit, configured to convert an initial process model corresponding to the target service into a visual process model; an acting as subunit, configured to use the initial process model corresponding to the target service as the process model corresponding to the target service when the visual process model meets a preset condition; and a determination subunit, configured to determine the process model corresponding to the target service based on feedback information of the initial process model corresponding to the target service when the visual process model does not meet the preset condition.

[0248] In some embodiments, the determination subunit is further configured to update a target object based on feedback information of the initial process model corresponding to the target service to obtain an updated target object, where the target object includes at least one of the following: a prompt template corresponding to the target service and the process tree model library; determine a new target process building block based on the updated target object; and generate the process model corresponding to the target service based on the new target process building block.

[0249] The description of the above device embodiments is similar to that of the above method embodiments and has similar beneficial effects to those of the method embodiments. In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the methods described in the above method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0250] It should be noted that in the embodiments of the present application, if the above method is implemented in the form of software function modules and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of the embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disc that can store program codes. In this way, the embodiments of the present application are not limited to any specific hardware, software, or firmware, or any arbitrary combination of hardware, software, and firmware.

[0251] The embodiments of the present application provide a computer device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor implements some or all of the steps in the above method when executing the program.

[0252] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0253] An embodiment of the present application provides a computer program, including computer-readable code. When the computer-readable code runs in a computer device, a processor in the computer device executes to implement some or all of the steps in the above method.

[0254] An embodiment of the present application provides a computer program product. The computer program product includes a non-transient computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be specifically implemented by means of hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium. In other embodiments, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0255] It should be noted here that: the descriptions of the above embodiments tend to emphasize the differences between the embodiments, and their similarities or similarities can be referred to each other. The descriptions of the above device, storage medium, computer program, and computer program product embodiments are similar to the descriptions of the above method embodiments and have beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.

[0256] It should be noted that Figure 8 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present application. As Figure 8 shown, the hardware entity of the computer device 800 includes: a processor 801, a communication interface 802, and a memory 803, where:

[0257] The processor 801 generally controls the overall operation of the computer device 800.

[0258] The communication interface 802 can enable the computer device to communicate with other terminals or servers through a network.

[0259] The memory 803 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or already processed by the processor 801 and each module in the computer device 800 (e.g., image data, audio data, voice communication data, and video communication data), and can be implemented by flash memory (FLASH) or random access memory (RAM). Data transmission can be carried out between the processor 801, the communication interface 802, and the memory 803 through the bus 804.

[0260] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures, or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" that appears throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the magnitudes of the sequence numbers of the above steps / processes do not mean the sequence of execution, and the execution sequence of each step / process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The sequence numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments.

[0261] It should be noted that in this article, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.

[0262] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of units is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the couplings, direct couplings, or communication connections between the components shown or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be electrical, mechanical, or other forms.

[0263] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in each embodiment of this application, each functional unit may be fully integrated in a processing unit, or each unit may be a separate unit alone, or two or more units may be integrated in one unit; the above-mentioned integrated units may be implemented in the form of hardware, or in the form of hardware plus software functional units.

[0264] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM), magnetic disks, or optical discs and other various media that can store program codes.

[0265] Alternatively, if the above-mentioned integrated units of this application are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that makes contributions to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods of each embodiment of this application. And the foregoing storage medium includes: removable storage devices, ROM, magnetic disks, or optical discs and other various media that can store program codes.

[0266] The above is only the implementation mode of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in this application should be covered by the protection scope of this application.

Claims

1. A method for generating a process model, characterized in that: The method comprises: Based on the input information of the target business and the process rules corresponding to the target business, a prompt template corresponding to the target business is generated; wherein the process rules corresponding to the target business are determined from a domain knowledge base corresponding to the target business based on the input information of the target business; Determine a target process building block from at least one process building block in a process tree model library based on a prompt template corresponding to the target business; Based on the target process building blocks, a process model corresponding to the target business is generated.

2. The method according to claim 1, characterized in that The step of generating a prompt template corresponding to the target business based on the input information of the target business and the process rule corresponding to the target business includes: Determining key information of the target business based on the input information of the target business; Based on the key information of the target business, determining the process rules corresponding to the target business from the domain knowledge base corresponding to the target business; Based on the key information of the target business and the process rules corresponding to the target business, a prompt template corresponding to the target business is generated.

3. The method according to claim 2, characterized in that The step of determining key information of the target business based on the input information of the target business includes: Verifying the input information of the target business to obtain a verification result; When the verification result indicates that the verification has passed, the input information of the target business is extracted using a preset large model to obtain key information of the target business.

4. The method according to claim 2, characterized in that The generating a prompt template corresponding to the target business based on the key information of the target business and the process rules corresponding to the target business includes: Obtaining a template generation strategy corresponding to the target business; Generate an initial prompt template corresponding to the target business based on the process rules corresponding to the target business and the template generation strategy corresponding to the target business; A prompt template corresponding to the target business is generated based on the initial prompt template corresponding to the target business and the key information of the target business.

5. The method according to claim 1, characterized in that The target process building block includes at least one of the following: a target business process building block, a target operator building block, and a target logic building block; The step of determining a target process building block from at least one process building block in a process tree model library based on a prompt template corresponding to the target business includes: Determining, based on the prompt template corresponding to the target business, at least two business processes corresponding to the target business and a logical relationship between the at least two business processes; Determine the target business process building block from at least one business process building block in the business process building block set of the process tree model library; Based on the logical relationship between the at least two business processes, the target operator building block is determined from at least one operator building block of the operator building block set of the process tree model library, and the target logic building block is determined from at least one logic building block of the logic building block set of the process tree model library.

6. The method according to any one of claims 1 to 5, characterized in that The step of generating a process model corresponding to the target business based on the target process building block includes: Using the preset large model, based on the target process building blocks, an initial process model corresponding to the target business is generated; Based on the initial process model corresponding to the target business, a process model corresponding to the target business is determined.

7. The method according to claim 6, characterized in that The determining the process model corresponding to the target business based on the initial process model corresponding to the target business includes: Converting the initial process model corresponding to the target business into a visual process model; When the visual process model meets the preset conditions, the initial process model corresponding to the target business is used as the process model corresponding to the target business; When the visual process model does not satisfy the preset condition, the process model corresponding to the target business is determined based on feedback information of the initial process model corresponding to the target business.

8. The method according to claim 7, characterized in that The step of determining the process model corresponding to the target business based on the feedback information of the initial process model corresponding to the target business includes: Based on the feedback information of the initial process model corresponding to the target business, the target object is updated to obtain an updated target object; wherein the target object includes at least one of the following: a prompt template corresponding to the target business and the process tree model library; Based on the updated target object, determining a new target process building block; Based on the new target process building block, a process model corresponding to the target business is generated.

9. A device for generating a process model, characterized in that: include: A first generating module is used to generate a prompt template corresponding to the target business based on the input information of the target business and the process rules corresponding to the target business; wherein the process rules corresponding to the target business are determined from the domain knowledge base corresponding to the target business based on the input information of the target business; A determination module, configured to determine a target process building block from at least one process building block in a process tree model library based on a prompt template corresponding to the target business; The second generating module is used to generate a process model corresponding to the target business based on the target process building block.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the program, the steps in the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 8 are implemented.

12. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps in the method according to any one of claims 1 to 8 are implemented.