An RPA Knowledge Base Update Method for an AI Agent
Through the AI agent's large language model and flowchart construction module, combined with similarity search and knowledge base fusion, the problem of redundant information accumulation in the robot process automation knowledge base is solved, query efficiency and process reuse rate are improved, and the system's self-learning ability is enhanced.
Patent Information
- Application Number
- CN202510293914.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-03-13
AI Technical Summary
In the field of robot process automation, a large amount of redundant and low-quality process information may be accumulated in the knowledge base, resulting in a decrease in query efficiency and may interfere with the generation of RPA commands by the AI agent.
By using the AI agent's large language model to summarize the current tasks and processes, remove redundant information, and generate process descriptions; then convert the process description into a flowchart through the flowchart construction module; calculate the similarity between the flowchart and abstract process knowledge, and find the most similar collection of abstract process knowledge and executable process knowledge; measure the similarity between the flowchart and the executable process knowledge set, integrate executable process knowledge with similarity greater than the threshold, and update the knowledge base.
By reducing redundant information, improving query efficiency, generating more adaptable general processes, improving process reuse rate, reducing task processing time and cost, enhancing the system's self-learning ability and adapting to environmental changes.
Smart Images

Figure CN119807192B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotic process automation, and in particular to a method for updating an RPA knowledge base of an AI agent. Background Art
[0002] Robotic Process Automation (RPA) is also known as software robots. With RPA technology, you can configure RPA scripts to allow robots to simulate human user operations, interact with various software in the operating system, and perform repetitive or error-prone business process tasks, such as processing transactions and replying to emails. RPA technology can quickly and accurately process a large number of repetitive process tasks, improve the efficiency of process execution, and also reduce the probability of errors during process execution.
[0003] Large Language Model (LLM) has shown excellent performance in natural language text generation and code generation tasks due to its powerful semantic understanding ability on natural corpus. However, in the field of robotic process automation, the numerous process commands bring various paths for the completion of process tasks. At the same time, each process command has a unique configuration syntax, which brings challenges to the automatic generation of process commands, making it impossible to rely solely on large language models to automatically generate process commands. An adaptive architecture is needed to apply the powerful semantic understanding ability of large language models to the field of robotic process automation and promote the wider application and implementation of RPA technology. AI agent refers to an intelligent agent that can perceive the environment, understand it autonomously, make decisions and perform actions. Thanks to the powerful language understanding ability of LLM, AI agent based on LLM has powerful reasoning, planning and interaction capabilities. Traditional robotic process automation commands rely on predefined rules and processes, and it is difficult to cope with process changes or abnormal situations. Combining the intelligent decision-making ability of AI agent with the efficient execution ability of RPA can make up for the shortcomings of traditional RPA and realize a more intelligent automation system. The knowledge base plays an important role in the technology of AI agent intelligently generating RPA commands. The knowledge base contains historical records and experience, which can help AI agents quickly respond to complex problems. However, as the amount of tasks increases, a large amount of redundant and low-quality process information may accumulate in the AI agent's knowledge base, resulting in reduced query efficiency and may even interfere with the AIagent's generation of RPA commands. Therefore, in order to prevent too much redundant information in the knowledge base, the information in the knowledge base also needs to have an update mechanism. A robotic process automation knowledge base that can continuously update itself can help AI agents generate RPA commands by providing useful information, thereby promoting the further development of RPA technology. Summary of the invention
[0004] The purpose of the present invention is to solve the problem that a large amount of redundant process information is accumulated in the knowledge base update of robotic process automation, and to propose an RPA knowledge base update method of an AI agent, comprising the following steps:
[0005] S1. Use the AI agent’s large language model to summarize the current tasks and processes, remove redundant information, and generate a process description;
[0006] S2. Convert the process description into a flowchart through the flowchart construction module ;
[0007] S3. Build the RPA knowledge base of the AI agent, including executable process knowledge and abstract process knowledge. Abstract process knowledge is a summary of several executable process knowledge with similarity greater than a set value, and each abstract process knowledge corresponds to several executable process knowledge.
[0008] S4. Calculation flow chart Similarity with abstract process knowledge, find the most similar abstract process knowledge , and abstract process knowledge Corresponding executable process knowledge set ;
[0009] S5. Flowchart and executable process knowledge set Perform similarity measurement;
[0010] S6. Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The new executable process knowledge set is integrated to obtain a new set of executable process knowledge. Based on the new set of executable process knowledge, new abstract process knowledge is summarized through the large language model of the AI agent, and the RPA knowledge base of the AI agent is updated.
[0011] Furthermore, the calculation flow chart The similarity with abstract process knowledge is expressed as:
[0012] ;
[0013] in, express and The graph similarity of Represents abstract process knowledge, Represents the editing cost.
[0014] Further,
[0015] ;
[0016] Among them, n represents the number of editing operations, represents the cost of the i-th editing operation;
[0017] ;
[0018] Among them, represents the semantic similarity between processes and , z represents a constant, processes and belong to nodes and respectively, and the i-th editing operation means modifying into ;
[0019] ;
[0020] Among them, represents 's real number vector, represents 's real number vector, represents calculating the modulus of the vector.
[0021] Furthermore, according to the editing cost to obtain the final editing cost , using the final editing cost to calculate the similarity between the flowchart and the abstract process knowledge: , the process of obtaining the final editing cost from the editing cost is as follows:
[0022] Set the cost threshold , when , continuously find the mapping with the minimum editing cost between and , and update the status ; when , stop the mapping, and the threshold is used as the current editing cost; for the nodes in that have not been mapped, map them to each unmapped active node in , continuously find the mapping with the minimum editing cost, and update the status , until all the nodes in are matched with the nodes in , and output the final editing cost as .
[0023] Further, the specific process of fusing the executable process knowledge with a similarity greater than the threshold and the flow chart is as follows: Neutralization flow chart The executable process knowledge with a similarity greater than the threshold and the flow chart The specific process of fusion is as follows:
[0024] Taking one of the processes with the fewest number of nodes in as the basis, denotes the neutralization flow chart The executable process knowledge with a similarity greater than the threshold, and and the nodes with modification cost in are merged into the same node, denotes a set threshold; when the modification cost , add the nodes and control flows that appear in but not in to .
[0025] Further, if the executable process knowledge with a similarity greater than the threshold between the neutralization flow chart is an empty set, the executable process set corresponding to the most similar abstract process knowledge is updated to , where denotes the executable process set corresponding to the most similar abstract process knowledge, denotes the updated .
[0026] The present invention also proposes an RPA knowledge base update system for an AI agent, including:
[0027] A process description generation module, configured to use the large language model of the AI agent to summarize the current task and process, remove redundant information, and generate a process description;
[0028] A flow chart generation module, configured to convert the process description into a flow chart through a flow chart construction module ;
[0029] A knowledge base construction module, configured to construct an RPA knowledge base of the AI agent, including executable process knowledge and abstract process knowledge, where the abstract process knowledge is a summary of several executable process knowledge with a similarity greater than a set value, and each abstract process knowledge corresponds to several executable process knowledge;
[0030] A first similarity calculation module, configured to calculate the similarity between the flow chart and the abstract process knowledge, and find the most similar abstract process knowledge , and abstract process knowledge The corresponding executable process knowledge set ;
[0031] A second similarity calculation module, which is used to perform similarity measurement on the flow chart and the executable process knowledge set ;
[0032] A knowledge base update module, which is used to in and the flow chart The executable process knowledge with a similarity greater than the threshold is fused with the flow chart to obtain a new executable process knowledge set; according to the new executable process knowledge set, a new abstract process knowledge is summarized through the large language model of the AI agent, and the RPA knowledge base of the AI agent is updated.
[0033] The present invention also proposes a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned method for updating the RPA knowledge base of the AI agent is implemented.
[0034] The present invention also proposes an electronic device, including a processor and a memory, the processor is connected to the memory, wherein the memory is used to store a computer program, the computer program includes computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the above-mentioned method for updating the RPA knowledge base of the AI agent.
[0035] The beneficial effects brought by the technical solution provided by the present invention are:
[0036] The present invention uses a large language model to summarize the current task and process; converts the process into a flow chart through a flow chart construction module; compares the abstract knowledge in the knowledge base with the current process knowledge and the abstract process knowledge set to find the most similar abstract process knowledge; performs similarity measurement on the flow chart and the process knowledge associated with the executable process knowledge, selects the executable process knowledge with a similarity greater than the threshold, and fuses it with the current flow chart; and uses the LLM to summarize the current process knowledge set. The present invention reduces the number of similarity comparisons and improves the query efficiency by storing knowledge of different granularities; generates more adaptable general processes through the large language model, which can be applied to similar tasks in different scenarios, thereby improving the process reuse rate and reducing the time and cost of task processing; reduces the redundant process information accumulated in the knowledge base update through knowledge base fusion; combines the large language model and similarity search, enabling the system to automatically update and optimize the process according to new tasks, enhancing the self-learning ability of the system and the adaptability to environmental changes. Brief Description of the Drawings
[0037] Figure 1 is a flowchart of a method for updating the RPA knowledge base of an AI agent according to an embodiment of the present invention;
[0038] Figure 2 is the process knowledge fusion process according to an embodiment of the present invention;
[0039] Figure 3 is a block diagram of an electronic device in an exemplary embodiment of Embodiment 1 of the present invention. Detailed Embodiment
[0040] To make the objectives, technical solutions and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0041] The RPA knowledge base of an AI agent is a knowledge management system that combines AI agent and RPA technologies. The knowledge base is a system for storing and managing process knowledge, providing decision support for the AI agent and improving its execution efficiency. When the AI agent is running, if new requirements are proposed, the AI agent will first query the knowledge base, and the knowledge base will output historical process knowledge that meets the new requirements to the AI agent. Finally, the AI agent generates new process knowledge that meets the new requirements based on the historical process knowledge, and then generates RPA commands.
[0042] Embodiment 1: The flowchart of a method for updating the RPA knowledge base of an AI agent according to an embodiment of the present invention is as shown in Figure 1 , and specifically includes the following steps:
[0043] S1. Use the large language model of the AI agent to summarize the current task and process, remove redundant information, and generate a process description.
[0044] After the process is successfully executed, the current task and the generated process can be obtained. Through the large language model, each step of the process in is abstracted, and finally the corresponding process description , that is, is generated.
[0045] S2. Convert the process description into a flowchart through a flowchart construction module .
[0046] The flowchart construction module specifically refers to the component that converts the text description of the process into a flowchart. This module maps each action into a node in the graph by parsing each action in Use a large language model to identify and parse the sequential relationships and control structures among various actions, and then establish directed edges between nodes , and finally construct a complete flowchart .
[0047] S3. Construct the RPA knowledge base of the AI agent. The knowledge base consists of two types of knowledge with different granularities, namely executable process knowledge and abstract process knowledge. Among them, the abstract process knowledge is a summary of a number of associated executable process knowledge with a similarity greater than a set value. Each abstract process knowledge corresponds to a number of executable process knowledge. The executable process knowledge refers to the process knowledge that has been used in practice and can be correctly executed. Among them, all knowledge is saved in the form of a flowchart, and the abstract knowledge set , for a certain abstract process knowledge The corresponding set of associated executable processes is . When searching, you can first search for the most similar abstract process knowledge, and then search for the set of executable process knowledge associated with the abstract process knowledge, which can improve efficiency
[0048] S4. Calculate the similarity between the flowchart and the abstract process knowledge, and find the most similar abstract process knowledge , and the set of executable process knowledge corresponding to the abstract process knowledge . .
[0049] Compare the flowchart sequentially with each abstract process knowledge in , and input them into the graph similarity calculation module. The graph similarity calculation module returns the calculation result . .
[0050] The graph similarity calculation module is implemented based on the graph edit distance. The specific implementation process is as follows. First, establish a node mapping from one graph to another. The current state represents a partial match from to . The function represents the editing cost. Set the cost threshold . When , continuously find the mapping with the minimum editing cost , and update the state s; when , stop the mapping, and the threshold is used as the current cost. For the unmapped nodes in For each active node w that is not matched in. Similar to before, continuously find the mapping with the minimum editing cost , update the state s until all nodes in can be matched with . Finally, and similarity , when , is the smallest.
[0051] Edit operations include five operations: adding nodes, deleting nodes, modifying nodes, adding edges, and deleting edges. Among them, the editing costs of adding nodes, deleting nodes, adding edges, and deleting edges are constants, and the cost of modifying nodes is obtained by calculating the vector similarity between the processes in the nodes. For example, for nodes and , which contain processes and respectively, use the word vector model (such as Word2Vec) to map the processes and to real number vectors and real number vector , calculate the semantic similarity between the processes and is , and the cost of modifying to (i.e., the cost of the i-th edit operation) is , is a constant. The mapping contains a series of edit operations , and the editing cost , where n is the number of edit operations.
[0052] Compare all the similarity calculation results, and obtain the one with the smallest result , return the most similar abstract process knowledge , and the set of executable process knowledge corresponding to the abstract process knowledge .
[0053] S5. Perform similarity measurement on the flowchart and the set of executable process knowledge .
[0054] Obtain respectively and the similarity of each executable flowchart in Executable process knowledge .
[0055] S6. Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The new executable process knowledge set is integrated to obtain a new set of executable process knowledge. Based on the new set of executable process knowledge, new abstract process knowledge is summarized through the large language model of the AI agent, and the RPA knowledge base of the AI agent is updated.
[0056] if In order to reduce storage space, and Fusion, get .also, Corresponding executable process set Updated to .
[0057] The fusion process is as follows: The process with the least number of nodes Based on the other processes Make changes. and Process For example, first change the process and Process Modify the cost If there are obvious divergence nodes, that is, the modification cost between the two nodes When middle Nodes and control flows not in the , where control flow is used to describe the logical order between nodes. Finally, check the comparison and The control flow of Add the control flow that was not added to , and finally get .
[0058] if , The corresponding executable process set is updated to Based on the new executable process knowledge set, new abstract process knowledge is summarized through the large language model, that is, . Update the RPA knowledge base of AIagent.
[0059] Based on the technical solution of the present invention, the implementation process of the present invention in practical application is described with the following embodiments.
[0060] Assuming the current task It is: The content in the document origin.docx needs to be copied to the document res.docx.
[0061] The successfully executed process is:
[0062] 1. Open the document origin.docx;
[0063] 2. Open the document res.docx;
[0064] 3. Select all the content in the document origin.docx;
[0065] 4. Copy the content in the document origin.docx;
[0066] 5. Paste the copied content into res.docx;
[0067] 6. Save the document res.docx;
[0068] 7. Close the document origin.docx;
[0069] 8. Close the document res.docx.
[0070] Pass the task to the large language model, and the large language model abstracts the task to obtain the task as: Copy the content in document A to document B. Then the large language model further analyzes and summarizes to generate the process :
[0071] Open document A;
[0072] Open document B;
[0073] Select all the content in document A;
[0074] Copy the content in document A;
[0075] Paste the copied content into B;
[0076] Save document B;
[0077] Close document A;
[0078] Close document B.
[0079] Convert the process into a flowchart as shown in the attached figure Figure 2 and find the most similar abstract process knowledge in the input to the abstract process knowledge comparison module For example, it is "Copy content --> Paste content". Then, search through the executable process knowledge comparison module for the ones that meet the conditions in the associated set of executable process knowledge, such as the flowchart , and the process knowledge it contains is . The process knowledge fusion process of the embodiments of the present invention is as Figure 2 shown. For and , perform fusion to obtain Figure 2 in . As follows:
[0080] Obtain the text on the first page of PDF file A;
[0081] Open document B;
[0082] Paste the obtained text into B;
[0083] Save document B;
[0084] Close document B.
[0085] Finally, update the abstract process knowledge and the set of executable processes.
[0086] Embodiment 2: The present invention also proposes an RPA knowledge base update system for an AI agent, including:
[0087] A process description generation module, which is used to summarize the current task and process using the large language model of the AI agent, remove redundant information, and generate a process description;
[0088] A flowchart generation module, which is used to convert the process description into a flowchart through a flowchart construction module ;
[0089] A knowledge base construction module, which is used to construct an RPA knowledge base for the AI agent, including executable process knowledge and abstract process knowledge. Among them, the abstract process knowledge is a summary of several executable process knowledge with a similarity greater than a set value, and each abstract process knowledge corresponds to several executable process knowledge;
[0090] A first similarity calculation module, which is used to calculate the similarity between the flowchart and the abstract process knowledge, and find the most similar abstract process knowledge , as well as the set of executable process knowledge corresponding to the abstract process knowledge ;
[0091] A second similarity calculation module, which is used to compare the flowchart with the set of executable process knowledge Perform similarity measurement;
[0092] A knowledge base update module for Neutralize the flowchart The executable process knowledge with a similarity greater than the threshold and the flowchart Are fused to obtain a new set of executable process knowledge; According to the new set of executable process knowledge, new abstract process knowledge is summarized through the large language model of the AI agent, and the RPA knowledge base of the AI agent is updated.
[0093] Embodiment 3: In an exemplary embodiment, it includes a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, it implements the above-mentioned method for updating the RPA knowledge base of the AI agent.
[0094] Embodiment 4: Please refer to Figure 3 , in an exemplary embodiment, it further includes an electronic device including at least one processor, at least one memory, and at least one communication bus.
[0095] Among them, a computer program is stored on the memory, the computer program includes computer-readable instructions, and the processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned method for updating the RPA knowledge base of the AI agent.
[0096] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for updating an RPA knowledge base of an AI agent, characterized in that: The following steps are involved: S1. Use the AI agent’s large language model to summarize the current tasks and processes, remove redundant information, and generate a process description; S2. Convert the process description into a flowchart through the flowchart construction module ; S3. Build the RPA knowledge base of the AI agent, including executable process knowledge and abstract process knowledge. Abstract process knowledge is a summary of several executable process knowledge with similarity greater than a set value, and each abstract process knowledge corresponds to several executable process knowledge. S4. Calculation flow chart Similarity with abstract process knowledge, find the most similar abstract process knowledge , and abstract process knowledge Corresponding executable process knowledge set ; S5. Flowchart and executable process knowledge set Perform similarity measurement; S6. Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The new executable process knowledge set is obtained by fusion. Based on the new executable process knowledge set, new abstract process knowledge is summarized through the AI agent's large language model, and the AI agent's RPA knowledge base is updated. Will Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The specific process of fusion is as follows: by The process with the least number of nodes As the basis, express Neutralization Flowchart The executable process knowledge with similarity greater than the threshold will be and Modify the cost The nodes are merged into one node. Indicates a set threshold; when modifying the cost ,Will Appeared in Nodes and control flows not in the .
2. The method according to claim 1, characterized in that Calculation flow chart The similarity with abstract process knowledge is expressed as: ; in, express and The graph similarity of Represents abstract process knowledge, Represents the editing cost.
3. The method according to claim 2, characterized in that ; Where n represents the number of edit operations, represents the cost of the i-th editing operation; ; in, Representation process and The semantic similarity of z represents a constant, the process and Belong to the node and , the i-th editing operation represents Modified to ; ; in, express A real vector of , express A real vector of , It means to find the magnitude of a vector.
4. The method according to claim 3, characterized in that According to editing costs Get the final editing cost , using the final editing cost Calculation flow chart Similarity to abstract process knowledge: , based on editing costs Get the final editing cost The process is: Setting cost thresholds ,when When and Mapping, update status ;when , stop mapping, threshold as the current editing cost; for Map the unmapped nodes in For each active node that is not matched in the , we continue to find the mapping with the minimum editing cost and update the state ,until All nodes in Matching, output the final editing cost is .
5. The method according to claim 1, characterized in that if Neutralization Flowchart The executable process knowledge with similarity greater than the threshold is an empty set, and the executable process set corresponding to the most similar abstract process knowledge is updated to ,in, represents the set of executable processes corresponding to the most similar abstract process knowledge, Indicates updated .
6. An AI agent RPA knowledge base update system, characterized in that: include: The process description generation module is used to summarize the current tasks and processes using the AI agent's large language model, remove redundant information, and generate a process description; Flowchart generation module, used to convert process description into flowchart through flowchart construction module ; The knowledge base construction module is used to build the RPA knowledge base of the AI agent, including executable process knowledge and abstract process knowledge. Abstract process knowledge is a summary of several executable process knowledge with similarity greater than a set value, and each abstract process knowledge corresponds to several executable process knowledge. The first similarity calculation module is used to calculate the flow chart Similarity with abstract process knowledge, find the most similar abstract process knowledge , and abstract process knowledge Corresponding executable process knowledge set ; The second similarity calculation module is used to convert the flowchart and executable process knowledge set Perform similarity measurement; Knowledge base update module, used to update Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The new executable process knowledge set is obtained by fusion. Based on the new executable process knowledge set, new abstract process knowledge is summarized through the AI agent's large language model to update the AI agent's RPA knowledge base. Will Neutralization Flowchart Executable process knowledge and flowcharts with similarity greater than a threshold The specific process of fusion is as follows: by The process with the least number of nodes As the basis, express Neutralization Flowchart The executable process knowledge with similarity greater than the threshold will be and Modify the cost The nodes are merged into one node. Indicates a set threshold; when modifying the cost ,Will Appeared in Nodes and control flows not in the .
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises computer-readable instructions, and the processor is configured to call the computer-readable instructions to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for enhancing reliability of large language model based on knowledge graph
CN119443230A