RPA process intelligent generation method and device and computer readable storage medium

By using vectorization and hierarchical parsing, a set of tools that meet the criteria is selected and information is dynamically injected, which solves the accuracy and stability problems in the large model generation RPA process and achieves efficient and accurate RPA process generation.

CN122240665APending Publication Date: 2026-06-19NINETECH INFORMATION TECH (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINETECH INFORMATION TECH (SHENZHEN) CO LTD
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing technologies for generating RPA processes from large models suffer from problems such as incorrect parameter structures and tool names, high costs, and poor output stability.

Method used

By receiving user input information and vectorizing it, a set of available tools that meet preset conditions is selected, tool-level information is dynamically injected, and the structured data output by the large model is parsed in a hierarchical manner to avoid tool illusion and information overload, thereby improving the accuracy and stability of generation.

Benefits of technology

It achieves high accuracy and low cost in RPA process generation, avoids tool illusion and information overload, and improves the output quality and stability of large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240665A_ABST
    Figure CN122240665A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent RPA process generation method, apparatus, and computer-readable storage medium. The method receives current user input information, vectorizes it to obtain a user input vector, and then filters a set of available tools that meet preset conditions based on the user input vector from a vector database and a set of user-specific permission tools, thus avoiding the tool illusion phenomenon during the large model generation process. By dynamically injecting tool granularity information into the large model through the user input vector and the available tools set, it avoids inputting the full information of all tool libraries into the large model, which consumes a large number of tokens. Furthermore, it performs hierarchical parsing on the structured data output by the large model, avoiding the mixing of irrelevant content such as chat information and Markdown tags in the output results. Thus, it solves the technical problems of poor accuracy, high cost, and poor stability in related technologies that generate RPA processes through large models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of RPA technology, and in particular to an intelligent RPA process generation method, apparatus, and computer-readable storage medium. Background Technology

[0002] RPA: Robotic Process Automation;

[0003] Token: A word or lexicon is the smallest unit of text that a large model processes.

[0004] Markdown tags: Tags used to control text formatting styles;

[0005] JSON: A universal, lightweight plain text data format.

[0006] With the widespread application of AI large-scale model technology, users can quickly generate RPA processes by inputting prompts into the large model. However, related technologies may encounter the following problems during the rapid generation of RPA processes using large models: tool illusion: due to a lack of awareness of the user's private tool library, the large model often "illusory" non-existent tool names or incorrect parameter structures, resulting in unexecutable processes; context window waste: injecting all tool library information into the large model context not only consumes a large amount of tokens (leading to high costs) but also dilutes the model's attention due to information overload, reducing generation quality; poor robustness of large model output parsing: the large model output format is unstable (e.g., mixed with chat, Markdown tags, or non-standard JSON), and existing solutions lack effective fault-tolerant parsing mechanisms, causing interruptions in the generated RPA process.

[0007] Therefore, how to solve the technical problems of incorrect parameter structure and tool names, high cost, and poor output stability in the generation of RPA processes from large models has become a technical challenge that needs to be overcome by those skilled in the art. Summary of the Invention

[0008] This invention proposes an intelligent RPA process generation method, apparatus, and computer-readable storage medium to solve the technical problems of low accuracy, high cost, and poor stability in related technologies that generate RPA processes from large models.

[0009] In a first aspect, one embodiment of the present invention provides an intelligent RPA process generation method, comprising:

[0010] Receive the current user input information and perform vectorization processing on the current user input information to obtain the user input vector;

[0011] Based on the user input vector, a set of available tools that meet preset conditions is selected from the vector database and the user-specific permission toolset;

[0012] Based on the user input vector and the available toolset, dynamically inject tool-granular information into the target large model;

[0013] Based on the available toolset and the current user input information, the structured data generated by the target large model is obtained;

[0014] The structured data is parsed hierarchically to obtain the target RPA process.

[0015] The RPA process intelligent generation method of this invention has at least the following beneficial effects:

[0016] This invention discloses an intelligent RPA process generation method. It receives current user input information, vectorizes it to obtain a user input vector, and then filters a set of available tools that meet preset conditions based on the user input vector from a vector database and a user-specific permission toolset, avoiding the "tool illusion" phenomenon during the large model generation process. By dynamically injecting tool-level information into the large model using the user input vector and available toolsets, it avoids inputting full information from all tool libraries into the large model, consuming a large number of tokens. Furthermore, it performs hierarchical parsing on the structured data output by the large model, preventing the output from mixing irrelevant content such as chat messages and Markdown tags. This solves the technical problems of poor accuracy, high cost, and poor stability in related technologies that generate RPA processes from large models. Therefore, it provides a highly accurate, low-cost, and stable intelligent RPA process generation method.

[0017] According to other embodiments of the RPA process intelligent generation method of the present invention, the preset conditions include a preset number of return items and a preset cosine similarity;

[0018] The step of filtering available toolsets that meet preset conditions based on the user input vector from the vector database and the user-specific permission toolset includes:

[0019] Obtain the corresponding user ID based on the current user input information;

[0020] Retrieve the corresponding user-specific permission toolset based on the user ID;

[0021] Based on the user input vector, a candidate toolset is obtained from the vector database that satisfies the preset number of return items and the preset cosine similarity.

[0022] The available toolset is obtained by performing an intersection operation between the candidate toolset and the user-specific permission toolset.

[0023] According to other embodiments of the RPA process intelligent generation method of the present invention, the step of dynamically injecting tool-granular information into the target large model based on the user input vector and the available toolset includes:

[0024] Traverse the available toolset and obtain the cosine similarity between the user input vector and the feature vector of the current tool;

[0025] The similarity level is obtained based on the cosine similarity and the preset level score;

[0026] Based on the similarity level, tool-level information is dynamically injected into the target large model.

[0027] According to other embodiments of the RPA process intelligent generation method of the present invention, the step of dynamically injecting tool granular information into the target large model according to the similarity level includes:

[0028] If the similarity level is high similarity, then the complete definition of the current tool is injected into the target large model;

[0029] If the similarity level is medium, then the core definition content of the current tool is injected into the target large model;

[0030] If the similarity level is low, then the summary information of the current tool is injected into the target large model.

[0031] According to other embodiments of the RPA process intelligent generation method of the present invention, the step of obtaining the structured data generated by the target large model based on the available toolset and the current user input information includes:

[0032] The current user input information is used to construct structured prompt words according to a hierarchical approach of system-level prompt words and user-level prompt words, and the system-level prompt words include constrained output format specifications;

[0033] Based on the available toolset and the structured prompts, the target large model is invoked to perform inference and obtain the structured data.

[0034] According to another embodiment of the RPA process intelligent generation method of the present invention, the target RPA process includes flowchart code, missing parameter prompt information and a list of clarification questions;

[0035] The process of hierarchically parsing the structured data to obtain the target RPA includes:

[0036] The structured data is directly parsed into a standard JSON object, and the standard JSON object is read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions;

[0037] If parsing fails, then execute:

[0038] After cleaning the Markdown tags in the structured data, it is parsed into a standard JSON object. The standard JSON object is then read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions.

[0039] If parsing fails, then execute:

[0040] After extracting the first valid JSON block from the structured data, it is parsed into a standard JSON object. The standard JSON object is then read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions.

[0041] If parsing fails, then execute:

[0042] The flowchart code is directly extracted from the structured data, and the remaining fields are either left blank or processed as errors.

[0043] According to other embodiments of the RPA process intelligent generation method of the present invention, the step of determining the user's current intent based on the current user input information includes:

[0044] The user's historical input information from two rounds is combined as the current user input information to determine whether to execute the subsequent target RPA process generation step.

[0045] If the determination is yes, then the step of whether to execute the subsequent target RPA process generation step further includes:

[0046] Continue to determine whether the target RPA process is a new RPA process or an updated RPA process;

[0047] If it is the newly created RPA process, then after concatenating 10 rounds of user historical input information as the current user input information, the subsequent target RPA process generation steps are executed;

[0048] If it is the updated RPA process, then after concatenating 8 rounds of user historical input information as the current user input information, the subsequent target RPA process acquisition steps are executed;

[0049] If the determination is negative, then the current user input information is obtained by concatenating five rounds of historical user input information and proceeding to the casual chat reply process.

[0050] Secondly, one embodiment of the present invention provides an intelligent RPA process generation device, comprising:

[0051] The information vectorization processing module is used to receive the current user input information and perform vectorization processing on the current user input information to obtain the user input vector;

[0052] The available toolset filtering module is used to filter available toolsets that meet preset conditions based on the user input vector from a vector database and a user-specific permission toolset.

[0053] The large model dynamic information injection module is used to dynamically inject tool-granular information into the target large model based on the user input vector and the available toolset.

[0054] The structured data generation module is used to obtain the structured data generated by the target large model based on the available toolset and the current user input information;

[0055] The RPA process acquisition module is used to perform hierarchical parsing of the structured data to obtain the target RPA process.

[0056] Thirdly, an embodiment of the present invention provides a computer-readable storage medium storing an executable program, which is executed by a processor to implement the RPA process intelligent generation method as described above. Attached Figure Description

[0057] Figure 1 This is a schematic diagram illustrating the steps of a specific embodiment of an intelligent RPA process generation method according to an embodiment of the present invention;

[0058] Figure 2 This is a schematic diagram illustrating a specific embodiment of the intelligent generation method for RPA processes according to an embodiment of the present invention, which also includes the determination of the user's current intent.

[0059] Figure 3 This is a schematic diagram of a specific embodiment of the intelligent generation method for RPA processes according to an embodiment of the present invention, in which step S200 includes sub-steps;

[0060] Figure 4 This is a schematic diagram of a specific embodiment of the intelligent generation method for RPA processes according to an embodiment of the present invention, in which step S300 includes sub-steps;

[0061] Figure 5 This is a schematic diagram of a specific embodiment of the intelligent generation method for RPA processes according to an embodiment of the present invention, in which step S330 includes sub-steps;

[0062] Figure 6 This is a schematic diagram of a specific embodiment of the RPA process intelligent generation method according to an embodiment of the present invention, in which step S400 includes sub-steps;

[0063] Figure 7 This is a schematic diagram of a specific embodiment of the intelligent generation method for RPA processes according to an embodiment of the present invention, in which step S500 includes sub-steps;

[0064] Figure 8 This is a schematic diagram of the module composition of a specific embodiment of an intelligent RPA process generation device according to an embodiment of the present invention. Detailed Implementation

[0065] The following will describe the inventive concept and its resulting technical effects clearly and completely with reference to embodiments, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention.

[0066] In the description of the embodiments of the present invention, the term "several" means one or more, and the term "multiple" means two or more. The terms "greater than," "less than," and "exceeding" should be understood as excluding the stated number, while the terms "above," "below," and "within" should be understood as including the stated number. The terms "first" and "second" should be understood as distinguishing technical features, and not as indicating or implying relative importance, the number of indicated technical features, or the order of the indicated technical features.

[0067] Reference Figure 1 This invention provides an intelligent RPA process generation method, which is typically applied in intelligent devices (such as computers, servers / cloud servers) to address the technical problems of poor accuracy, high cost, and poor stability in related technologies when generating RPA processes from large models. Specifically, it includes the following steps:

[0068] S100: Receive the current user input information and vectorize the current user input information to obtain the user input vector;

[0069] The current user input information includes one or more pieces of information that the user inputs into the large model based on the current needs. By vectorizing the current user input information, the user input vector is obtained, and then the tool information contained in the current user input information can be accurately determined based on the user vector.

[0070] S200: Based on the user input vector, select the available toolset that meets the preset conditions from the vector database and the user-specific permission toolset;

[0071] The vector database stores toolsets related to RPA process generation, while the user-specific permission toolset is bound to the user ID corresponding to the current user's input information. Therefore, only toolsets that meet preset conditions and are simultaneously in the user-specific permission toolset and the vector database are selected as usable toolsets. In the subsequent RPA process generation, tools are only called from the usable toolset to prevent the "tool illusion" phenomenon in large model-generated RPA processes, which could cause nodes in the generated RPA process to contain components that do not exist in the user's environment.

[0072] S300: Dynamically inject tool-level information into the target large model based on the user input vector and the available toolset;

[0073] The available toolset obtained in step S200 typically contains multiple tools. If all the full information of all tools were injected into the target model, the target model would incur significant token overhead and inference costs when invoking the tools. Furthermore, information overload would dilute the target model's attention, reducing its output quality. Therefore, by dynamically injecting tool granularity information into the target model—inputting high-granularity information for highly relevant tools, medium-granularity information for moderately relevant tools, and low-granularity information for unrelevant tools—not only can token consumption be reduced, but the target model can also focus more on key information.

[0074] S400: Based on the available toolset and current user input information, obtain structured data generated by the target large model;

[0075] In this process, the target large model, based on the current user information received in step S100, constructs prompt words to constrain the target large model to output the expected results according to the prompt words. Simultaneously, constructing prompt words makes the input / output rules clearer, and also facilitates quick and efficient adjustments by the user when optimizing the output results. The target large model performs inference based on the prompt words constructed using the available toolset and the current user input information, and calls tools within the available toolset, ultimately generating and outputting structured data.

[0076] S500 performs hierarchical parsing of the structured data to obtain the target RPA process.

[0077] In step S400, after constraining the output of the target large model, its structured output data is obtained. However, since the output format of the target large model remains unstable, its structured output data may still contain random chat, Markdown tags, or non-standard JSON strings. Therefore, the content of the structured data may vary. If a uniform parsing method is used, it cannot be guaranteed that the resulting RPA process will execute smoothly. In this embodiment, a multi-level parsing mechanism is set up to respond to different parsing methods for the various cases of the target large model's output structured data. This achieves highly robust extraction of non-standard output from the target large model, ensuring the stability of the intelligent generation of the RPA process.

[0078] This invention discloses an intelligent RPA process generation method. After vectorizing the current user input information to obtain the user input vector, a retrieval enhancement mechanism is employed: based on the user input vector, a set of available tools meeting preset conditions is selected from a vector database and a user-specific permission toolset. During inference in the target large model, tools can only be called from this set of available tools, preventing the "tool illusion" phenomenon. Simultaneously, based on the user input vector and the available toolset, tool granularity information is dynamically injected into the target large model, ensuring that key tool descriptions are input in detail, while non-key tool descriptions are input simply. This reduces token consumption and allows the target large model to focus more on relevant information, improving output quality. Furthermore, multi-level parsing of the non-standard format output of the target large model achieves highly robust extraction of non-standard output, solving the technical problems of common parameter structure and tool name errors, high costs, and poor output stability in related technologies that generate RPA processes from large models.

[0079] Reference Figure 2 In some embodiments, since the user's current intent may be other types of business, not necessarily generating an RPA process; to accurately classify the user's current intent and improve system response speed, this embodiment adopts an SLM+LLM (small-large model collaboration) model, i.e., a small parameter model + a target large model. This is used before vectorizing the current user input information, specifically including the following steps:

[0080] S101. Determine the user's current intent based on the current user input information;

[0081] Specifically, by setting a model with a small number of parameters, the current user input information is classified into two categories: RPA flowchart generation and ordinary casual conversation (obviously, other business types can also be added).

[0082] In one specific embodiment, in order to accurately determine the user's current intent, the user's two rounds of historical input information are concatenated as the current user input information (the user's two most recent input information). A small parameter model is used to determine the user's current intent based on the concatenated two rounds of historical input information, and then decides whether to proceed to the subsequent target RPA process generation step.

[0083] S102. Determine whether to execute the subsequent target RPA process generation steps based on the user's current intent.

[0084] In step S201, after obtaining the user's current intent through the small parameter model, this step uses the small parameter model to determine whether to execute the subsequent target RPA process generation step. Since target RPA process generation includes two cases: updating the RPA process (based on user historical input) and creating a new RPA process, this embodiment further includes a sub-step after determining whether to execute the subsequent target RPA process generation step:

[0085] S1021. Determine whether the target RPA process is a new RPA process or an updated RPA process;

[0086] In this context, a newly created RPA process occurs when the current user input does not contain information about the original RPA process, and the generation of the target RPA process depends on the inference of the target large model. An updated RPA process, on the other hand, occurs when the current user input contains information about the original RPA process, and the generation of the target RPA process is performed by the target large model based on the inference of the original RPA process.

[0087] When creating a new RPA process, the following steps are executed:

[0088] S1022. After concatenating 10 rounds of user historical input information as the current user input information, execute the subsequent target RPA process generation steps;

[0089] When in the process of updating an RPA process, the following steps are executed:

[0090] S1023. After concatenating 8 rounds of user historical input information as the current user input information, execute the subsequent target RPA process generation steps;

[0091] If the determination in step S102 is negative, meaning that the subsequent target RPA process generation steps are not executed based on the user's current intention, then the system determines that the user's current intention is "casual conversation," and executes the following steps:

[0092] S1024. After combining five rounds of user history input information as the current user input information, proceed to the casual chat reply process.

[0093] In this embodiment, the system first determines whether to execute the subsequent target RPA process generation step based on the user's current intent. If it is determined that the subsequent target RPA process step should be executed, it further determines whether to create a new RPA process or update the RPA process. Then, different rounds of user historical input information are concatenated as the current user input information for different execution processes: if the user's current intent is "casual conversation," 5 rounds of user historical input information are concatenated; if the user's current intent is "create a new RPA process," 10 rounds of user historical input information are concatenated; and if the user's current intent is "update the RPA process," 8 rounds of user historical input information are concatenated. Concatenating different rounds of user historical input information based on different user current intents ensures the accuracy of the subsequent execution process (target large model inference).

[0094] Reference Figure 3 In some embodiments, the preset conditions described in step S200 of the above embodiments include a preset number of returned items and a preset cosine similarity. Step S200 specifically includes the following sub-steps:

[0095] S210. Obtain the corresponding user ID based on the current user input information;

[0096] In this embodiment of the invention, when a user interacts with the system, the system identifies the user ID and executes a session mutual exclusion mechanism to ensure that each user has a single active session.

[0097] S220. Obtain the corresponding user-specific permission toolset based on user ID;

[0098] Each user ID corresponds to its own user-specific permission tool set based on its own permissions. That is, when the target large model performs inference to generate the target RPA process, the target large model should be limited to calling tools within the user-specific permission tool set, rather than the target large model freely calling tools outside the user-specific permission tool set according to its needs.

[0099] S230. Based on the user input vector, obtain a candidate toolset from the vector database that satisfies the preset number of return items and the preset cosine similarity.

[0100] The vector database stores a large number of toolsets used for RPA process generation. To accurately obtain the required toolset, the current user input information is vectorized to obtain the user input vector. Based on the user input vector, the vector database is indexed using the IVF_FLAT indexing method (inverted file-flat index), following a mechanism of topK ≤ 20 and score ≥ 0.4 to return query results. The returned query results constitute the candidate toolset. Here, topK ≤ 20 corresponds to a preset number of returned items, and score ≥ 0.4 corresponds to a preset cosine similarity, meaning that the 20 items with the highest cosine similarity to the user input vector are first selected from the vector database, and vectors with a cosine similarity < 0.4 are removed from these 20. The final result vector is the corresponding candidate toolset.

[0101] S240. Perform an intersection operation between the candidate toolset and the user-specific permission toolset to obtain the usable toolset.

[0102] In this process, after obtaining a candidate toolset from the vector database based on the user input vector, some tools in this set may not be included in the user's exclusive permissions toolset. If these tools are directly called in the subsequent target large model to generate the target RPA process, the generated target RPA process will be unexecutable under the current user. In this embodiment, by performing an intersection operation between the candidate toolset obtained in step S230 and the user-exclusive toolset obtained in step S220, the resulting usable toolset is used as the tools called in the subsequent inference of the target large model. This ensures that the target RPA process finally obtained after inference by the target large model can be successfully executed in the current user environment.

[0103] Reference Figure 4 In some embodiments, after obtaining the available toolset in the foregoing embodiments, it is necessary to input the descriptions of each tool in the available toolset into the target large model so that the target large model can perform tool invocation inference based on the description information of each tool. In this embodiment, in order to reduce the token consumption input into the target large model, reduce inference costs, and improve the focus of the target large model, step S300 includes the following sub-steps:

[0104] S310. Traverse the available toolset and obtain the cosine similarity between the user input vector and the feature vector of the current tool.

[0105] In this context, the current tool feature vector belongs to the available toolset. Calculating the cosine similarity between each available toolset and the user input vector yields multiple cosine similarity values. In practical applications, steps S230 and S240 in the above embodiment only need to be strictly sorted according to cosine similarity from high to low; therefore, step S310 in this embodiment does not need to be recalculated.

[0106] S320. Obtain the similarity level based on the cosine similarity and the preset level score;

[0107] The aforementioned steps involve sorting the available toolset according to their cosine similarity to the user's input vector from highest to lowest. The similarity level of each tool is then determined by comparing the cosine similarity score with a preset score. In a specific application example, a cosine similarity score ≥ 0.7 corresponds to high similarity, 0.5 ≤ cosine similarity score < 0.7 corresponds to medium similarity, and a cosine similarity score < 0.5 (in which case a cosine similarity score ≥ 0.4) corresponds to low similarity.

[0108] S330. Dynamically inject tool-level information into the target large model based on similarity level.

[0109] After obtaining the similarity levels of each tool in the available toolset in step S320 above, different tool-level information is injected into the target large model according to different similarity levels. In some more detailed application scenarios, the similarity levels can be adapted to be divided into more levels to meet the application requirements of the scenario.

[0110] Reference Figure 5 In a specific application, step S330 of the above embodiment specifically includes the following sub-steps:

[0111] S331. If the similarity level is high, then inject the complete definition of the current tool into the target large model;

[0112] The current tool refers to the tool whose feature vector and the user input vector have a cosine similarity that meets the preset high similarity level requirement in the available toolset. The complete definition includes: all parameter names, types, required fields, default values ​​and function descriptions.

[0113] S332. If the similarity level is medium, then inject the core definition content of the current tool into the target large model;

[0114] The current tool refers to the tool whose feature vector and user input vector have a cosine similarity that meets the preset medium similarity level requirement in the available toolset. The core definition includes: tool name, function description and required parameters only.

[0115] S333. If the similarity level is low, then inject the summary information of the current tool into the target large model.

[0116] The current tool refers to the tool whose feature vector and user input vector have a cosine similarity that meets the preset low similarity level requirement in the available toolset. The summary information includes: tool name and function summary.

[0117] In this embodiment of the invention, by dynamically injecting tool-level information into the target large model according to the similarity level, not only can token consumption be reduced, but the target large model can also focus more on key information.

[0118] Reference Figure 6 In some embodiments, to constrain the output format of the target large model and make the input / output rules clearer, and to facilitate quick and efficient adjustments by the user when adjusting and optimizing the output results of the target large model, step S400 in the above embodiments includes the following sub-steps:

[0119] S410. Construct system-level prompts based on the available toolset, and construct user-level prompts based on the current user input information;

[0120] The system-level prompts are constructed based on the available toolset obtained in the above embodiments. In one specific implementation, the system-level prompts are constructed according to steps S331 to S333, that is, tool-level information is dynamically injected into the system-level prompts based on the similarity levels of the tools in the available toolset. Furthermore, the system-level prompts also include constraints on output format specifications (JSON Schema), role settings, node connection rules, subgraph specifications, etc. In some embodiments, when the available toolset remains unchanged (sorted by cosine similarity, with no change in the similarity levels of the tools), the system-level prompts can be reused without occupying system cache. User-level prompts include a cropped summary of historical dialogues (cropped after concatenating user's historical input information) and the current specific instruction.

[0121] S420: Based on system-level prompts and user-level prompts, the target large model is invoked for inference to obtain structured data output.

[0122] In this embodiment, after inputting system-level and user-level prompts into the target model, the output of the target model after inference is the structured data (JSON string). By constructing the prompts through a hierarchical structure, the rules for inference performed by the target model become clearer, and adjustments to the output (structured data) are made more easily by adapting and modifying the system-level and / or user-level prompts.

[0123] Reference Figure 7In some embodiments, the target RPA process obtained after hierarchical parsing of the structured data output by the target large model includes flowchart code, missing parameter hints, and a list of clarification questions. To accurately perform hierarchical parsing of the structured data output by the target large model, this example provides step S500, which specifically includes the following sub-steps:

[0124] S510. Parse the structured data directly into a standard JSON object, and read the JSON object to obtain the flowchart code, missing parameter prompts, and a list of clarification questions;

[0125] In step S420 above, after the target large model outputs structured data (JSON string), the obtained structured data is first directly deserialized into a standard JSON object.

[0126] If step S510 fails, then proceed to step:

[0127] S520. After cleaning the Markdown tags in the structured data, parse it into a standard JSON object, and read the JSON object to obtain the flowchart code, missing parameter prompts and a list of clarification questions;

[0128] The specific methods for cleaning Markdown tags in structured data include: calling indexOf('\n') to find the first newline character, then calling lastIndexOf("```") to find the last backtick, then calling substring() to extract the pure JSON string in the middle, and finally calling JsonUtils.fromJson() to parse the extracted JSON string and obtain a JSON object.

[0129] If step S520 fails, then proceed to step:

[0130] S530. After extracting the first valid JSON block from the structured data, parse it into a standard JSON object, and read the JSON object to obtain the flowchart code, missing parameter prompts, and a list of clarification questions;

[0131] Specifically, the first left curly brace in the structured data is located using indexOf('{'), the last right curly brace is located using lastIndexOf('}'), the JSON string between the two is extracted using substring(), and finally JsonUtils.fromJson() is called to parse the extracted JSON string and obtain a JSON object.

[0132] If step S530 fails, proceed to the fallback step:

[0133] S540: Directly extract the flowchart code from the structured data and set the remaining fields to null or handle errors.

[0134] If the system fails to execute step S530, it proceeds to the fallback parsing step S540. In this step, after extracting the flowchart code block from the structured data using regular expressions, the remaining fields (including missing parameter information and the list of clarification questions) are either set to null or processed as errors.

[0135] In this embodiment, by setting up multi-level fault-tolerant parsing and providing fallback processing even when all parsing methods fail, it can adapt to various situations of processing structured data output by the target large model. If a uniform parsing method is used, it cannot be guaranteed that the RPA process obtained after parsing can be executed smoothly.

[0136] The following specific example illustrates the execution process of the RPA process intelligent generation method of the present invention:

[0137] Example: Standard Scenario – Invoice Processing Flow Generation

[0138] Scenario description: The user wants to establish an RPA process that "automatically processes invoices and enters them into the ERP system";

[0139] (1) User input stage

[0140] The system provides a user interface where users can enter the following in the input box: "Please draw a process for me: first, read the invoice PDF from my email, extract the amount and date, then log in to our ERP system to enter this data, and finally send a confirmation email."

[0141] The system receives the input information from the current user and records the corresponding user ID.

[0142] (2) Intent recognition

[0143] By setting a model with a small number of parameters, the user's current intent is determined based on the received current user information. At this point, the output label is "MERMAID", which means that the subsequent target RPA process generation steps are executed and determined to be "new RPA process".

[0144] (3) Search and Filtering

[0145] The user's historical input information is concatenated as the current user's input information, and the current user's input information is vectorized to obtain the user input vector;

[0146] A candidate tool set is obtained by retrieving user input vectors from a vector database (numerical representation of cosine similarity):

[0147] PDF_Reader_v2 (0.85)

[0148] OCR_Invoice_Extract (0.82)

[0149] ERP_Login_Generic (0.65)

[0150] Email_Send_SMTP (0.78)

[0151] Excel_Write (0.45)

[0152] The intersection of the candidate toolset and the user-specific permission toolset is used to determine the available toolset.

[0153] (4) Construct system-level prompts and user-level prompts

[0154] Based on the available toolset, tool-level information is dynamically injected into the system-level prompts of the target large model. Constraints such as output format specifications (JSON Schema), role settings, node connection rules, and subgraph specifications are set in the system-level prompts. User-level prompts are also constructed based on the current user input information.

[0155] (5) Target large model reasoning

[0156] Generate structured data:

[0157] {

[0158] "mermaidCode": "graph TD; A[Start] --> B[Read PDF]; B --> C[Extract Data]...",

[0159] "missingParams": [],

[0160] "clarificationQuestions": ["Please confirm whether the ERP system login address is for the production environment or the testing environment?"],

[0161] Message: "The process has been generated. Please check your ERP login parameters."

[0162] }

[0163] (6) Step-by-step parsing and output

[0164] The corresponding parsing step S520 cleans the Markdown tags in the structured data, parses it into a standard JSON object, and reads the JSON object to obtain the flowchart code, missing parameter hints, and a list of clarification questions. The "graph TD" in the structured data is cleaned, parsed into a JSON object, and read from the JSON object to obtain the flowchart code, missing parameter hints, and a list of clarification questions. Simultaneously, the flowchart code is rendered and displayed to the user, and the clarification questions are highlighted to prompt the user to provide additional information.

[0165] Reference Figure 8 This invention also provides an intelligent RPA process generation device, which includes an information vectorization processing module, an available toolset filtering module, a large model dynamic information injection module, a structured data generation module, and an RPA process acquisition module. The information vectorization processing module receives current user input information and performs vectorization processing on it to obtain a user input vector. The available toolset filtering module filters available toolsets that meet preset conditions from a vector database and a user-specific permission toolset based on the user input vector. The large model dynamic information injection module dynamically injects tool granularity information into a target large model based on the user input vector and the available toolsets. The structured data generation module obtains structured data generated from the target large model based on the available toolsets and the current user input information. The RPA process acquisition module performs hierarchical parsing of the structured data to obtain the target RPA process. In this embodiment, after receiving the current user input information and vectorizing it to obtain the user input vector, a set of available tools that meet preset conditions is selected based on the user input vector from the vector database and the user-specific permission toolset, avoiding the tool illusion phenomenon during the large model generation process. By dynamically injecting tool granularity information into the large model using the user input vector and the available toolset, it avoids inputting the full information of all tool libraries into the large model, consuming a large number of tokens. Furthermore, it performs hierarchical parsing on the structured data output by the large model, preventing the large model output from mixing irrelevant content such as chat information and Markdown tags. This solves the technical problems of poor accuracy, high cost, and poor stability in related technologies that generate RPA processes through large models. The working process and implementation principle of the intelligent RPA process generation device in this embodiment, after receiving the current user input information, in response to the current user input information, are consistent with the intelligent RPA process generation methods described in the above embodiments, and will not be repeated here.

[0166] In practical applications, the RPA process intelligent generation device of this invention is embodied in the form of a computer with a specific program installed. The specific program installed on the computer enables it to implement the RPA process intelligent generation method described in any of the above embodiments.

[0167] This invention also provides a computer storage medium, wherein the computer-readable storage medium stores a computer-executable program, which, when executed by a processor, implements the RPA process intelligent generation method described in any of the above embodiments.

[0168] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.

Claims

1. A method for intelligent generation of RPA processes, characterized in that, include: Receive the current user input information and perform vectorization processing on the current user input information to obtain the user input vector; Based on the user input vector, a set of available tools that meet preset conditions is selected from the vector database and the user-specific permission toolset; Based on the user input vector and the available toolset, dynamically inject tool-granular information into the target large model; Based on the available toolset and the current user input information, the structured data generated by the target large model is obtained; The structured data is parsed hierarchically to obtain the target RPA process; The step of dynamically injecting tool-granular information into the target large model based on the user input vector and the available toolset includes: Traverse the available toolset and obtain the cosine similarity between the user input vector and the feature vector of the current tool; The similarity level is obtained based on the cosine similarity and the preset level score; Based on the similarity level, tool-level information is dynamically injected into the target large model.

2. The intelligent generation method for RPA processes according to claim 1, characterized in that, The preset conditions include a preset number of returned items and a preset cosine similarity. The step of filtering available toolsets that meet preset conditions based on the user input vector from the vector database and the user-specific permission toolset includes: Obtain the corresponding user ID based on the current user input information; Retrieve the corresponding user-specific permission toolset based on the user ID; Based on the user input vector, a candidate toolset is obtained from the vector database that satisfies the preset number of return items and the preset cosine similarity. The available toolset is obtained by performing an intersection operation between the candidate toolset and the user-specific permission toolset.

3. The intelligent generation method for RPA processes according to claim 1, characterized in that, The step of dynamically injecting tool-granular information into the target large model based on the similarity level includes: If the similarity level is high similarity, then the complete definition of the current tool is injected into the target large model; If the similarity level is medium, then the core definition content of the current tool is injected into the target large model; If the similarity level is low, then the summary information of the current tool is injected into the target large model.

4. The intelligent generation method for RPA processes according to claim 1 or 2, characterized in that, The structured data generated by obtaining the target large model based on the available toolset and the current user input information includes: System-level prompts are constructed based on the available toolset, and user-level prompts are constructed based on the current user input information; wherein, the system-level prompts also include constraints on output format specifications; Based on system-level prompts and user-level prompts, the target large model is invoked to perform inference and obtain the structured data.

5. The intelligent generation method for RPA processes according to claim 4, characterized in that, The target RPA process includes flowchart code, missing parameter prompts, and a list of clarification questions; The process of hierarchically parsing the structured data to obtain the target RPA includes: The structured data is directly parsed into a standard JSON object, and the standard JSON object is read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions; If parsing fails, then execute: After cleaning the Markdown tags in the structured data, it is parsed into a standard JSON object. The standard JSON object is then read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions. If parsing fails, then execute: After extracting the first valid JSON block from the structured data, it is parsed into a standard JSON object. The standard JSON object is then read to obtain the flowchart code, the missing parameter prompt information, and the list of clarification questions. If parsing fails, then execute: The flowchart code is directly extracted from the structured data, and the remaining fields are either left blank or processed as errors.

6. The intelligent generation method for RPA processes according to claim 1 or 2, characterized in that, Before performing vectorization processing on the current user input information to obtain the user input vector, the following steps are also included: Determine the user's current intent based on the current user input information; Determine whether to execute the subsequent target RPA process generation steps based on the user's current intent.

7. The intelligent generation method for RPA processes according to claim 6, characterized in that, The step of determining the user's current intent based on the current user input information includes: The user's historical input information from two rounds is combined as the current user input information to determine whether to execute the subsequent target RPA process generation step. If the determination is yes, then the step of whether to execute the subsequent target RPA process generation step further includes: Continue to determine whether the target RPA process is a new RPA process or an updated RPA process; If it is the newly created RPA process, then after concatenating 10 rounds of user historical input information as the current user input information, the subsequent target RPA process generation steps are executed; If it is the updated RPA process, then after concatenating 8 rounds of user historical input information as the current user input information, the subsequent target RPA process acquisition steps are executed; If the determination is negative, then the current user input information is obtained by concatenating five rounds of historical user input information and proceeding to the casual chat reply process.

8. An intelligent RPA process generation device, characterized in that, include: The information vectorization processing module is used to receive the current user input information and perform vectorization processing on the current user input information to obtain the user input vector; The available toolset filtering module is used to filter available toolsets that meet preset conditions based on the user input vector from a vector database and a user-specific permission toolset. The large model dynamic information injection module is used to dynamically inject tool-granular information into the target large model based on the user input vector and the available toolset. The structured data generation module is used to obtain the structured data generated by the target large model based on the available toolset and the current user input information; The RPA process acquisition module is used to perform hierarchical parsing of the structured data to obtain the target RPA process; The step of dynamically injecting tool-level information into the target large model based on the user input vector and the available toolset includes: Traverse the available toolset and obtain the cosine similarity between the user input vector and the feature vector of the current tool; The similarity level is obtained based on the cosine similarity and the preset level score; Based on the similarity level, tool-level information is dynamically injected into the target large model.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an executable program, which is executed by a processor to implement the RPA process intelligent generation method as described in any one of claims 1-7.