Knowledge retrieval execution system and method based on RAG knowledge base and RPA cooperation

By using the RAG knowledge base in conjunction with RPA to create a knowledge retrieval and execution system, the problems of disconnect between knowledge and execution, rigid execution, and narrow applicability have been solved. This system achieves a closed-loop automation across the entire process, improves business processing efficiency and accuracy, expands application scenario coverage, and lowers the operational threshold.

CN122019612APending Publication Date: 2026-05-12SUZHOU DIGITAL POWER EDUCATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU DIGITAL POWER EDUCATION TECH CO LTD
Filing Date
2026-02-02
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The existing RAG knowledge base and RPA system lack a deep collaboration mechanism, which makes it difficult to transform knowledge value into actionable behavior, resulting in low efficiency and easy introduction of errors. It is also unable to call the latest business rules in real time, has a narrow scope of application, high operating threshold, and is difficult to achieve seamless automated execution in a closed system.

Method used

Design a knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration, including RAG knowledge base module, requirement analysis and task planning module, RPA execution module, collaborative scheduling module and result feedback and optimization module. Employ dynamic weight fusion retrieval algorithm, bidirectional time sequence synchronization algorithm and multi-dimensional adaptive optimization algorithm to achieve dynamic collaboration between knowledge and execution, and support cross-system operation and low-code configuration.

Benefits of technology

It achieves a closed-loop automation across the entire chain, from knowledge retrieval to process execution, improving business processing efficiency, increasing the accuracy and coverage of automated operations, lowering the technical threshold, supporting automated operations on closed systems, and adapting to the needs of enterprise digital transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019612A_ABST
    Figure CN122019612A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge retrieval execution system and method based on RAG knowledge base and RPA cooperation, and aims to solve the problems of knowledge and execution disjunction, lack of dynamic knowledge support in execution, poor cooperation adaptability and high operation threshold caused by independent operation of an RAG knowledge base and an RPA system in the prior art. The method comprises the following steps: initializing a system and preparing knowledge; receiving and analyzing a service demand, and planning a task path according to a demand type; executing knowledge retrieval to obtain a structured result; generating and executing an RPA automatic process based on the retrieval result and a preset mapping rule; and feeding back a result and optimizing the system. By adopting the technical scheme, full-link automatic closed loop from knowledge retrieval to process execution can be realized, the service processing efficiency and the execution accuracy are improved, the application scene is expanded, and the use threshold is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to a knowledge retrieval and execution system and method based on RAG knowledge base and RPA collaboration. Background Technology

[0002] As enterprises deepen their digital transformation, business processes involve both numerous decision-making steps that rely heavily on accurate knowledge and a massive amount of repetitive, rule-based operational tasks. Against this backdrop, knowledge base systems based on Retrieval Augmentation Generation (RAG) have been widely adopted in enterprise knowledge management scenarios due to their powerful semantic understanding and structured knowledge output capabilities. These systems can efficiently respond to users' query needs for information such as policy guidelines, data standards, and operational instructions.

[0003] At the same time, Robotic Process Automation (RPA) technology, with its cross-system and non-intrusive operation capabilities, has achieved significant human resource substitution effects in high-frequency and repetitive processes such as financial reimbursement, production scheduling, and human resource management.

[0004] However, current RAG knowledge bases and RPA systems are generally deployed independently, lacking deep collaboration mechanisms. This makes it difficult to effectively transform knowledge value into actionable processes. Specifically, this manifests in several ways: knowledge and execution are disconnected; RAG can only provide static query results and cannot automatically trigger subsequent business operations, requiring manual intervention for translation, which is inefficient and prone to errors. The execution process lacks dynamic knowledge support; RPA relies heavily on preset scripts and cannot call the latest business rules or contextual knowledge in real time during the process, resulting in poor fault tolerance and accuracy when facing complex or changing scenarios. Collaborative adaptability is limited, especially when facing closed business systems without API interfaces (such as some government platforms or outdated ERP systems), where existing solutions struggle to achieve seamless integration from natural language commands to end-to-end automated execution. Furthermore, system configuration is highly dependent on technical personnel, and business users cannot easily build integrated "knowledge retrieval-process execution" tasks, severely hindering the rapid deployment and large-scale application of the technology in frontline business scenarios.

[0005] Therefore, there is an urgent need for a collaborative architecture that deeply integrates the RAG knowledge base and RPA execution capabilities, to create a closed loop across the entire chain from knowledge acquisition and decision analysis to automated action, and to solve core problems such as difficulty in knowledge implementation, rigid execution, narrow applicability, and high operational threshold. Summary of the Invention

[0006] To address the shortcomings of existing technologies, the present invention aims to provide a knowledge retrieval and execution system and method based on RAG knowledge base and RPA collaboration, thereby solving the aforementioned technical problems in the prior art.

[0007] The objective of this invention can be achieved through the following technical solutions: A knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration includes the following components: The RAG knowledge base module is used to store and structure enterprise-level multi-format knowledge data, and respond to retrieval requests based on a dynamic weighted fusion retrieval algorithm, returning structured knowledge results. The requirement parsing and task planning module is used to receive and parse business requirements initiated by users, and plan task execution paths based on the knowledge-execution mapping library and the scenario-adaptive task planning algorithm. The types of business requirements include knowledge query type, process execution type and knowledge + execution composite type. The RPA execution module is used to execute automated process tasks. It includes an execution engine unit, an operation node library, and an intelligent API-free adaptation unit to support non-intrusive operation across systems and platforms. The collaborative scheduling module, as the core hub of the system, uses a two-way timing synchronization algorithm to be responsible for instruction distribution, data interaction and exception handling, and realizes dynamic collaborative control between the RAG knowledge base module and the RPA execution module. The knowledge-execution mapping library is used to store the relationship data between knowledge types, business scenarios, execution node combinations, parameter mapping rules and verification standards. It supports dynamic rule updates based on reinforcement learning and provides a basis for task planning. The results feedback and optimization module is used to verify the accuracy of the execution results, record the entire chain log, and continuously optimize the retrieval algorithm and mapping rules through a multi-dimensional adaptive optimization algorithm.

[0008] Furthermore, the RAG knowledge base module adopts a layered architecture, including a knowledge storage layer, a knowledge processing layer, and a retrieval engine layer; The knowledge storage layer adopts a distributed blockchain storage architecture, which supports the unified storage of knowledge in multiple formats such as Excel, Word, PDF, paper scans and database data. It ensures the security of sensitive knowledge and the integrity of data by combining blockchain hash verification with data desensitization methods. The knowledge processing layer performs word segmentation, semantic annotation, structured transformation, and knowledge association strength calculation on the knowledge stored in the database to construct a dynamic knowledge graph. The dynamic knowledge graph updates the entity association strength value in real time by calculating the association frequency, timeliness weight, and scenario relevance between knowledge entities. The retrieval engine layer adopts a dynamic weight fusion retrieval algorithm, which integrates a keyword retrieval algorithm based on improved TF-IDF and a semantic retrieval model based on fine-tuned BERT. Its semantic similarity calculation adopts an improved cosine similarity algorithm and introduces a knowledge entity association strength factor to correct the similarity results.

[0009] Furthermore, the dynamic weight fusion retrieval algorithm used in the retrieval engine layer calculates its final comprehensive relevance score, Scorefinal, as follows: S101. Calculate the keyword retrieval score (Scorekeyword). Based on the improved TF-IDF algorithm, a document timeliness factor (T) and a scenario matching factor (S) are introduced for correction. The formula is as follows: Scorekeyword=TF-IDF×(0.6T+0.4S); Wherein, T is dynamically calculated based on the difference between the document update time and the current demand time, with a value range of 0.1-1.0, and S is calculated based on the degree of matching between the scenario to which the document belongs and the demand scenario, with a value range of 0.0-1.0; S102. Calculate the semantic retrieval score (Scoresemantic). Based on a fine-tuned BERT model, the query statement and knowledge base documents are converted into semantic vectors. An improved cosine similarity algorithm is used to calculate the score. The formula is as follows: Scoresemantic=CosineSimilarity×(1+λ×R); Wherein, λ is the association strength influence coefficient, with a value range of 0.1-0.3, and R is the association strength value between the core entity of the query statement and the core entity of the document in the dynamic knowledge graph; S103. Dynamically determine the weight coefficient α. Learn from historical retrieval data using a machine learning model to establish a mapping relationship between query characteristics and the optimal weight α. The formula is: α=0.3+0.4×σ(L)×σ(N)×(1-σ(C)); Where L is the query length, N is the terminology standardization, C is the scenario complexity, and σ is the Sigmoid activation function, which maps the input to the 0.0-1.0 range; S104. Calculate the final comprehensive correlation score: Scorefinal=α・Scorekeyword+(1-α)・Scoresemantic.

[0010] Furthermore, the requirement analysis and task planning module includes a requirement analysis unit and a task planning unit; The requirement parsing unit adopts a domain-pre-trained Transformer architecture model. By introducing a business scenario dictionary and an industry entity library, it optimizes named entity recognition and intent classification, and accurately identifies business scenarios, core objectives, key parameters, and urgency of requirements. The task planning unit employs a scenario-adaptive task planning algorithm, executing different logic based on the parsed requirement type, scenario characteristics, and urgency. Specifically, this includes: For knowledge query requests, the search priority is dynamically adjusted based on the urgency of the request, and search instructions with priority indicators are generated. For process execution requirements, based on the business scenario, key parameters and historical execution data in the requirements, multi-dimensional pattern matching is performed in the knowledge-execution mapping library to retrieve the corresponding execution node combination, parameter mapping rules and optimal execution path, and generate RPA execution tasks. For complex requirements, a phased task planning strategy is adopted. First, the knowledge retrieval process is triggered. The completeness of knowledge is judged by the quality assessment algorithm of the retrieval results. If the execution requirements are met, the result is used as an input parameter and combined with the mapping library rules to generate an RPA execution task sequence.

[0011] Furthermore, the intelligent API-free adaptation unit of the RPA execution module, for closed business systems without standard API interfaces, adopts an intelligent interface element recognition method based on YOLOv8, combines an attention mechanism to optimize image recognition and positioning accuracy, and is equipped with simulated keyboard and mouse operations based on reinforcement learning. By learning human operating habits, it dynamically adjusts the operation trajectory and rhythm to achieve non-intrusive high-precision automated operation. The operation node library includes general-purpose operation nodes and industry-specific operation nodes, all encapsulated in the form of configurable atomic operations. It supports drag-and-drop combination, parameter configuration, and node dependency definition through a graphical interface. It also provides a node execution effect prediction function, which predicts the success rate of node combination based on historical execution data.

[0012] Furthermore, the bidirectional timing synchronization algorithm used by the collaborative scheduling module includes the following steps: S201. Establish a status awareness channel between the RAG knowledge base module and the RPA execution module to collect the task execution status, resource utilization and data processing progress of both parties in real time. S202. Construct a cooperative scheduling matrix based on state data and define a scheduling priority function: P=ω1×TaskImportance+ω2×ResourceUtilization+ω3×DataFreshness; Where ω1, ω2, and ω3 are weight coefficients, and their sum is 1; TaskImportance is the task importance score; ResourceUtilization is the resource utilization rate; and DataFreshness is the data freshness. S203. A dynamic time window scheduling strategy is adopted, which adaptively adjusts the size of the scheduling time window according to the task execution progress and system load changes. S204. When data interaction delays or execution anomalies occur, a compensation mechanism is automatically triggered to ensure collaborative continuity through task reassignment, data cache reuse, or backup path switching.

[0013] Furthermore, the result feedback and optimization module employs a multi-dimensional adaptive optimization algorithm, including the following steps: constructing a multi-dimensional performance evaluation index system, including retrieval accuracy P. retrieval Search timeliness T retrieval Execution success rate P execution Execution efficiency E execution and user satisfaction rating S user This constitutes a performance index matrix: M=[P retrieval ,T retrieval ,P execution E execution ,S user ] T Based on the analytic hierarchy process (AHP), the weight vector W = [w1, w2, w3, w4, w5]T for each indicator is determined, satisfying Σw i =1; Define the optimization objective function L = ||W・M-Sideal|| 2 +γ・Ω, where Sideal is the ideal performance vector, γ is the regularization coefficient, and Ω is the model complexity penalty term; An improved gradient descent algorithm is adopted, combined with a momentum term and an adaptive learning rate adjustment strategy, to iteratively update the retrieval algorithm parameters, mapping rule weights, and cooperative scheduling parameters. The formula is as follows: θ t+1 =θ t -η t ・∇L(θ t )+β・(θ t -θ t-1 ); Where θ is the set of parameters to be optimized, and η t Let θ be the adaptive learning rate at time t, β be the momentum coefficient, and ∇L(θ) be the learning rate at time t. t ) is the objective function at θ t The gradient at that point.

[0014] A knowledge retrieval and execution method based on RAG knowledge base and RPA collaboration, the specific steps of which are as follows: S1. System Initialization and Knowledge Preparation: Import enterprise business knowledge data through the RAG knowledge base module to complete the structured processing of knowledge, dynamic knowledge graph construction, and blockchain storage; in the knowledge-execution mapping library, configure the association rules between knowledge and RPA execution process for each predefined business scenario, and initialize the reinforcement learning model parameters; complete the initialization settings of system running parameters. S2. Receiving business requests: Users initiate business requests to the system through natural language input, visual interface operation, or API interface; S3. Requirements Analysis and Task Planning: A domain-pre-trained Transformer architecture model is used to analyze the business requirements, identifying their business scenarios, core objectives, key parameters, urgency, and type. Based on a scenario-adaptive task planning algorithm, task execution paths are planned according to the requirement type. If it is a knowledge query, then generate a search instruction with a priority identifier based on the urgency of the need, and execute step S4; If it is a process execution type, multi-dimensional pattern matching is performed based on the knowledge-execution mapping library to generate RPA execution tasks and optimal execution paths, and then proceed to step S5; If it is a composite type, first execute step S4 to obtain knowledge support, and use the retrieval result quality assessment algorithm to judge the completeness of knowledge. If the requirements are met, combine the knowledge results to generate an RPA execution task sequence and jump to step S5. S4. Knowledge Retrieval: The collaborative scheduling module sends retrieval instructions to the RAG knowledge base module; the RAG knowledge base module retrieves matching knowledge data from the knowledge storage layer through its retrieval engine layer using a dynamic weight fusion retrieval algorithm, and returns the retrieval results after structured processing and quality assessment. S5, RPA process execution: The collaborative scheduling module adopts a bidirectional time-series synchronization algorithm to send the generated RPA execution tasks to the RPA execution module; the RPA execution module calls the corresponding operation node from the operation node library according to the task description, adapts to the target business system through the intelligent API-free adaptation unit, simulates manual completion of automated process execution, and uses the knowledge results obtained from retrieval as the basis for decision-making and verification during the execution process; S6. Result Feedback and Optimization: The result feedback and optimization module verifies the accuracy of RPA execution results based on the verification standards in the knowledge-execution mapping library and combined with execution process data; it feeds back the final results and execution reports to the user, while recording the entire chain operation log; based on log data, user feedback, and multi-dimensional performance evaluation indicators, it adjusts the retrieval model parameters, knowledge-execution mapping rules, and collaborative scheduling parameters of the RAG knowledge base through a multi-dimensional adaptive optimization algorithm.

[0015] Furthermore, in S4, the retrieval result quality assessment algorithm includes the following indicator calculation and judgment logic: The completeness index C of the calculation results is calculated as follows: C = number of key knowledge items actually acquired / total number of key knowledge items required by the requirements, with a value range of 0.0-1.0. The timeliness index T is calculated as follows: T = 1 - (difference between the latest knowledge update time and the current time) / preset timeliness threshold, with a value range of 0.0-1.0. The accuracy index A of the calculation results is based on the associations and verification rules in the knowledge graph, and the percentage of correct knowledge items is statistically calculated, with a value range of 0.0-1.0. The overall quality score Q = 0.4C + 0.3T + 0.3A. When Q ≥ 0.7, it is determined that the execution requirements are met; when 0.5 ≤ Q < 0.7, a supplementary search is triggered; when Q < 0.5, a prompt for manual intervention is given.

[0016] Furthermore, in S3, the scenario-adaptive task planning algorithm, when planning composite requirement tasks, after the retrieval result quality assessment algorithm determines that the knowledge completeness meets the requirements, uses the retrieval result as an input parameter, and combines it with the execution node combination matched in the knowledge-execution mapping library, parameter mapping rules, and optimal execution path to generate an RPA execution task sequence.

[0017] The beneficial effects of this invention are: 1. This invention realizes a closed-loop automation of the entire chain from knowledge retrieval to process execution, eliminating the delays and errors caused by manual intervention in knowledge translation and operation, reducing the processing time of specific business scenarios from hours to minutes, and significantly improving business processing efficiency.

[0018] 2. This invention uses real-time, structured, authoritative knowledge provided by the RAG knowledge base as the dynamic basis for RPA execution, ensuring that automated operations strictly follow the latest business rules and standards, and improving the accuracy of process execution to over 99%.

[0019] 3. This invention achieves automated operation of closed business systems without standard interfaces by collaborating with the API-free adaptation unit of the RPA execution module and the RAG knowledge base, greatly expanding the application scope of the collaborative solution in fields such as government affairs and traditional manufacturing.

[0020] 4. This invention uses a low-code / no-code approach to configure the knowledge-execution mapping library and supports initiating complex requests via natural language, which significantly reduces the technical threshold for business personnel to use and customize automated processes, and promotes the rapid implementation and large-scale application of the technology.

[0021] 5. The system of this invention adopts a modular and layered loosely coupled architecture design, supports the expansion of knowledge types, the customization of operation nodes, and the rapid access of new business scenario mapping rules. It has strong compatibility and scalability, and can flexibly adapt to the continuously evolving digital transformation needs of enterprises. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0023] Figure 1 This is a schematic diagram of the overall technical architecture of the knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration proposed in this invention; Figure 2 This is a schematic diagram of the core principle framework of the scene adaptive task planning algorithm in this invention; Figure 3 This is a schematic diagram of the multi-level interaction relationship and data flow between the RAG knowledge base module and the RPA execution module in this invention through the collaborative scheduling module. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0025] Example 1 In the after-sales service and technical support departments of large multinational manufacturing companies, sales staff handle a massive volume of customer inquiries, equipment repair requests, and spare parts requisitions every day. These requests typically involve querying complex equipment technical manuals, historical maintenance records, and spare parts inventory information, and require executing operational procedures across multiple closed business systems based on the query results.

[0026] For example, creating work orders in a customer relationship management system, requesting spare parts in an enterprise resource planning system, and initiating approvals in a financial system. In the traditional model, business personnel need to manually switch between multiple systems, copy and paste information, and follow cumbersome rules, resulting in low efficiency and a high risk of errors. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration provided by this invention aims to automate and intelligently address this process, achieving a closed loop of "knowledge as a service, service as execution."

[0027] See Figure 1 The overall architecture of this system includes a RAG knowledge base module, a requirement analysis and task planning module, an RPA execution module, a collaborative scheduling module, a knowledge-execution mapping library, and a result feedback and optimization module. These modules work together organically through the collaborative scheduling module to form a complete closed loop from requirement input to execution feedback.

[0028] First, the system initializes and prepares knowledge, i.e., step S1, where the RAG knowledge base module imports and processes enterprise-level multi-format knowledge data. Its knowledge storage layer adopts a distributed blockchain storage architecture, uniformly storing spare parts lists in Excel format, technical specifications in Word format, maintenance manuals in PDF format, scanned old drawings, and historical work order records from different departments. When each document is added to the database, the system calculates its hash value and records it on the blockchain, ensuring that any subsequent tampering can be traced. Simultaneously, data anonymization technology is used to automatically identify and mask customer privacy information and core design parameters in the documents, guaranteeing data security and integrity.

[0029] The knowledge processing layer performs deep processing on the input documents: it uses a domain-enhanced word segmentation tool to segment the text; it uses a pre-trained named entity recognition model to label key entities such as equipment model, fault code, and spare part number; it converts unstructured maintenance step descriptions into structured "fault phenomenon-troubleshooting action-expected result" triples; and finally, it constructs and updates a dynamic knowledge graph in real time by calculating the co-occurrence frequency between knowledge entities, assigning timeliness weights based on document update time, and associating business scenario tags. In this graph, the association strength between entities is not fixed but dynamically calculated based on the above factors. The retrieval engine layer integrates a dynamic weighted fusion retrieval algorithm, serving as the core of subsequent retrieval.

[0030] The requirement analysis unit in the requirement analysis and task planning module employs a Transformer architecture model pre-trained on a corpus from the manufacturing sector. When a business user inputs "Urgently request a main spindle bearing for customer XX company's YY model production line; the production line is currently shut down and requires expedited processing" through the system's natural language interface, the model initiates analysis. The model integrates a business scenario dictionary and an industry entity database, accurately identifying the business scenario as "urgent spare parts request," with the core objective being "completing the spare parts request process." Key parameters include "Customer Name: XX Company," "Equipment Model: YY model," "Spare Part Name: Main Spindle Bearing," and "Urgency Level: High," ultimately classifying the requirement type as a "knowledge + execution composite." The analyzed structured information is then passed to the task planning unit.

[0031] The task planning unit employs an adaptive task planning algorithm. For identified "composite" requirements, the algorithm initiates a phased task planning strategy. The first phase plans the knowledge retrieval task: the algorithm, based on the "urgency: high" characteristic, assigns the highest priority to the upcoming retrieval instruction to ensure that the retrieval task is scheduled first. The second phase plans the execution task, but awaits the quality assessment of the knowledge retrieval results. Based on the "urgent spare parts requisition" scenario, the planning algorithm pre-matches in the knowledge-execution mapping library, identifying possible execution node combination templates, but does not yet generate the final execution instruction.

[0032] Upon receiving a priority-based retrieval instruction from the task planning unit, the collaborative scheduling module immediately forwards it to the RAG knowledge base module, triggering the knowledge retrieval process in step S4. The retrieval engine layer of the RAG knowledge base module then initiates a dynamic weighted fusion retrieval algorithm. This algorithm first calculates keyword retrieval scores and semantic retrieval scores in parallel. For keyword retrieval, the algorithm uses an improved TF-IDF calculation to match documents in the knowledge base for keywords such as "YY model" and "spindle bearing" in the query statement. The improvement lies in the introduction of a document timeliness factor T and a scenario matching factor S for correction.

[0033] For example, a "Latest Spare Parts Replacement Guide for YY Model" updated 3 days ago has a T-value close to 1.0, while an older guide from 3 years ago might only have a T-value of 0.3; a document explicitly marked "Applicable to Spare Parts Application Scenarios" has an S-value of 1.0, while a general technical manual might have an S-value of 0.6. Keyword search score is calculated using the formula: Score keyword =TF-IDF×(0.6T+0.4S) is calculated.

[0034] For semantic retrieval, the fine-tuned BERT model transforms the entire query "Emergency application for a main shaft bearing for the YY model production line of customer XX company..." into a high-dimensional semantic vector, while also converting documents in the knowledge base into vectors. When calculating the similarity between vectors using the improved cosine similarity algorithm, a knowledge entity association strength factor R is introduced for correction. The specific formula is: Score_semantic=CosineSimilarity×(1+λ×R); For example, in a dynamic knowledge graph, there is a strong association (high R-value) between "YY model" and "spindle bearing". Therefore, a document containing both entities, even if its literal match is not the highest, will have its semantic score significantly improved due to the R-factor. λ is the association strength influence coefficient, typically set to 0.2.

[0035] Next, the algorithm dynamically determines the fusion weight α using a lightweight machine learning model. This model takes the query characteristics as input: query length L, terminology standardization N (i.e., the degree to which it includes standard part numbers, model numbers, etc.), and scenario complexity C. Through mapping relationships learned from historical data, the optimal α value for the current query is calculated using the formula α = 0.3 + 0.4 × σ(L) × σ(N) × (1 - σ(C)), where σ is the Sigmoid function. For example, a short, standard, and scenario-single query may obtain a higher α value (e.g., 0.7), relying more on keyword retrieval; while a long, descriptive, and scenario-complex query may obtain a lower α value (e.g., 0.4), relying more on semantic retrieval. Finally, the overall relevance score is calculated using Score_final = α・Score_keyword + (1-α)・Score_semantic, and all matching documents are sorted according to this score and returned.

[0036] After the search results are returned to the task planning unit, the search result quality assessment algorithm is activated. This algorithm calculates three core indicators: completeness indicator C, which checks whether the results contain all key knowledge items such as the inventory location, replacement parts information, and requisition form number for "YY model spindle bearing"; timeliness indicator T, which assesses the latest update time of the knowledge to ensure its validity; and accuracy indicator A, which verifies the logical consistency of knowledge items through the relationships in the dynamic knowledge graph. The overall quality score Q = 0.4C + 0.3T + 0.3A. Assuming that this search returned complete and up-to-date spare parts inventory and requisition guidelines, the Q value reaches 0.85, which is considered to meet the execution requirements.

[0037] At this point, the task planning algorithm enters its second phase, using high-quality retrieval results as input parameters. The algorithm revisits the knowledge-execution mapping library for precise multi-dimensional pattern matching. The mapping library stores the relationships between knowledge types (such as "spare parts inventory records" and "customer contract information") and RPA execution node combinations (such as "login to ERP system," "query inventory," "fill out requisition form," and "submit for approval") in the "spare parts requisition" scenario, as well as specific parameter mapping rules (such as automatically filling the "spare parts code" from the knowledge results into specific fields of the requisition form) and validation standards (such as requiring the inventory quantity to be greater than 0). Based on the matched optimal execution path, the algorithm generates a structured RPA execution task sequence, which clearly defines the operation, target system, input data, and subsequent dependencies for each step.

[0038] The collaborative scheduling module then employs a bidirectional time-series synchronization algorithm to distribute the RPA execution task sequence to the RPA execution module, executing step S5. This algorithm first establishes a state-aware channel to monitor the resource status of the RAG knowledge base module (which has completed its retrieval and is idle) and the RPA execution module (which is about to begin execution) in real time. This is based on the scheduling priority function. The calculation is based on P = ω1 × TaskImportance + ω2 × ResourceUtilization + ω3 × DataFreshness. Task importance ω1 is given the highest weight due to urgent needs, resource utilization ω2 indicates that the RPA execution module has a low load, and data freshness ω3 scores very high because the knowledge results have just been generated. Therefore, a high priority P value is calculated, and the task is immediately scheduled.

[0039] The execution engine unit of the RPA execution module parses the task sequence and first calls the "Login to ERP System" node from the operation node library. This node is a pre-encapsulated atomic operation containing logic such as username and password input and verification code recognition. Since the target ERP system is a legacy system and does not provide a standard API interface, the intelligent API-free adaptation unit starts working. This unit uses YOLOv8-based intelligent recognition technology for interface elements to capture images of the ERP login interface in real time, focusing on the username input box, password input box, and login button through an attention mechanism to accurately locate their screen coordinates.

[0040] Subsequently, a keyboard and mouse simulation technique based on reinforcement learning was employed. This technique didn't simply involve mechanically clicking coordinates; instead, it simulated the habits of a human operator: a slight pause after clicking in the input box before typing, random variations in input speed, and a slightly curved mouse trajectory. This effectively prevented the system from identifying it as robotic operation.

[0041] After successful login, the engine sequentially calls nodes such as "Query Inventory" and "Fill in Requisition Form." During the filling process, the system automatically retrieves spare parts codes, application quantities, customer information, etc., from the RAG knowledge base, fills in the corresponding fields according to the mapping rules, and uses the retrieved "Expedited Process Specifications" knowledge as the verification basis to automatically select the expedited option. The progress of the entire execution process, such as "Login Successful," "Inventory Query Completed," and "Requisition Form Submitted," is fed back to the collaborative scheduling module in real time.

[0042] Finally, the process moves to step S6, the result feedback and optimization phase. The result feedback and optimization module first verifies the results: based on the verification standards defined for this scenario in the knowledge-execution mapping library, it automatically checks in the ERP system whether the application status is "under approval" and verifies the consistency of the entered information with the knowledge source. After successful verification, the system sends an execution report to the original business personnel stating, "Spare parts application task completed, application number: ZZZ, has entered expedited approval process." Simultaneously, the entire task's log is recorded in detail, including the original requirements, parsing results, search keywords, search score, RPA nodes called, execution time and status of each node, and the final result.

[0043] Based on this log data, the multi-dimensional adaptive optimization algorithm begins to run periodically. The algorithm constructs a performance index matrix M=[P retrieval ,T retrieval ,P execution E execution ,S user ] T The retrieval accuracy P retrieval The search results are then manually annotated and statistically analyzed; search timeliness T retrieval The total time taken for this search; the success rate P. execution Whether the task was ultimately successfully completed; execution efficiency E execution Total execution time; User satisfaction S user The ratings are obtained through the request feedback interface.

[0044] The objective function is optimized using the weight vector W determined by the analytic hierarchy process (AHP). L=||W・M-Sideal|| 2 +γ・Ω is established; An improved gradient descent algorithm is used. The formula is: θ t+1 =θ t -η t ・∇L(θ t )+β・(θ t -θ t-1 ); The system's key parameters θ are iteratively updated. For example, the association strength influence coefficient λ in the dynamic weighted fusion retrieval algorithm might be adjusted to better adapt to the characteristics of the manufacturing knowledge graph; the success rate weight of a certain RPA node in the "spare parts requisition" scenario in the knowledge-execution mapping library might be updated because logs show that this node is prone to timeouts in certain network environments; and the weight of resource utilization ω2 in the collaborative scheduling algorithm might be fine-tuned to better balance the system load. Through this continuous self-optimization, the system can handle various business needs more and more accurately and efficiently in long-term operation.

[0045] Example 2 In the credit approval department of a commercial bank, loan officers need to process loan applications from corporate clients. This process involves checking the client's corporate credit report, historical credit records, and industry risk analysis report (knowledge retrieval), and based on this information, entering the information into the bank's internal credit approval system, calculating risk ratings, and generating approval opinions (process execution). This is a typical scenario where knowledge and execution are deeply intertwined.

[0046] During the system initialization phase, the RAG knowledge base module imported a massive amount of financial knowledge, including the central bank's credit reporting system interface specifications, white papers on risk rating models for various industries, credit policy documents from previous years, and a large number of anonymized historical credit cases. The dynamic knowledge graph constructed by the knowledge processing layer closely links corporate entities, industry tags, risk events, and types of collateral, with the strength of the association updated according to market dynamics and policy adjustments.

[0047] When a loan officer inputs the requirement "Apply for a 5 million yuan working capital loan for Technology Company A, and conduct a preliminary approval assessment," the requirement parsing unit accurately identifies this as a "composite" requirement. The scenario-adaptive task planning algorithm is then activated. In the first phase, high-priority search instructions are generated to obtain credit information for "Technology Company A," the latest risk report for its "technology industry," and current policies regarding "working capital loans." The RAG knowledge base module uses a dynamic weighted fusion search algorithm to accurately locate the required knowledge from massive amounts of financial documents. Semantic retrieval carries a high weight in this type of requirement because both the query statement and the knowledge document contain complex financial semantics.

[0048] After the search results are returned, the quality assessment algorithm performs calculations. Suppose a complete credit report and industry report are retrieved, but a recent supplementary regulation on credit supervision is missing, resulting in a slightly lower completeness index C and an overall quality score Q of 0.65. According to the rule (0.5 ≤ Q < 0.7), the system automatically triggers a supplementary search. The supplementary search instruction will specifically emphasize keywords such as "regulatory regulations" and "supplementary documents," and adjust the search time range, ultimately successfully retrieving the missing regulatory document. After the quality assessment is passed, the task planning unit integrates all the knowledge results.

[0049] See Figure 2 and Figure 3The task planning unit matches the "corporate loan approval" scenario in the knowledge-execution mapping library. The mapping library pre-constructs complex execution logic for this scenario: first, it calls a risk calculation model node based on the company's credit score and industry risk; then, based on the calculation results and loan policies, it determines the approval path (fast track or standard review); finally, it generates the corresponding approval documents. The algorithm, based on the retrieved knowledge, precisely maps the credit score of "Company A," the risk coefficient of the technology industry, and the policy terms for 5 million in working capital to the input parameters required by the execution node, generating a highly customized RPA execution task sequence.

[0050] The collaborative scheduling module distributes the task sequence. The RPA execution module's operation node library includes financial-specific nodes such as "login to the credit system," "query customer number," "enter financial data," "call the risk model interface," and "generate approval report." For core systems like the credit approval system that may have closed interfaces, the intelligent API-free adaptation unit ensures the stable execution of automated operations. During execution, the RPA process is not rigid but uses retrieved knowledge as a dynamic decision-making basis. For example, when entering data, if an anomaly is found in a credit report indicator, the process automatically triggers a sub-process, performing additional data verification or generating risk warning notes based on the "abnormal indicator handling guide" in the knowledge base.

[0051] After the task is completed, the results feedback and optimization module not only verifies whether the approval report was successfully generated, but also compares the final manual approval result (such as approval, rejection, or conditional approval) with the automatically generated evaluation suggestions from the system as an important feedback signal. This comparative data is incorporated into the evaluation system of a multi-dimensional adaptive optimization algorithm to optimize the retrieval model's ability to rank "risk signal" knowledge, and to optimize the correlation weight between risk calculation rules and the final approval result in the knowledge-execution mapping library, making the system's next automated evaluation suggestions more closely aligned with actual approval decisions.

[0052] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration, characterized in that, It includes the following components: The RAG knowledge base module is used to store and structure enterprise-level multi-format knowledge data, and respond to retrieval requests based on a dynamic weighted fusion retrieval algorithm, returning structured knowledge results. The requirement parsing and task planning module is used to receive and parse business requirements initiated by users, and plan task execution paths based on the knowledge-execution mapping library and the scenario-adaptive task planning algorithm. The types of business requirements include knowledge query type, process execution type and knowledge + execution composite type. The RPA execution module is used to execute automated process tasks. It includes an execution engine unit, an operation node library, and an intelligent API-free adaptation unit to support non-intrusive operation across systems and platforms. The collaborative scheduling module, as the core hub of the system, uses a two-way timing synchronization algorithm to be responsible for instruction distribution, data interaction and exception handling, and realizes dynamic collaborative control between the RAG knowledge base module and the RPA execution module. The knowledge-execution mapping library is used to store the relationship data between knowledge types, business scenarios, execution node combinations, parameter mapping rules and verification standards. It supports dynamic rule updates based on reinforcement learning and provides a basis for task planning. The results feedback and optimization module is used to verify the accuracy of the execution results, record the entire chain log, and continuously optimize the retrieval algorithm and mapping rules through a multi-dimensional adaptive optimization algorithm.

2. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration as described in claim 1, characterized in that, The RAG knowledge base module adopts a layered architecture, including a knowledge storage layer, a knowledge processing layer, and a retrieval engine layer; The knowledge storage layer adopts a distributed blockchain storage architecture, which supports the unified storage of knowledge in multiple formats such as Excel, Word, PDF, paper scans and database data. It ensures the security of sensitive knowledge and the integrity of data by combining blockchain hash verification with data desensitization methods. The knowledge processing layer performs word segmentation, semantic annotation, structured transformation, and knowledge association strength calculation on the knowledge stored in the database to construct a dynamic knowledge graph. The dynamic knowledge graph updates the entity association strength value in real time by calculating the association frequency, timeliness weight, and scenario relevance between knowledge entities. The retrieval engine layer adopts a dynamic weight fusion retrieval algorithm, which integrates a keyword retrieval algorithm based on improved TF-IDF and a semantic retrieval model based on fine-tuned BERT. Its semantic similarity calculation adopts an improved cosine similarity algorithm and introduces a knowledge entity association strength factor to correct the similarity results.

3. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration as described in claim 2, characterized in that, The dynamic weight fusion retrieval algorithm used in the retrieval engine layer calculates its final comprehensive relevance score, Scorefinal, as follows: S101. Calculate the keyword retrieval score (Scorekeyword). Based on the improved TF-IDF algorithm, a document timeliness factor (T) and a scenario matching factor (S) are introduced for correction. The formula is as follows: Scorekeyword=TF-IDF×(0.6T+0.4S); Wherein, T is dynamically calculated based on the difference between the document update time and the current demand time, with a value range of 0.1-1.0, and S is calculated based on the degree of matching between the scenario to which the document belongs and the demand scenario, with a value range of 0.0-1.0; S102. Calculate the semantic retrieval score (Scoresemantic). Based on a fine-tuned BERT model, the query statement and knowledge base documents are converted into semantic vectors. An improved cosine similarity algorithm is used to calculate the score. The formula is as follows: Scoresemantic=CosineSimilarity×(1+λ×R); Wherein, λ is the association strength influence coefficient, with a value range of 0.1-0.3, and R is the association strength value between the core entity of the query statement and the core entity of the document in the dynamic knowledge graph; S103. Dynamically determine the weight coefficient α. Learn from historical retrieval data using a machine learning model to establish a mapping relationship between query characteristics and the optimal weight α. The formula is: α=0.3+0.4×σ(L)×σ(N)×(1-σ(C)); Where L is the query length, N is the terminology standardization, C is the scenario complexity, and σ is the Sigmoid activation function, which maps the input to the 0.0-1.0 range; S104. Calculate the final comprehensive correlation score: Scorefinal=α・Scorekeyword+(1-α)・Scoresemantic.

4. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration as described in claim 1, characterized in that, The requirement analysis and task planning module includes a requirement analysis unit and a task planning unit; The requirement parsing unit adopts a domain-pre-trained Transformer architecture model. By introducing a business scenario dictionary and an industry entity library, it optimizes named entity recognition and intent classification, and accurately identifies business scenarios, core objectives, key parameters, and urgency of requirements. The task planning unit employs a scenario-adaptive task planning algorithm, executing different logic based on the parsed requirement type, scenario characteristics, and urgency. Specifically, this includes: For knowledge query requests, the search priority is dynamically adjusted based on the urgency of the request, and search instructions with priority indicators are generated. For process execution requirements, based on the business scenario, key parameters and historical execution data in the requirements, multi-dimensional pattern matching is performed in the knowledge-execution mapping library to retrieve the corresponding execution node combination, parameter mapping rules and optimal execution path, and generate RPA execution tasks. For complex requirements, a phased task planning strategy is adopted. First, the knowledge retrieval process is triggered. The completeness of knowledge is judged by the quality assessment algorithm of the retrieval results. If the execution requirements are met, the result is used as an input parameter and combined with the mapping library rules to generate an RPA execution task sequence.

5. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration according to claim 1, characterized in that, The intelligent API-free adaptation unit of the RPA execution module, for closed business systems without standard API interfaces, adopts a YOLOv8-based intelligent recognition method for interface elements, combines an attention mechanism to optimize image recognition and positioning accuracy, and is equipped with reinforcement learning-based simulated keyboard and mouse operations. By learning human operating habits, it dynamically adjusts the operation trajectory and rhythm to achieve non-intrusive, high-precision automated operation. The operation node library includes general-purpose operation nodes and industry-specific operation nodes, all encapsulated in the form of configurable atomic operations. It supports drag-and-drop combination, parameter configuration, and node dependency definition through a graphical interface. It also provides a node execution effect prediction function, which predicts the success rate of node combination based on historical execution data.

6. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration according to claim 1, characterized in that, The bidirectional timing synchronization algorithm used in the collaborative scheduling module includes the following steps: S201. Establish a status awareness channel between the RAG knowledge base module and the RPA execution module to collect the task execution status, resource utilization and data processing progress of both parties in real time. S202. Construct a cooperative scheduling matrix based on state data and define a scheduling priority function: P=ω1×TaskImportance+ω2×ResourceUtilization+ω3×DataFreshness; Where ω1, ω2, and ω3 are weight coefficients, and their sum is 1; TaskImportance is the task importance score; ResourceUtilization is the resource utilization rate; and DataFreshness is the data freshness. S203. A dynamic time window scheduling strategy is adopted, which adaptively adjusts the size of the scheduling time window according to the task execution progress and system load changes. S204. When data interaction delays or execution anomalies occur, a compensation mechanism is automatically triggered to ensure collaborative continuity through task reassignment, data cache reuse, or backup path switching.

7. The knowledge retrieval and execution system based on RAG knowledge base and RPA collaboration according to claim 1, characterized in that, The result feedback and optimization module employs a multi-dimensional adaptive optimization algorithm, including the following steps: constructing a multi-dimensional performance evaluation index system, including retrieval accuracy P. retrieval Search timeliness T retrieval Execution success rate P execution Execution efficiency E execution and user satisfaction rating S user This constitutes a performance index matrix: M=[P retrieval ,T retrieval ,P execution E execution ,S user ] T Based on the analytic hierarchy process (AHP), the weight vector W = [w1, w2, w3, w4, w5]T for each indicator is determined, satisfying Σw i =1; Define the optimization objective function L = ||W・M-Sideal|| 2 +γ・Ω, where Sideal is the ideal performance vector, γ is the regularization coefficient, and Ω is the model complexity penalty term; An improved gradient descent algorithm is adopted, combined with a momentum term and an adaptive learning rate adjustment strategy, to iteratively update the retrieval algorithm parameters, mapping rule weights, and cooperative scheduling parameters. The formula is as follows: i t+1 =θ t -or t ・∇L(θ t )+β・(θ t -θ t-1 ); Where θ is the set of parameters to be optimized, and η t Let β be the adaptive learning rate at time t, and β be the momentum coefficient. ∇L(θ t ) is the objective function at θ t The gradient at that point.

8. A knowledge retrieval and execution method based on RAG knowledge base and RPA collaboration, characterized in that, The specific steps of this method are as follows: S1. System Initialization and Knowledge Preparation: Import enterprise business knowledge data through the RAG knowledge base module to complete the structured processing of knowledge, dynamic knowledge graph construction, and blockchain storage; in the knowledge-execution mapping library, configure the association rules between knowledge and RPA execution process for each predefined business scenario, and initialize the reinforcement learning model parameters; Complete the initialization settings of system operating parameters; S2. Receiving business requests: Users initiate business requests to the system through natural language input, visual interface operation, or API interface; S3. Requirements Analysis and Task Planning: A domain-pre-trained Transformer architecture model is used to analyze the business requirements, identifying their business scenarios, core objectives, key parameters, urgency, and type. Based on a scenario-adaptive task planning algorithm, task execution paths are planned according to the requirement type. If it is a knowledge query, then generate a search instruction with a priority identifier based on the urgency of the need, and execute step S4; If it is a process execution type, multi-dimensional pattern matching is performed based on the knowledge-execution mapping library to generate RPA execution tasks and optimal execution paths, and then proceed to step S5; If it is a composite type, first execute step S4 to obtain knowledge support, and use the retrieval result quality assessment algorithm to judge the completeness of knowledge. If the requirements are met, combine the knowledge results to generate an RPA execution task sequence and jump to step S5. S4. Knowledge Retrieval: The collaborative scheduling module sends retrieval instructions to the RAG knowledge base module; the RAG knowledge base module retrieves matching knowledge data from the knowledge storage layer through its retrieval engine layer using a dynamic weight fusion retrieval algorithm, and returns the retrieval results after structured processing and quality assessment. S5, RPA process execution: The collaborative scheduling module adopts a bidirectional time-series synchronization algorithm to send the generated RPA execution tasks to the RPA execution module; the RPA execution module calls the corresponding operation node from the operation node library according to the task description, adapts to the target business system through the intelligent API-free adaptation unit, simulates manual completion of automated process execution, and uses the knowledge results obtained from retrieval as the basis for decision-making and verification during the execution process; S6. Result Feedback and Optimization: The result feedback and optimization module verifies the accuracy of RPA execution results based on the verification standards in the knowledge-execution mapping library and combined with execution process data; it feeds back the final results and execution reports to the user, while recording the entire chain operation log; based on log data, user feedback, and multi-dimensional performance evaluation indicators, it adjusts the retrieval model parameters, knowledge-execution mapping rules, and collaborative scheduling parameters of the RAG knowledge base through a multi-dimensional adaptive optimization algorithm.

9. The knowledge retrieval and execution method based on RAG knowledge base and RPA collaboration according to claim 8, characterized in that, In S4, the search result quality assessment algorithm includes the following indicator calculation and judgment logic: The completeness index C of the calculation results is calculated as follows: C = number of key knowledge items actually acquired / total number of key knowledge items required by the requirements, with a value range of 0.0-1.

0. The timeliness index T is calculated as follows: T = 1 - (difference between the latest knowledge update time and the current time) / preset timeliness threshold, with a value range of 0.0-1.

0. The accuracy index A of the calculation results is based on the associations and verification rules in the knowledge graph, and the percentage of correct knowledge items is statistically calculated, with a value range of 0.0-1.

0. The overall quality score Q = 0.4C + 0.3T + 0.3A. When Q ≥ 0.7, it is determined that the execution requirements are met; when 0.5 ≤ Q < 0.7, a supplementary search is triggered; when Q < 0.5, a prompt for manual intervention is given.

10. The knowledge retrieval and execution method based on RAG knowledge base and RPA collaboration according to claim 8, characterized in that, In S3, the scenario-adaptive task planning algorithm, when planning composite requirement tasks, after the retrieval result quality assessment algorithm determines that the knowledge completeness meets the requirements, uses the retrieval result as an input parameter, and combines the execution node combination matched in the knowledge-execution mapping library, parameter mapping rules, and optimal execution path to generate an RPA execution task sequence.