CN-122019612-A - Knowledge retrieval execution system and method based on cooperation of RAG knowledge base and RPA
Abstract
The application discloses a knowledge retrieval execution system and method based on the cooperation of a RAG knowledge base and an RPA (remote procedure access), and aims to solve the problems of knowledge and execution disjoint, lack of dynamic knowledge support in execution, poor cooperation suitability and high operation threshold caused by independent operation of the RAG knowledge base and the RPA system in the prior art. The method comprises the steps of system initialization and knowledge preparation, receiving and analyzing service demands, planning task paths according to the types of the demands, executing knowledge retrieval to obtain a structured result, generating and executing an RPA (remote procedure A) automatic flow based on the retrieved result and a preset mapping rule, and feeding back the result and optimizing the system. By adopting the technical scheme, the application can realize full-link automatic closed loop from knowledge retrieval to flow execution, improve service processing efficiency and execution accuracy, expand application scenes and reduce the use threshold.
Inventors
- GONG YANLING
- YAO ZHICHUN
Assignees
- 苏州数字力量教育科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260202
Claims (10)
- 1. The knowledge retrieval execution system based on the cooperation of the RAG knowledge base and the RPA is characterized by comprising the following components: The RAG knowledge base module is used for storing and structuring the enterprise-level multi-format knowledge data, responding to the search request based on the dynamic weight fusion search algorithm and returning a structured knowledge result; The system comprises a demand analysis and task planning module, a knowledge-execution mapping library and a scene self-adaptive task planning algorithm, wherein the demand analysis and task planning module is used for receiving and analyzing service demands initiated by users, and planning task execution paths based on the knowledge-execution mapping library and the scene self-adaptive task planning algorithm, and the service demand types comprise knowledge inquiry classes, flow execution classes and knowledge + execution compound classes; the RPA execution module is used for executing an automatic flow task and comprises an execution engine unit, an operation node library and an intelligent API-free adaptation unit so as to support cross-system and cross-platform non-invasive operation; the cooperative scheduling module is used as a system core hub and is responsible for instruction distribution, data interaction and exception handling by adopting a bidirectional time sequence synchronization algorithm, so that dynamic cooperative control of the RAG knowledge base module and the RPA execution module is realized; The knowledge-execution mapping library is used for storing the knowledge type, the service scene, the execution node combination, the parameter mapping rule and the association relation data between the verification standards, supporting the rule dynamic update based on reinforcement learning and providing a basis for task planning; and the result feedback and optimization module is used for checking the accuracy of the execution result, recording the full-link log, and continuously optimizing the retrieval algorithm and the mapping rule through the multi-dimensional self-adaptive optimization algorithm.
- 2. The system for performing knowledge retrieval based on cooperation of a RAG knowledge base and an RPA as set forth in claim 1, wherein the RAG knowledge base module adopts a hierarchical architecture, and comprises a knowledge storage layer, a knowledge processing layer and a retrieval engine layer; The knowledge storage layer adopts a distributed block chain storage architecture, supports unified storage of multi-format knowledge such as Excel, word, PDF, paper scanning pieces and database data, and ensures sensitive knowledge safety and data integrity in a way of combining a block chain hash check method with a data desensitization method; the knowledge processing layer performs word segmentation, semantic annotation, structural conversion and knowledge association strength calculation operation on the warehouse-in knowledge to construct a dynamic knowledge graph, and the dynamic knowledge graph updates entity association strength values in real time by calculating association frequency, timeliness weight and scene correlation among knowledge entities; The search engine layer adopts a dynamic weight fusion search algorithm, fuses a keyword search algorithm based on improved TF-IDF and a semantic search model based on fine adjustment BERT, adopts a modified cosine similarity algorithm for semantic similarity calculation, and introduces a knowledge entity association strength factor correction similarity result.
- 3. The system for performing knowledge retrieval based on cooperation of RAG knowledge base and RPA according to claim 2, wherein the dynamic weight fusion retrieval algorithm adopted by the retrieval engine layer is calculated as follows: S101, calculating a keyword retrieval score Scorekeyword, and introducing document timeliness factor T and scene matching degree factor S correction based on an improved TF-IDF algorithm, wherein the formula is as follows: Scorekeyword=TF-IDF×(0.6T+0.4S); wherein, T is calculated dynamically according to the difference value between the document updating time and the current demand time, the value range is 0.1-1.0, S is calculated according to the matching degree of the scene of the document and the demand scene, and the value range is 0.0-1.0; s102, calculating a semantic retrieval score Scoresemantic, converting a query statement and a knowledge base document into semantic vectors based on a fine-tuning BERT model, and calculating by adopting a modified cosine similarity algorithm, wherein the formula is as follows: Scoresemantic=CosineSimilarity×(1+λ×R); wherein lambda is an associated strength influence coefficient, the value range is 0.1-0.3, and R is an associated strength value of a query statement core entity and a document core entity in a dynamic knowledge graph; S103, dynamically determining a weight coefficient alpha, learning historical retrieval data through a machine learning model, and establishing a mapping relation between query sentence characteristics and the optimal weight alpha, wherein the formula is as follows: α=0.3+0.4×σ(L)×σ(N)×(1-σ(C)); Wherein L is the length of a query sentence, N is the term normalization, C is the scene complexity, sigma is a Sigmoid activation function, and the input is mapped to a 0.0-1.0 interval; s104, calculating a final comprehensive relevance score: Scorefinal=α・Scorekeyword+(1-α)・Scoresemantic。
- 4. the system for performing knowledge retrieval based on cooperation of a RAG knowledge base and an RPA according to claim 1, wherein the demand parsing and task planning module comprises a demand parsing unit and a task planning unit; the demand analysis unit adopts a field pre-training-based transducer architecture model, and optimizes named entity recognition and intention classification by introducing a business scene dictionary and an industry entity library, so as to accurately recognize business scenes, core targets, key parameters and demand urgency; the task planning unit adopts a scene self-adaptive task planning algorithm, and executes different logics according to the analyzed demand type, scene characteristics and emergency degree, and the task planning unit specifically comprises the following steps: for knowledge inquiry type requirements, dynamically adjusting retrieval priority in combination with the urgency of the requirements, and generating a retrieval instruction with priority identification; for the flow execution type requirements, based on business scenes, key parameters and historical execution data in the requirements, multidimensional pattern matching is carried out in a knowledge-execution mapping library, corresponding execution node combinations, parameter mapping rules and optimal execution paths are searched, and RPA execution tasks are generated; For compound class requirements, a staged task planning strategy is adopted, a knowledge retrieval flow is triggered firstly, knowledge integrity is judged through a retrieval result quality evaluation algorithm, if the execution requirement is met, the result is used as an input parameter, and an RPA execution task sequence is generated by combining a mapping library rule.
- 5. The knowledge retrieval execution system based on the cooperation of the RAG knowledge base and the RPA as claimed in claim 1, wherein the intelligent API-free adaptation unit of the RPA execution module adopts an intelligent recognition method based on YOLOv interface elements aiming at a closed service system without a standard API interface, optimizes the image recognition positioning precision by combining an attention mechanism, and dynamically adjusts the operation track and rhythm by learning the manual operation habit in cooperation with the simulated mouse operation based on reinforcement learning, thereby realizing non-invasive high-precision automatic operation; the operation node library is internally provided with general operation nodes and industry-specific operation nodes, the general operation nodes and the industry-specific operation nodes are packaged in a configurable atomic operation mode, drag combination, parameter configuration and node dependency relationship definition are supported through a graphical interface, a node execution effect prediction function is provided, and the success rate of node combination is predicted based on historical execution data.
- 6. The knowledge retrieval execution system based on cooperation of a RAG knowledge base and an RPA according to claim 1, wherein the bidirectional timing synchronization algorithm adopted by the cooperative scheduling module comprises the following steps: s201, establishing a state sensing channel of a RAG knowledge base module and an RPA execution module, and collecting task execution states, resource occupancy rate and data processing progress of the two parties in real time; S202, constructing a cooperative scheduling matrix based on state data, and defining a scheduling priority function: P=ω 1 ×TaskImportance+ω 2 ×ResourceUtilization+ω 3 ×DataFreshness; Wherein ω 1 、ω 2 、ω 3 is a weight coefficient, the sum is 1, the task importance score, resourceUtilization is a resource utilization, DATAFRESHNESS is a data freshness; S203, adopting a dynamic time window scheduling strategy, and adaptively adjusting the size of a scheduling time window according to the task execution progress and the system load change; and S204, when data interaction delay or execution abnormality occurs, automatically triggering a compensation mechanism, and guaranteeing cooperative continuity through task redistribution, data cache multiplexing or standby path switching.
- 7. The system for performing knowledge retrieval based on the cooperation of a RAG knowledge base and an RPA as set forth in claim 1, wherein the multi-dimensional adaptive optimization algorithm adopted by the result feedback and optimization module comprises the steps of constructing a multi-dimensional performance evaluation index system including a retrieval accuracy rate P retrieval , a retrieval timeliness T retrieval , an execution success rate P execution , an execution efficiency E execution and a user satisfaction score S user , and constructing a performance index matrix: Determining a weight vector W= [ W 1 ,w 2 ,w 3 ,w 4 ,w 5 ] T of each index based on an analytic hierarchy process, wherein the weight vector W= [ W 1 ,w 2 ,w 3 ,w 4 ,w 5 ] T meets Σw i =1; defining an optimization objective function L= |W and M-Sideal| 2 +gamma-Di omega, wherein Sideal is an ideal performance vector, gamma is a regularization coefficient, and omega is a model complexity penalty term; adopting an improved gradient descent algorithm, combining a dynamic term and a self-adaptive learning rate adjustment strategy, and iteratively updating retrieval algorithm parameters, mapping rule weights and cooperative scheduling parameters, wherein the formula is as follows: θ t+1 =θ t -η t ・∇L(θ t )+β・(θ t -θ t-1 ); Wherein θ is the parameter set to be optimized, η t is the self-adaptive learning rate at time t, β is the momentum coefficient, ∇ L (θ t ) is the gradient of the objective function at θ t .
- 8. A knowledge retrieval execution method based on the cooperation of an RAG knowledge base and an RPA is characterized by comprising the following specific steps: S1, system initialization and knowledge preparation, namely importing enterprise business knowledge data through an RAG knowledge base module to complete knowledge structuring processing, dynamic knowledge graph construction and blockchain storage; configuring association rules of knowledge and RPA execution flow for each predefined service scene in a knowledge-execution mapping library, initializing reinforcement learning model parameters, and completing initialization setting of system operation parameters; s2, receiving service requirements, namely initiating the service requirements to the system by a user through natural language input, visual interface operation or API interface; s3, analyzing the service requirement by adopting a transducer architecture model based on field pre-training, identifying a service scene, a core target, key parameters, a requirement urgency degree and a requirement type, and planning a task execution path according to the requirement type based on a scene self-adaptive task planning algorithm: if the knowledge query is the knowledge query type, generating a retrieval instruction with a priority mark in combination with the requirement urgency, and executing step S4; If the flow execution class is the flow execution class, performing multidimensional pattern matching based on the knowledge-execution mapping library, generating an RPA execution task and an optimal execution path, and jumping to the step S5; If the knowledge is of a composite type, firstly executing the step S4 to acquire knowledge support, judging knowledge integrity through a retrieval result quality evaluation algorithm, and generating an RPA execution task sequence by combining the knowledge result if the knowledge integrity meets the requirement, and jumping to the step S5; s4, knowledge retrieval, namely a cooperative scheduling module issues a retrieval instruction to an RAG knowledge base module, wherein the RAG knowledge base module retrieves matched knowledge data from a knowledge storage layer through a retrieval engine layer by adopting a dynamic weight fusion retrieval algorithm, and returns a retrieval result after structural processing and quality evaluation; S5, the RPA process execution, namely, the cooperative scheduling module adopts a bidirectional time sequence synchronization algorithm to issue the generated RPA execution task to the RPA execution module, the RPA execution module calls a corresponding operation node from an operation node library according to task description, and the intelligent API-free adaptation unit is used for adapting a target service system to simulate manual completion of automatic process execution, and the execution process takes a knowledge result obtained by retrieval as a decision and verification basis; And S6, the result feedback and optimization module verifies the accuracy of the RPA execution result by combining the execution process data based on the verification standard in the knowledge-execution mapping library, feeds back the final result and the execution report to the user, records the full-link operation log at the same time, and adjusts the retrieval model parameters, the knowledge-execution mapping rule and the collaborative scheduling parameters of the RAG knowledge base through a multi-dimensional adaptive optimization algorithm based on the log data, the user feedback and the multi-dimensional performance evaluation index.
- 9. The method for performing knowledge retrieval based on cooperation of RAG knowledge base and RPA according to claim 8, wherein in S4, the retrieval result quality evaluation algorithm comprises the following index calculation and judgment logic: Calculating a result integrity index C, wherein C=the number of key knowledge items actually acquired/the total number of key knowledge items required by the requirement, and the value range is 0.0-1.0; Calculating a result timeliness index T, wherein T=1- (the difference value between the latest knowledge updating time and the current time)/a preset timeliness threshold value, and the value range is 0.0-1.0; Calculating a result accuracy index A, and counting the correct knowledge item duty ratio based on the association relation and the verification rule in the knowledge graph, wherein the value range is 0.0-1.0; The comprehensive quality score Q=0.4C+0.3T+0.3A, when Q is more than or equal to 0.7, the execution requirement is judged to be met, when Q is more than or equal to 0.5 and less than or equal to 0.7, the supplementary search is triggered, and when Q is less than or equal to 0.5, the manual intervention prompt is fed back.
- 10. The method for performing knowledge retrieval based on cooperation of a RAG knowledge base and an RPA according to claim 8, wherein in S3, when the scene adaptive task planning algorithm plans a composite type demand task, the retrieval result quality evaluation algorithm determines that the knowledge integrity meets the requirement, and then uses a retrieval result as an input parameter, and combines the matched execution node combination, parameter mapping rule and optimal execution path in the knowledge-execution mapping base to generate an RPA execution task sequence.
Description
Knowledge retrieval execution system and method based on cooperation of RAG knowledge base and RPA Technical Field The invention belongs to the technical field of computers, and particularly relates to a knowledge retrieval execution system and method based on cooperation of a RAG knowledge base and an RPA. Background With the deep advancement of enterprise digital transformation, the business process not only comprises a large number of decision links which depend on accurate knowledge support, but also relates to massive repeated and regular operation tasks. Under the background, a knowledge base system based on retrieval enhancement generation (RAG) has been widely applied to enterprise knowledge management scenes due to the strong semantic understanding and structured knowledge output capability, and can efficiently respond to the query requirements of users for information such as policy specifications, data standards, operation guidelines and the like. Meanwhile, the Robot Process Automation (RPA) technology realizes remarkable manpower substitution effect in high-frequency repeated processes such as financial reimbursement, production scheduling, personnel management and the like by virtue of the cross-system and non-invasive operation capability. However, the RAG knowledge base and the RPA system are commonly deployed in independent forms, and lack of deep cooperative mechanisms, so that knowledge value is difficult to be effectively converted into execution actions, and the implementation method is characterized in that knowledge and execution are disjoint, RAG can only provide static query results, follow-up business operation cannot be automatically triggered, manual intervention translation is required, efficiency is low, errors are easy to introduce, dynamic knowledge support is lacking in an execution process, RPA strictly depends on preset script operation, latest business rules or context knowledge cannot be called in real time in a process, fault tolerance is poor and accuracy is insufficient when facing complex or changing scenes, cooperative adaptation capability is limited, and especially when facing closed business systems without API interfaces (such as partial government platforms or old ERP systems), seamless connection from natural language instructions to end-to-end automatic execution is difficult to be realized in the existing scheme, and moreover, system configuration is highly dependent on technicians, knowledge retrieval-process execution integrated tasks cannot be independently constructed in a low threshold mode, so that rapid landing and large-scale application of technologies in a first-line business scene is severely restricted. Therefore, a cooperative architecture for deeply fusing the RAG knowledge base and the RPA execution capability is needed, which opens a full-link closed loop from knowledge acquisition, decision analysis to automation, and solves the core problems of difficult knowledge landing, stiff execution, narrow adaptation range, high operation threshold, and the like. Disclosure of Invention Aiming at the defects of the prior art, the invention aims to provide a knowledge retrieval execution system and method based on the cooperation of a RAG knowledge base and an RPA, which solve the technical problems in the prior art. The aim of the invention can be achieved by the following technical scheme: A knowledge retrieval execution system based on the cooperation of a RAG knowledge base and RPA comprises the following components: The RAG knowledge base module is used for storing and structuring the enterprise-level multi-format knowledge data, responding to the search request based on the dynamic weight fusion search algorithm and returning a structured knowledge result; The system comprises a demand analysis and task planning module, a knowledge-execution mapping library and a scene self-adaptive task planning algorithm, wherein the demand analysis and task planning module is used for receiving and analyzing service demands initiated by users, and planning task execution paths based on the knowledge-execution mapping library and the scene self-adaptive task planning algorithm, and the service demand types comprise knowledge inquiry classes, flow execution classes and knowledge + execution compound classes; the RPA execution module is used for executing an automatic flow task and comprises an execution engine unit, an operation node library and an intelligent API-free adaptation unit so as to support cross-system and cross-platform non-invasive operation; the cooperative scheduling module is used as a system core hub and is responsible for instruction distribution, data interaction and exception handling by adopting a bidirectional time sequence synchronization algorithm, so that dynamic cooperative control of the RAG knowledge base module and the RPA execution module is realized; The knowledge-execution mapping library is used for storing the knowledge type,