A cross-system business integration workflow generation method and system based on a large model
By decomposing task requirements into sub-task steps using a large model, and combining reinforcement learning and RAG technology to generate workflows, the problems of error accumulation and cross-system integration in existing technologies are solved, and efficient and accurate cross-system business process generation is achieved.
Patent Information
- Application Number
- CN202411246940.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing workflow generation methods are prone to error accumulation when generating multi-step tasks, lack an understanding of actual user needs, are difficult to run seamlessly in cross-system environments, and traditional methods have poor flexibility and high maintenance costs.
The task requirements are decomposed into sub-task description steps by a large model, the optimal path is selected by combining Markov decision framework and reinforcement learning algorithm, component information is retrieved using RAG and mind chain, a prompt template generation workflow is constructed, and a user feedback mechanism is introduced to optimize the generated results.
It improves the accuracy and applicability of workflow generation, reduces labor costs, and enables efficient component integration and flexible adjustment of cross-system business processes.
Smart Images

Figure CN119273126B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for generating cross-system business integration workflows based on a large model. Background Technology
[0002] With the accelerating pace of digital transformation, enterprises are increasingly relying on automated workflows to improve operational efficiency and responsiveness. Traditional manual management and custom development methods can no longer meet the growing demands for flexibility and integration. Faced with the challenges of cross-system business process management, the industry is gradually turning to leveraging advanced computer science methods and technologies to simplify and automate these processes. In particular, in recent years, the development of artificial intelligence technologies, especially large language models, has provided powerful tools for creating automated workflows. These models, with their excellent language understanding and generation capabilities, can handle complex instructions and task descriptions, opening up new possibilities for achieving automated workflow generation.
[0003] While large language models have shown great potential in the field of automated workflow generation, they still face several key challenges. On the one hand, existing solutions often suffer from error accumulation when generating multi-step workflows, especially when handling long sequences of tasks, where models may produce logical errors, fabricated scenarios, or content inconsistent with reality. On the other hand, existing workflow generation methods often lack a deep understanding of actual user needs, resulting in workflows that do not meet expectations or are difficult to directly apply to real-world business scenarios. Furthermore, existing workflow generation methods rarely consider cross-system component integration, making it difficult for workflows to run seamlessly across different IT environments. These issues limit the practical application scope and efficiency of automated workflow technologies. Summary of the Invention
[0004] To address the aforementioned technical problems, the present invention aims to provide a method and system for generating cross-system business integration workflows based on a large model, which offers high accuracy and applicability.
[0005] To achieve the above objectives, one aspect of this application proposes a method for generating cross-system business integration workflows based on a large model, comprising the following steps:
[0006] Obtain task requirements, and decompose the task requirements using a pre-defined large model to obtain multiple sub-task description steps;
[0007] The sub-task description steps are retrieved to obtain multiple related component information. Then, the task requirements, the sub-task description steps, and the related component information are input into the large model to obtain component description information.
[0008] A prompt template is constructed, and a workflow is obtained through the large model based on the prompt template, the task requirements, and the component description information.
[0009] In some embodiments, the step of decomposing the task requirements using a preset large model to obtain multiple sub-task descriptions specifically includes:
[0010] Determine the optimal strategy for the large model and input the task requirements into the large model;
[0011] Based on the task requirements, multiple states are obtained, and based on all the states, the cumulative reward and heuristic value are obtained.
[0012] The extended value corresponding to each state is calculated based on the cumulative revenue and the heuristic value.
[0013] The states are sorted from high to low according to the extended value, and a preset number of states are determined as candidate states based on the sorting result.
[0014] The candidate states are expanded according to the optimal strategy to obtain multiple subtask description steps.
[0015] In some embodiments, obtaining multiple states according to the task requirements specifically includes:
[0016] The decomposition process of the task requirements is conceptualized as a Markov decision framework, which includes multiple states, multiple actions, discount factors, and reward functions for state-action pairs.
[0017] In some embodiments, obtaining the cumulative reward and heuristic value based on all the states specifically includes:
[0018] Calculate the reward for all the states, and perform an aggregation operation on each reward to obtain the cumulative benefit;
[0019] The optimal cumulative expected return value of the state-action pair is calculated based on the reward function and the discount factor, and then the optimal cumulative expected return value is used as the heuristic value.
[0020] In some embodiments, the step of retrieving information on each of the subtask descriptions to obtain multiple related component information specifically includes:
[0021] Obtain the component library, which contains various components;
[0022] Extract the semantic-aware embedding vector and query embedding vector of each component in the component library;
[0023] The relevance between the subtask description step and the component is obtained based on the semantically aware embedding vector and the query embedding vector;
[0024] The component with the highest relevance corresponding to each of the subtask description steps is determined, and information on multiple related components is obtained.
[0025] In some embodiments, the build prompt template is specifically:
[0026] The prompt template is constructed based on the component description information and the subtask description steps;
[0027] The prompt templates include role and target prompts, context information prompts, component description prompts, limitation prompts, and demonstration prompts.
[0028] In some embodiments, the process of obtaining a workflow from the large model based on the prompt template, the task requirements, and the component description information specifically includes:
[0029] Input the prompt template and the task requirements into the large model to obtain the workflow description file;
[0030] Based on the user feedback results obtained from the workflow description file, the workflow description file is updated using the large model based on the user feedback results to obtain the workflow.
[0031] To achieve the above objectives, another aspect of this application proposes a cross-system business integration workflow generation system based on a large model, comprising:
[0032] The task decomposition module is used to obtain task requirements and decompose the task requirements through a large language model to obtain multiple sub-task description steps.
[0033] The component generation module is used to retrieve the description steps of each subtask to obtain multiple related component information, and then input the task requirements, the subtask description steps and the related component information into a preset large model to obtain component description information.
[0034] The workflow generation module is used to construct a prompt template and generate a workflow based on the prompt template, the task requirements, and the component description information through the large model.
[0035] To achieve the above objectives, another aspect of the embodiments of this application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the cross-system service convergence workflow generation method based on a large model as described above.
[0036] To achieve the above objectives, another aspect of the embodiments of this application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to implement the cross-system business integration workflow generation method based on a large model as described above.
[0037] The beneficial effects of this invention are as follows: The cross-system business integration workflow generation method and system based on a large model of this invention first obtains task requirements, decomposes the task requirements through a preset large model to obtain multiple sub-task description steps, then retrieves multiple related component information for each sub-task description step, and then inputs the task requirements, sub-task description steps, and related component information into the large model to obtain component description information. Finally, a prompt template is constructed, and the workflow is generated by the large model based on the prompt template, task requirements, and component description information. This invention automatically decomposes the user-described task requirements into a series of operable sub-task description steps through a large model, and automatically retrieves the most relevant component description information based on the sub-task description steps, ultimately automatically generating a structured and executable workflow. This can significantly improve the efficiency of business workflow generation, reduce labor costs, and improve the accuracy and applicability of workflow generation. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the embodiments of the present invention are described below. It should be understood that the drawings described below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating the steps of a cross-system business integration workflow generation method based on a large model, provided in this embodiment of the invention;
[0040] Figure 2 A schematic diagram of the component assembly process provided in an embodiment of the present invention;
[0041] Figure 3A schematic diagram of the structure of a cross-system business fusion workflow generation system based on a large model, provided in an embodiment of the present invention;
[0042] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0044] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”
[0045] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.
[0046] With the accelerating pace of digital transformation, enterprises are increasingly relying on automated workflows to improve operational efficiency and responsiveness. Traditional manual management and custom development methods can no longer meet the growing demands for flexibility and integration. Faced with the challenges of cross-system business process management, the industry is gradually turning to leveraging advanced computer science methods and technologies to simplify and automate these processes. In particular, in recent years, the development of artificial intelligence technologies, especially large language models, has provided powerful tools for creating automated workflows. These models, with their excellent language understanding and generation capabilities, can handle complex instructions and task descriptions, opening up new possibilities for achieving automated workflow generation.
[0047] While large language models have shown great potential in the field of automated workflow generation, they still face several key challenges. On the one hand, existing solutions often suffer from error accumulation when generating multi-step workflows, especially when handling long sequences of tasks, where models may produce logical errors, fabricated scenarios, or content inconsistent with reality. On the other hand, existing workflow generation methods often lack a deep understanding of actual user needs, resulting in workflows that do not meet expectations or are difficult to directly apply to real-world business scenarios. Furthermore, existing workflow generation methods rarely consider cross-system component integration, making it difficult for workflows to run seamlessly across different IT environments. These issues limit the practical application scope and efficiency of automated workflow technologies.
[0048] A previous automated workflow generation method based on rule engines and expert systems relied on pre-defined rules and expert knowledge to guide workflow creation. This method uses a rule engine to enforce business rules and combines them with an expert system to provide domain-specific expertise. The expert system defines the rules, and the rule engine uses these rules to guide workflow generation and execution. However, this method lacks flexibility because it operates on a fixed set of rules. This means that when faced with changing business needs, the rules and expert knowledge base need to be manually updated, increasing maintenance costs and response time. Furthermore, this method has limited ability to handle unexpected situations, potentially leading to workflow interruptions or erroneous execution.
[0049] A widely adopted approach in previous techniques is to optimize the performance of a large model for specific application scenarios by performing domain-specific fine-tuning. This strategy leverages a language model as a foundation, further refining it on a dataset focused on a particular professional domain. Through fine-tuning, the model can absorb and understand the domain-specific terminology, conceptual frameworks, and linguistic habits, thereby exhibiting more accurate and professional output capabilities when handling related tasks. However, while fine-tuning can improve a model's performance in a specific domain to some extent, it has several significant drawbacks. First, the fine-tuning process requires a large amount of labeled domain-specific data, which is not only costly, but also presents a significant challenge for some niche or emerging fields, as obtaining sufficient datasets is a major challenge. Second, fine-tuning may lead to a decrease in the model's generalization ability, i.e., poor performance when handling out-of-domain or marginal cases.
[0050] To address this, this invention proposes a cross-system business integration workflow generation method based on a large model. First, task requirements are acquired. Then, these requirements are decomposed into multiple sub-task description steps using a pre-defined large model. Next, each sub-task description step is retrieved to obtain relevant component information. The task requirements, sub-task description steps, and relevant component information are then input into the large model to obtain component description information. Finally, a prompt template is constructed, and the workflow is generated by the large model based on the prompt template, task requirements, and component description information. This invention automatically decomposes user-described task requirements into a series of operable sub-task description steps using a large model, and automatically retrieves the most relevant component description information based on these sub-task description steps. Ultimately, it automatically generates a structured and executable workflow, significantly improving the efficiency of business workflow generation, reducing labor costs, and enhancing the accuracy and applicability of workflow generation.
[0051] Reference Figure 1 , Figure 1 This invention provides a flowchart of a method for generating cross-system business integration workflows based on a large model, which includes steps S101 to S103.
[0052] S101. Obtain task requirements. Decompose the task requirements using a pre-set large model to obtain multiple sub-task description steps.
[0053] Specifically, the large model generates a series of sub-task description steps from the user-described task requirements to solve the task. These sub-task description steps serve as an interpretive framework, decomposing the original task requirements into specific, actionable standards. Specifically, taking the task requirement q as input, the large model, with the goal of completing the task, divides the solution steps into multiple sub-task description steps, where the final task sequence 'a' can be viewed as a concatenation of these T single-step sub-tasks, formalized as a = a1; a1; ... a T Each subtask describes a step as one or more lines of tokens output by the larger model.
[0054] As an optional implementation, the step of decomposing the task requirements into multiple sub-task descriptions using a pre-defined large model can be further divided into the following steps S1011 to S1015:
[0055] S1011. Determine the optimal strategy for the large model and input the task requirements into the large model;
[0056] Specifically, in this embodiment of the invention, the generated solution must match the ground truth to be awarded a reward value of 1. Optimal policy π θRepresented by large models (such as LLMs), a series of subtask description steps are generated based on task requirements q, with the optimal strategy π. θ As shown in the following formula:
[0057]
[0058] S1012. Obtain multiple states based on task requirements, and obtain cumulative rewards and heuristic values based on all states;
[0059] As an optional implementation, the step of obtaining multiple states according to task requirements can be specifically divided into the following steps S10121:
[0060] S10121. The process of decomposing task requirements is conceptualized as a Markov decision framework, which includes multiple states, multiple actions, discount factors, and reward functions for state-action pairs.
[0061] Specifically, the task decomposition process is conceptualized as a Markov decision framework (MDP). Among them, state This represents the concatenation of the subtask description steps generated up to step t-1 with the input task requirements (i.e., s). t = [q; a1; ... a t-1 In special cases, s1 = q. (Action) This indicates that the large model is in the current input state s. t The next subtask to be generated will describe the steps. From the current state s t To the next state s t+1 Deterministic state transition This is accomplished through a simple concatenation operation. γ is the discount factor. It is a reward function that measures the degree of problem-solving. The reward function is outcome-based; it rewards by comparing the final result to the ground truth. The reward function for state-action pairs... As shown in the following formula:
[0062]
[0063] As an optional implementation, the step of obtaining the cumulative reward and heuristic value based on all states can be further divided into the following steps S10122 and S10123:
[0064] S10122. Calculate the rewards for all states, aggregate the rewards, and obtain the cumulative income.
[0065] Specifically, a process-based reward function is used. To calculate the transition from the initial state s1 to the current state st The cumulative return g(s) t As shown in the following formula:
[0066]
[0067] Where Agg∈{min,max,∑,[-1]},[-1] represents taking the reward of the last state as the gain, which is a summary of the progress from s1 to s2. t An aggregation function for rewards along the path.
[0068] S10123. Calculate the optimal cumulative expected return value of the state-action pair based on the reward function and discount factor, and then use the optimal cumulative expected return value as a heuristic value.
[0069] Specifically, using state-action pairs (s t ,a t The optimal cumulative expected return Q * (s t ,a t ) as the heuristic value h(s) t h(s) t ) is a heuristic value for reaching the correct answer from the current state. It is an estimate used to measure the probability or likelihood of reaching the final correct answer from the current state.
[0070] Optimal cumulative expected return Q * (s t ,a t The Bellman optimal equation satisfies the following formula:
[0071]
[0072] S1013. Calculate the extended value corresponding to each state based on the cumulative revenue and heuristic value;
[0073] It should be noted that large models use an autoregressive approach to generate natural language, meaning they predict the next token in the sequence based on previously generated tokens. However, if an error occurs in any previous step when generating subtask descriptions, the large model may introduce errors, fabricated scenarios, and contradictory statements into subsequent reasoning, thus failing to effectively solve the problem. Since large models generate each token with limited computational resources, they cannot allocate more computational resources to solving difficult problems. Therefore, this invention proposes Q... * That is, a system based on A * The algorithm addresses this problem by decomposing large model tasks. This framework effectively guides large models in selecting the most promising next step when performing multi-step inference.
[0074] Specifically, finding a solution for a given task description by subtask description steps is viewed as a heuristic search process, in which each state s t All are associated with a value f, which is used to estimate if the extended state s t How much extended value will be obtained, extended value f(s) t The result is obtained through the following formula:
[0075] f(s t )=g(s t )+λh(s t )
[0076] Wherein, g(s) t h(s) represents the accumulated profit starting from the initial state s1. t ) represents the heuristic value, and λ is used to balance g(s) t ) and h(s t The coefficients of the weights between ).
[0077] Set the state-action pair (s) t ,a t The optimal cumulative expected return Q * (s t ,a t ) as the heuristic value h(s) t Then the extended value f(s) t It can be transformed into the following formula:
[0078]
[0079] Since enumerating all possible next inference steps is impractical, this embodiment of the invention limits the selection to the top K steps among all candidates returned by the large model. Therefore, the above equation can be written as:
[0080]
[0081] Regarding Q * The most critical issue is estimating the optimal Q-value (i.e., the optimal cumulative expected reward) for a given state-action pair in a given task description problem, which requires learning a proxy Q-value model. From the dataset Medium approximation of Q * The dataset D consists of N task requirements, and each task requirement has a set of M trajectories. These trajectories were sampled from the optimal strategy.
[0082] In form, the proxy Q-value model It is learned by minimizing the following objective function:
[0083]
[0084] Among them, s t It is a trajectory The partial inference trajectory up to step t-1, and The true optimal Q value Q * (s t ,a t Approximate labels for ).
[0085] Specifically, this embodiment of the invention employs an offline reinforcement learning method to construct Q-value labels for task requirements. For a given offline dataset D, a proxy Q-value model is learned using Fitted Q-iteration. For each iteration l, the Q-value labels are constructed using the following formula.
[0086]
[0087] in, This is the surrogate Q-value model learned in iteration l-1. Then, a new surrogate model is trained based on the aforementioned objective function. These two phases will alternate for L iterations, using As a proxy Q-value model To reason.
[0088] In obtaining the agent Q-value model Then, insert it into the following formula to calculate the eigenvalue of each state and perform A. * Best-priority search:
[0089]
[0090] S1014. Sort the states from high to low according to their extended value, and determine a preset number of states as candidate states based on the sorting results.
[0091] S1015. Expand each candidate state according to the optimal strategy to obtain multiple subtask description steps.
[0092] Specifically, based on A *The large-scale task decomposition algorithm uses two sets to control the optimal priority search process: one set contains candidate states to be explored, called the unvisited set, and the other set records visited states. At each step, the algorithm selects the state with the largest f-value from the unvisited set and expands that state by generating the top K (a predetermined number) alternative actions using an optimal strategy. The algorithm then updates both sets and repeats this process until a terminal state, representing the complete inference trajectory, is found. Finally, the answer is extracted from the terminal state as the final result, yielding the complete subtask description steps.
[0093] It should be noted that this preset quantity can be selected according to actual needs. For example, the preset quantity can be 5, 10, etc.
[0094] S102. Search for the description steps of each subtask to obtain information on multiple related components. Then, input the task requirements, subtask description steps and related component information into the large model to obtain component description information.
[0095] It should be noted that, in obtaining the complete subtask description, the steps a = a1; a1; ... a T Next, corresponding component description information needs to be generated for each subtask process to solve each subtask. Since the subtask description step is a long-term task, to alleviate the illusion of complexity when using a large model and to obtain satisfactory component description information, this embodiment of the invention uses a combination of thought chaining and RAG (Related Aspects of Components). By querying and retrieving each step of the subtask description process, the most relevant component information is obtained for each subtask. After obtaining all relevant component information, the task description, subtask description steps, and relevant component information are input into the large model to obtain the final component description.
[0096] As an optional implementation, the step of retrieving information on multiple related components by describing each subtask can be further divided into the following steps S1021 to S1024:
[0097] S1021. Obtain the component library, which contains various components;
[0098] S1022. Extract the semantic-aware embedding vector and query embedding vector of each component in the component library;
[0099] S1023. Obtain the correlation between subtask description steps and components based on semantically aware embedding vectors and query embedding vectors;
[0100] S1024. Determine the most relevant component corresponding to each subtask description step to obtain information on multiple relevant components.
[0101] It's important to note that RAG can alleviate the illusion of large models. However, traditional RAG retrieves all relevant information at once. For complex tasks like generating component descriptions for subtask processes, it struggles to translate this into effective search queries, making it difficult to predict the information needed for subsequent inference and generation steps. Simultaneously, the task hints themselves are often insufficient to provide adequate guidance. This leads to difficulty in finding relevant documentation, thus limiting the application of RAG. Mind Chain, on the other hand, aims to improve the performance of large models in tasks requiring complex steps by solving complex problems through a step-by-step thinking approach. Therefore, this embodiment of the invention employs a combination of RAG and Mind Chain to obtain the most accurate component descriptions.
[0102] Specifically, given a component library RAG aims to retrieve the most relevant components based on a query, which is based on subtask description steps a = a1; a1; ... a1; ... a2 T The semantic-aware embedding vectors of the component descriptions in the component library are obtained first. (i.e., each component C) i The embedding representation (a real vector of size K) and the embedding vector of the query. Here, emb(·) represents the embedding function, which can be implemented using various text embedding models. In this embodiment of the invention, Sentence-BERT is used.
[0103] Next, using cosine similarity sin(Q,C) i The relevance of subtask description steps to components is measured using the following formula:
[0104]
[0105] Based on their relevance, the component with the highest relevance is selected, and then the corresponding component is retrieved for each subtask description step a, thus obtaining the relevant component library C. ‘ Related component library C ‘ Includes information on multiple related components.
[0106] Furthermore, the relevant component library C was obtained. ‘ Then, the task requirement q and the subtask description steps a = a1; a1; ... a T Related component library C ‘ As input prompts, these information is used by the large model to generate the final component description. This description is then reviewed by the user. If the user confirms the accuracy of the description, the corresponding component information is added to the component library to enrich its content. Any issues discovered are promptly reported to the large model so that the answer can be regenerated and optimized.
[0107] S103. Construct a prompt template and obtain the workflow through the large model based on the prompt template, task requirements, and component description information.
[0108] It should be noted that the large model needs to comprehensively consider the specific requirements of the task and the parameter passing between subtasks to construct a complete workflow. This step is mainly completed based on the subtask description steps and component description information obtained above. For example... Figure 2 The diagram shows the component assembly process, which is divided into two stages to complete the component assembly and generate the workflow. The first stage is to provide initial prompts for the large model, introduce the task context, available components, and the expected format of the generated workflow. The second stage is to use the components to generate the subsequent workflow and deliver it to the user.
[0109] As an optional implementation, the step of constructing the prompt template can be further divided into the following steps S1031:
[0110] S1031. Construct a prompt template based on the component description information and the subtask description steps;
[0111] The prompt templates include role and target prompts, context information prompts, component description prompts, limitation prompts, and demonstration prompts.
[0112] Specifically, in the first phase, knowledge is imparted to the large model through prompt templates, enabling it to understand and perform specific tasks. The prompt templates consist of five parts: role and goal prompts, contextual information prompts, component description prompts, constraint prompts, and demonstration prompts.
[0113] (1) Role and objective hints:
[0114] By outlining the roles and objectives of the large model through role and objective cues, the large model gains clarity regarding the specific task it is expected to perform. Concisely defining roles and objectives allows for more effective communication of intent and expectations with fewer symbols. This offers two benefits: First, it enables the large model to better conform to general requirements, producing outputs that align with the expected roles and objectives. Second, concise text concentrates meaning within fewer symbols, allowing the large model to infer stronger connections between textual elements with higher attention weights, while preventing dilution of model attention.
[0115] (2) Contextual information prompts:
[0116] Contextual information cues aim to provide the large model with descriptive information about the specific system (i.e., subtask description steps) necessary for effective reasoning. The information provided in this contextual section serves two purposes: First, it enables the large model to understand the system's operation and incorporate additional information about the specific system. Second, since the large model has been trained on extensive data, it possesses a wealth of implicit general knowledge stored in its model weights. The descriptive information provided in the cues guides the large model to "focus its attention" on the relevant knowledge embedded in the model when generating text. In this sense, this process achieves the combination of the large model's general knowledge with the specific knowledge specified in the cues to perform task-specific reasoning.
[0117] (3) Component description prompts:
[0118] The component description prompts provide all the component descriptions needed to complete the task requirement q. The large model needs to complete the assembly and generate the workflow based on these component descriptions.
[0119] (4) Restriction prompts:
[0120] The constraint prompt limits the output of the large model by specifying the required output format and generated content. In this embodiment of the invention, a JSON structure is used to organize the input / output data of all operations in the workflow. Input data is presented in key-value pairs, with each data point having a specific key for easy parsing and manipulation. The JSON structure facilitates indexing specific data fields when transferring data between different software programs. A thought-chain approach is used to promote logically structured reasoning, ensuring the correct format of the generated workflow.
[0121] (5) Demonstration Tips:
[0122] The demo prompts provide validated, concrete examples demonstrating the expected input-output pattern. This offers several benefits: First, it restricts the structure of the text to be generated. Second, even with a limited number of examples, model performance can be improved. Finally, the examples can help further clarify contextual information and dispel ambiguity regarding the abstract information provided so far.
[0123] It should be noted that, in this embodiment of the invention, the prompt template provides the large model with a detailed description and demonstration of the task background and available components, thereby helping the large model understand the task objectives and effectively improving the understanding and execution capabilities of the large model, thus improving the efficiency and accuracy of subsequent workflow generation.
[0124] As an optional implementation, the step of obtaining the workflow from the large model based on the prompt template, task requirements, and component description information can be further divided into the following steps S1032 and S1033:
[0125] S1032. Input the prompt template and the task requirements into the large model to obtain the workflow description file;
[0126] S1033. Obtain user feedback results based on the workflow description file, and update the workflow description file using the large model based on the user feedback results to obtain the workflow.
[0127] Specifically, in the second stage, the large model utilizes the knowledge gained from the component descriptions in the first stage, along with a deep understanding of user needs, to automatically generate a structured, executable workflow description file. This workflow description file contains the steps and logic of the workflow, which can be directly imported into the low-code platform for execution. The large model presents the user with a high-level description of the generated workflow (i.e., the workflow description file), which explains the workflow's logic and functionality in concise and clear language. Users do not need to deeply understand the underlying code; they can provide feedback based on the workflow description file, such as pointing out errors, offering improvement suggestions, or clarifying issues. The large model then adjusts the workflow description file based on the user feedback and makes necessary improvements to ensure it accurately meets user needs, resulting in the final workflow for execution on the low-code platform. This embodiment of the invention enhances the two-way interaction between the large model and the user through the aforementioned user feedback mechanism, improving the accuracy and reliability of workflow generation and increasing user trust and satisfaction with the system.
[0128] The above describes the cross-system business integration workflow generation method based on a large model according to embodiments of the present invention. It can be recognized that, compared with prior art workflow generation methods, embodiments of the present invention have the following advantages:
[0129] 1. The large model automatically decomposes the user-described task requirements into a series of operable sub-task description steps, and automatically retrieves the most relevant component description information based on the sub-task description steps, and finally automatically generates a structured and executable workflow, which can realize the efficient generation of cross-system business process component integration workflow.
[0130] Second, reinforcement learning and heuristic search techniques are introduced to guide the large model in selecting the optimal subtask execution path, and RAG technology is introduced to reduce the probability of model errors and illusions, thereby improving the accuracy and reliability of the workflow.
[0131] Third, through the user feedback mechanism, users are allowed to adjust and optimize the generated workflow, so that the generated workflow can more accurately meet user needs and can be flexibly adjusted according to user needs to adapt to different business scenarios.
[0132] Reference Figure 3This invention also provides a cross-system business integration workflow generation system based on a large model, comprising:
[0133] The task decomposition module is used to obtain task requirements and decompose the task requirements through a large language model to obtain multiple sub-task description steps.
[0134] The component generation module is used to retrieve the description steps of each subtask, obtain multiple related component information, and then input the task requirements, subtask description steps and related component information into the preset large model to obtain component description information.
[0135] The workflow generation module is used to build prompt templates and generate workflows based on prompt templates, task requirements, and component descriptions from a large model.
[0136] The content of the above embodiments of the cross-system business integration workflow generation method based on large models is applicable to this embodiment of the cross-system business integration workflow generation system based on large models. The specific functions implemented by this embodiment of the cross-system business integration workflow generation system based on large models are the same as those of the above embodiments of the cross-system business integration workflow generation method based on large models, and the beneficial effects achieved are also the same as those achieved by the above embodiments of the cross-system business integration workflow generation method based on large models.
[0137] This invention also provides an electronic device, comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for communication between the processor and the memory. When the program is executed by the processor, it implements the aforementioned method for generating cross-system business integration workflows based on a large model. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0138] like Figure 4 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of the present invention. (Refer to...) Figure 4 This invention provides an electronic device, comprising:
[0139] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0140] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the cross-system service convergence workflow generation method based on a large model according to the embodiments of this invention.
[0141] Input / output interface 1003 is used to implement information input and output;
[0142] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0143] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0144] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0145] This invention also provides a storage medium, which is a computer-readable storage medium for computer-readable storage. The storage medium stores one or more programs, which can be executed by one or more processors to realize the above-described cross-system business integration workflow generation method based on a large model.
[0146] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0147] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 1 The method shown.
[0148] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the aforementioned blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0149] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the aforementioned functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0150] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, 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 cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0152] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0153] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0154] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A method for generating cross-system business integration workflows based on a large model, characterized in that, Includes the following steps: Obtain task requirements, and decompose the task requirements using a pre-defined large model to obtain multiple sub-task description steps; The sub-task description steps are retrieved to obtain multiple related component information. Then, the task requirements, the sub-task description steps, and the related component information are input into the large model to obtain component description information. A prompt template is constructed, and a workflow is obtained through the large model based on the prompt template, the task requirements, and the component description information. The step of decomposing the task requirements into multiple sub-task descriptions using a pre-defined large model specifically includes: Determine the optimal strategy for the large model and input the task requirements into the large model; Based on the task requirements, multiple states are obtained, and based on all the states, the cumulative reward and heuristic value are obtained. The extended value corresponding to each state is calculated based on the cumulative revenue and the heuristic value. The states are sorted from high to low according to the extended value, and a preset number of states are determined as candidate states based on the sorting result. The candidate states are expanded according to the optimal strategy to obtain multiple subtask description steps; The step of retrieving the descriptions of each subtask to obtain information on multiple related components specifically includes: Obtain the component library, which contains various components; Extract the semantic-aware embedding vector and query embedding vector of each component in the component library; The relevance between the subtask description step and the component is obtained based on the semantically aware embedding vector and the query embedding vector; Determine the component with the highest relevance corresponding to each of the subtask description steps, and obtain information on multiple related components; The build prompt template is specifically as follows: The prompt template is constructed based on the component description information and the subtask description steps; The prompt templates include role and target prompts, context information prompts, component description prompts, limitation prompts, and demonstration prompts.
2. The method for generating cross-system business integration workflow based on a large model according to claim 1, characterized in that, The process of obtaining multiple states based on the task requirements is as follows: The decomposition process of the task requirements is conceptualized as a Markov decision framework, which includes multiple states, multiple actions, discount factors, and reward functions for state-action pairs.
3. The method for generating cross-system business integration workflow based on a large model according to claim 2, characterized in that, The process of obtaining the cumulative reward and heuristic value based on all the states specifically includes: Calculate the reward for all the states, and perform an aggregation operation on each reward to obtain the cumulative benefit; The optimal cumulative expected return value of the state-action pair is calculated based on the reward function and the discount factor, and then the optimal cumulative expected return value is used as the heuristic value.
4. The method for generating cross-system business integration workflow based on a large model according to claim 1, characterized in that, The process of obtaining the workflow through the large model based on the prompt template, the task requirements, and the component description information specifically includes: Input the prompt template and the task requirements into the large model to obtain the workflow description file; Based on the user feedback results obtained from the workflow description file, the workflow description file is updated using the large model based on the user feedback results to obtain the workflow.
5. A cross-system business integration workflow generation system based on a large model, characterized in that, include: The task decomposition module is used to obtain task requirements and decompose the task requirements through a large language model to obtain multiple sub-task description steps. The component generation module is used to retrieve the description steps of each subtask to obtain multiple related component information, and then input the task requirements, the subtask description steps and the related component information into a preset large model to obtain component description information. The workflow generation module is used to construct a prompt template and generate a workflow based on the prompt template, the task requirements, and the component description information through the large model. The step of decomposing the task requirements into multiple sub-task descriptions using a pre-defined large model specifically includes: Determine the optimal strategy for the large model and input the task requirements into the large model; Based on the task requirements, multiple states are obtained, and based on all the states, the cumulative reward and heuristic value are obtained. The extended value corresponding to each state is calculated based on the cumulative revenue and the heuristic value. The states are sorted from high to low according to the extended value, and a preset number of states are determined as candidate states based on the sorting result. The candidate states are expanded according to the optimal strategy to obtain multiple subtask description steps; The step of retrieving the descriptions of each subtask to obtain information on multiple related components specifically includes: Obtain the component library, which contains various components; Extract the semantic-aware embedding vector and query embedding vector of each component in the component library; The relevance between the subtask description step and the component is obtained based on the semantically aware embedding vector and the query embedding vector; Determine the component with the highest relevance corresponding to each of the subtask description steps, and obtain information on multiple related components; The build prompt template is specifically as follows: The prompt template is constructed based on the component description information and the subtask description steps; The prompt templates include role and target prompts, context information prompts, component description prompts, limitation prompts, and demonstration prompts.
6. An electronic device, characterized in that, The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for enabling communication between the processor and the memory. When the program is executed by the processor, it implements the steps of the cross-system service convergence workflow generation method based on a large model as described in any one of claims 1 to 4.
7. A storage medium, said storage medium being a computer-readable storage medium for computer-readable storage, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the steps of the cross-system business integration workflow generation method based on a large model as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Workflow scheduling method for distributed coordination of industrial software components
CN116974721A
Workflow generation method based on large language model, agent, medium and terminal
CN118551022A