Intelligent conversation processing method, system and device fusing llm and rpa and medium
Patent Information
- Application Number
- CN202610953961.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-06-30
AI Technical Summary
[0003]现有技术中对话系统不能可靠、合理地估计所生成内容的可信程度,低置信度的推理结果直接触发下游业务操作,因而很容易造成参数缺失、逻辑错位、跨系统数据不一致的半完成状态,并且传统架构中对话状态维护与自动化任务调度彼此独立,没有基于置信度门控的状态挂起及条件释放逻辑,而知识库更新又依靠固定周期的批处理,因此系统处理复合意图请求及多轮连续操作时必然出现执行断点、任务重试无序、知识滞后等缺陷
[0048]1.本发明中通过设置融合知识检索的相似度得分与词元生成概率得分计算得到联合置信度,并在联合置信度小于第二阈值时将对话状态机的阶段标识更新为挂起状态并输出引导交互指令,仅当联合置信度大于或等于第二阈值时向机器人流程自动化调度模块下发驱动自动化任务执行序列的任务调度指令,起到了对生成内容进行动态可信度评估与条件拦截的作用,解决了现有技术中无法准确衡量生成内容可信程度导致低置信度推理结果直接触发下游业务操作引发的参数缺失、逻辑错位或跨系统数据不一致的半完成状态,以及传统架构缺乏基于置信度门控的状态挂起与条件释放逻辑的问题。
Smart Images

Figure CN122470328B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer data processing technology, specifically to an intelligent dialogue processing method, system, device, and medium that integrates LLM and RPA. Background Technology
[0002] As enterprises deepen their digital transformation, the demand for intelligent services and automated execution in human resource management scenarios has increased significantly. From the perspective of existing technologies, intelligent dialogue systems generally use rule engines or early natural language processing models for intent recognition and slot filling, combined with preset workflows or independent interface calls to complete business operations. More importantly, in industrial PaaS platforms and multi-system collaboration scenarios, enterprises commonly adopt mature architectures consisting of data platforms, technology platforms, integration platforms, and low-code platforms to support the development of various applications in human resource management and engineering monitoring. Complementing this is the fact that vector databases and retrieval enhancement generation technologies are being fully utilized in knowledge base construction. Knowledge entries are maintained through scheduled batch updates or manual annotation, and cross-system data interaction and service orchestration are reliably implemented through application programming interfaces (APIs).
[0003] In existing technologies, dialogue systems cannot reliably and reasonably estimate the credibility of the generated content. Low-confidence inference results directly trigger downstream business operations, which can easily lead to incomplete states such as missing parameters, logical misalignment, and inconsistent data across systems. Furthermore, in traditional architectures, dialogue state maintenance and automated task scheduling are independent of each other, and there is no state suspension and condition release logic based on confidence gating. Knowledge base updates rely on fixed-cycle batch processing. Therefore, when the system processes compound intent requests and multi-round continuous operations, defects such as execution breakpoints, disordered task retries, and knowledge lag will inevitably occur. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides an intelligent dialogue processing method, system, device, and medium that integrates LLM and RPA.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0006] This invention provides an intelligent dialogue processing method that integrates LLM and RPA, comprising:
[0007] Acquire natural language input data and generate input feature vectors;
[0008] Based on the input feature vector, perform intent recognition and slot extraction operations to obtain intent confidence and slot data dictionary;
[0009] When the confidence level of the intent is greater than the first threshold, a knowledge fragment retrieval is performed in the vector database, and the retrieved document fragments and the input feature vector are input into the pre-trained language model to generate candidate responses;
[0010] The joint confidence score is calculated by integrating the similarity score from knowledge retrieval with the word generation probability score output by the language model.
[0011] If the joint confidence level is less than the second threshold, the stage identifier of the dialogue state machine is updated to the suspended state, and a guiding interaction instruction for requesting supplementary information is output.
[0012] A task scheduling instruction to drive the execution sequence of automated tasks is issued to the robotic process automation scheduling module only when the joint confidence level is greater than or equal to the second threshold.
[0013] As a preferred technical solution of the present invention, the first threshold is an intent confidence threshold; the step of acquiring natural language input data and generating an input feature vector includes: acquiring the user's natural language input data and concatenating it with multi-turn dialogue history context features and user permission features to generate the input feature vector;
[0014] After performing the intent recognition and slot extraction operations to obtain the intent confidence and slot data dictionary, the method further includes: if the intent confidence is less than the first threshold, skipping the inference step of the pre-trained language model, updating the stage identifier to the information to be supplemented state, and dynamically generating the guidance interaction instruction based on the missing slot information and feeding it back to the user terminal.
[0015] As a preferred embodiment of the present invention, the second threshold is an execution threshold; the joint confidence score is calculated by fusing the similarity score of knowledge retrieval with the word generation probability score output by the language model, including:
[0016] The average cosine similarity value of the retrieved document fragments is obtained as the similarity score;
[0017] The average log probability of the first preset number of lexical units generated by the pre-trained language model is obtained as the lexical unit generation probability score.
[0018] The similarity score and the word generation probability score are weighted and summed according to the preset first and second weight coefficients to obtain the joint confidence score.
[0019] As a preferred embodiment of the present invention, updating the stage identifier of the dialogue state machine to a suspended state and outputting a guided interaction instruction for requesting supplementary information includes:
[0020] Obtain the interaction round count value recorded in the dialogue state machine;
[0021] If the interaction round count is less than the preset round threshold, then the operation of updating the stage identifier to the suspended state is performed, the input feature vector and the slot data dictionary are kept in the local session cache, and the guided interaction instruction is output to pause the processing of the downstream automated execution queue.
[0022] If the interaction round count is greater than or equal to the preset round threshold, the stage identifier is updated to manual processing status, the context state data of the current session is serialized into a structured data packet, and the data packet is transmitted to the exception handling queue.
[0023] As a preferred embodiment of the present invention, the step of issuing task scheduling instructions to the robotic process automation scheduling module to drive the execution sequence of automated tasks includes:
[0024] The robot process automation scheduling module is issued a task scheduling instruction carrying a data version verification mark.
[0025] Multiple task execution units are created based on the execution logic sequence corresponding to the target intent, and the status flag of each task execution unit is initialized to the pending execution state.
[0026] When any of the task execution units experiences a communication response timeout or interface abnormality during execution, the status flag of that unit is updated to retry status, and the original task scheduling instruction is retained in the temporary storage area.
[0027] Based on a preset incremental delay strategy, the execution call is re-initiated after waiting for the target time interval. If the execution still fails when the accumulated number of retries reaches the maximum threshold, the execution of subsequent related tasks is terminated to maintain cross-system data consistency.
[0028] As a preferred embodiment of the present invention, the method further includes:
[0029] Scan and extract abnormal session records in the log storage layer where the joint confidence level is less than the second threshold or the user feedback score is less than the preset score threshold;
[0030] Extract the input text data from the abnormal session records and perform clustering operations. When the frequency of occurrence of the same cluster is greater than the frequency threshold, generate candidate knowledge entries and update their status to pending review.
[0031] Upon receiving the approval instruction for the candidate knowledge entry, the text of the candidate knowledge entry is converted into a vector representation and stored in the vector database, while a data update instruction is sent to the corresponding retrieval node.
[0032] As a preferred embodiment of the present invention, the automated task execution sequence involves cross-system data interaction, and the method further includes:
[0033] Obtain the topology data of the service call process, verify the one-way dependency attribute of the topology data, and sort its nodes in the topology to determine the execution order of cross-system service calls;
[0034] The input data structure features of the first node and the output data structure features of the last node are merged, and field conflict resolution is performed based on the data mapping relationship carried by the directed edges between nodes.
[0035] The field conflict resolution operation includes: when multiple input edges point to the same field of the same input data structure feature and the source field values are inconsistent, the value provided by the edge carrying a preset priority mark is adopted first; if the preset priority mark does not exist, the value corresponding to the first edge reached is retained according to the result of the topology sorting, so as to automatically generate application interface code for service calls.
[0036] The present invention also provides an intelligent dialogue processing device integrating LLM and RPA, comprising:
[0037] The feature construction unit is used to acquire natural language input data and generate input feature vectors;
[0038] The semantic parsing unit is used to perform intent recognition and slot extraction operations based on the input feature vector to obtain intent confidence and slot data dictionary;
[0039] The joint reasoning unit is used to perform knowledge retrieval in the vector database and call the large language model to generate candidate responses when the confidence of the intent is greater than the first threshold.
[0040] The confidence assessment unit is used to integrate the similarity score of knowledge retrieval with the word generation probability score output by the language model to calculate the joint confidence score.
[0041] The state coordination and scheduling unit is used to update the stage identifier of the dialogue state machine to a suspended state and output a guided interaction instruction when the joint confidence is less than the second threshold; and to issue a task scheduling instruction to the robot process automation scheduling module to drive the execution sequence of automated tasks only when the joint confidence is greater than or equal to the second threshold.
[0042] The present invention also provides an intelligent dialogue processing system integrating LLM and RPA, comprising: a processor, a memory, a communication interface and a database;
[0043] The memory stores a computer program, and the processor executes the computer program to implement the above method.
[0044] The database is used to store vector knowledge data containing business rules and document fragments, multi-turn dialogue history logs, and task execution status records of robot process automation.
[0045] The communication interface is used to receive natural language input data sent by an external access terminal, and when the joint confidence level is greater than or equal to the second threshold, to send a task scheduling instruction carrying a data version verification mark to the external heterogeneous business system.
[0046] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described processing method.
[0047] The beneficial effects of this invention are:
[0048] 1. In this invention, a joint confidence score is calculated by setting a similarity score from fusion knowledge retrieval and a word generation probability score. When the joint confidence score is less than a second threshold, the stage identifier of the dialogue state machine is updated to a suspended state and a guiding interaction instruction is output. Only when the joint confidence score is greater than or equal to the second threshold is a task scheduling instruction that drives the execution sequence of automated tasks issued to the robot process automation scheduling module. This plays a role in dynamically evaluating the credibility of the generated content and intercepting conditions. It solves the problems in the prior art where the inability to accurately measure the credibility of the generated content leads to low-confidence inference results directly triggering downstream business operations, resulting in missing parameters, logical misalignment, or inconsistent cross-system data in a semi-complete state. It also addresses the lack of state suspension and condition release logic based on confidence gating in traditional architectures.
[0049] 2. This invention rationally stores the input feature vector and slot data dictionary in the local session cache, thereby pausing the processing of the downstream automated execution queue. It then controls the retry of task execution units according to a pre-defined incremental delay strategy, thus effectively ensuring cross-system data consistency. Simultaneously, it proactively and efficiently scans the log storage layer for abnormal session records where the joint confidence score is less than a second threshold or the user feedback score is less than a preset score threshold. It performs clustering operations, generating candidate knowledge entries when the frequency of occurrence in the same cluster exceeds a frequency threshold. After review, these entries are converted into vector representations and stored in a vector database. Therefore, this method helps ensure the continuity of multi-turn dialogue context, enables ordered retry of abnormal tasks, and allows the knowledge base to be dynamically updated on demand. This solves problems such as execution breakpoints, unordered task retries, and knowledge lag caused by knowledge base updates relying on fixed-cycle batch processing when processing composite intent requests and multi-turn continuous operations. Attached Figure Description
[0050] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0051] Figure 1 This is a schematic diagram illustrating the workflow of the intelligent dialogue processing method of the present invention. Detailed Implementation
[0052] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0053] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0054] like Figure 1 As shown, the intelligent dialogue processing method that integrates pre-trained language models and robot process automation first obtains natural language input data from multiple channels. The data input from the voice channel is first transcribed into a text sequence by an automatic speech recognition component. The direct input text directly enters the normalization pipeline for various preprocessing steps such as noise reduction, full-width / half-width character conversion, and synonym normalization. Then, the embedded representation of the text in the current round is extracted. Next, the historical context features of multi-round dialogues and user permission features are reliably and timely retrieved from shared memory. The features are appropriately aligned in dimensions and concatenated to obtain the input feature vector. This vector is the unified data input for subsequent processing nodes, which also ensures the consistency of data format between modules.
[0055] First, an input feature vector is generated and then injected into the natural language understanding module for intent recognition and slot extraction. Intent recognition uses a fine-tuned classifier based on a pre-trained language model, thus obtaining the full intent probability distribution. The maximum probability is then taken as the intent confidence. Entity extraction uses a sequence labeling model to accurately extract key business parameters from the text and fill them into the slot data dictionary. The system then rigorously compares the obtained intent confidence with a first threshold. If the intent confidence does not reach the first threshold, it is considered semantically ambiguous or that key entities are missing, thus directly blocking the subsequent inference process. Otherwise, it enters the retrieval enhancement generation stage.
[0056] The processor in the retrieval enhancement generation stage uses the input feature vector as the query key to perform nearest neighbor retrieval from the vector database. It first finds several document fragments that are semantically closest to the current query, and then constructs enhanced prompt words containing the selected document fragments and the input feature vector. Finally, it calls the pre-trained language model to generate candidate answers.
[0057] During model inference, the control plane simultaneously acquires two evaluation metrics:
[0058] One is the average cosine similarity value between the retrieved document fragments and the query vector, which is used as the similarity score;
[0059] The second is the average log probability of the first preset number of lexical units generated by the pre-trained language model, which is then indexed and mapped to serve as the lexical unit generation probability score.
[0060] The joint confidence level is calculated by linearly weighting the two scores according to the preset first and second weighting coefficients.
[0061] After obtaining the joint confidence score, it is compared with the second threshold. If the joint confidence score is less than the second threshold, it indicates that the generated candidate response has not reached the safety boundary in terms of factual relevance or logical certainty. At this time, the system does not directly output a response or error, but updates the stage identifier of the dialogue state machine to the suspended state, blocks the downstream execution queue, and outputs a guiding interaction instruction to the user to request supplementary information.
[0062] If the joint confidence level is greater than or equal to the second threshold, it is determined that the current response has execution determinism. Therefore, the stage identifier of the dialogue state machine is changed to the execution ready state, and then the task scheduling instruction is formally issued to the robot process automation scheduling module. The attached parameters are business parameters and version verification flags. After receiving the instruction, the scheduling module parses it into several task execution units and drives the automated task execution sequence in sequence according to the execution logic order corresponding to the target intent, thereby completing cross-system data interaction and business operations.
[0063] This embodiment clearly describes the steps of acquiring natural language input data and generating input feature vectors. The input preprocessing module can first receive raw data from multiple channels. The voice channel input is transcribed into a text sequence by the automatic speech recognition component, while the direct input text is sent to the normalization pipeline for normalization processing, namely, removing non-standard characters, performing full-width / half-width conversion, and performing synonym normalization. This eliminates the format noise contained in the multi-source input and ensures the consistency of the subsequent feature space.
[0064] After the normalized text enters the feature construction stage, the system extracts feature components in three dimensions in parallel. The text of the current round is first mapped into a dense vector v1 by the pre-trained sentence encoder, with a fixed dimension of 768. The multi-round dialogue history context features are extracted from the session cache maintained by the dialogue state machine. The system defaults to taking the text of the last five rounds of interaction. After each round of text is encoded separately, they are fused using a time decay mechanism. Therefore, the weight coefficient w of the i-th round of historical text is... i Determined according to the exponential decay law:
[0065] ;
[0066] Where, Δt i It is the time difference between the time when the i-th round of dialogue occurs and the current request time, and is described by the time decay constant λ.
[0067] When λ takes a value in the range of [0.05, 0.2], the effective memory window of the dialogue context can be controlled within the range of 10 to 20 minutes. Therefore, in this embodiment, λ=0.1 is reasonably selected. At this time, the weight of historical dialogue within 5 minutes is still above 0.6, while the weight of outdated contexts exceeding 30 minutes has decayed to below 0.05. Thus, it can effectively suppress the interference of historical semantics on the current intent. The obtained context feature is denoted as v2, and its dimension is still 768.
[0068] The construction of user permission features is based on the role identifiers and operation permission lists returned by the system permission management module. First, the role type is mapped to a low-dimensional one-hot encoding, and each permission switch (resume viewing, interview arrangement, salary inquiry) is converted into a Boolean vector. Then, the hash fingerprint sequence of the user identifier is concatenated with this vector, and then normalization is performed using the L2 norm. This yields a user permission feature vector v3 with a fixed dimension of 64.
[0069] The three feature components have already been dimensionally aligned in a unified feature space, so the input feature vector V is constructed using a linear weighting and concatenation method:
[0070] ;
[0071] Where ⊕ represents the operation of adding vectors bitwise or directly concatenating them, and α, β, and γ are preset feature branch weight coefficients.
[0072] In this embodiment, α∈[0.4,0.6], β∈[0.2,0.4], γ∈[0.1,0.3], and satisfy α+β+γ=1, preferably α=0.5, β=0.3, γ=0.2. At this time, the current round text directly carries the user's core instructions and contributes the most to intent classification. The historical context is mainly used for reference resolution and intent continuation, playing an auxiliary correction role. User permission features only provide marginal constraints when involving unauthorized operations or role-differentiated routing. While maintaining the coherence of multi-round dialogue, it avoids the dilution of real-time semantic signals by static permission features, so that the input signal-to-noise ratio of the intent recognition module reaches the optimal level.
[0073] Since an input feature vector is generated, it is input into the natural language understanding module to perform two tasks: intent recognition and slot extraction. The intent classification method used is a classifier fine-tuned based on a pre-trained language model. Therefore, the full intent probability distribution is calculated first, and then the maximum probability is taken as the intent confidence.
[0074] The present invention reasonably defines the first threshold as the intent confidence threshold. In this embodiment, 0.75 is selected as the threshold. On the independent validation set, when the threshold is 0.75, the precision and recall of intent recognition are at the equilibrium inflection point (the precision has exceeded 85% and the recall is about 86%). At this time, the proportion of downstream invalid inference caused by misjudgment is the lowest.
[0075] After obtaining the intent confidence level and slot data dictionary, the system needs to make conditional branch judgments.
[0076] If the measured intent confidence is less than the first threshold (i.e., 0.75), the system considers the current input semantics to be ambiguous or lacking necessary entities. Therefore, it calls the corresponding processing flow according to the case of insufficient intent confidence, and first performs short-circuit protection of computing resources:
[0077] The system forcibly skips the subsequent pre-trained language model inference steps, does not perform vector database retrieval, does not call the large language model to generate candidate responses, and does not perform joint confidence calculation. Therefore, it avoids the waste of computing power in low confidence scenarios and cuts off the path of unreliable semantic signals to the execution layer.
[0078] After a short circuit is triggered, the control plane changes the stage identifier of the dialogue state machine to the information-pending state and writes the identifier into the session-level state storage area, thus indicating that the current interaction is in the stage of waiting for the user to provide information.
[0079] Next, we need to analyze the slot data dictionary output in this round and compare it with the fields that should be present in the intent types involved in the business rule base.
[0080] For example, since the job title and target quantity fields may be missing from the job dictionary under the initial screening of candidates, the system extracts the missing field identifiers, finds the corresponding dialogue structure from the pre-set follow-up question template library, dynamically completes the missing item names, and then generates guiding interaction instructions based on this.
[0081] After the instruction is fed back to the client through the user interaction interface, it is presented in the form of text prompts or voice broadcasts. It waits for the user's next input. More importantly, the system does not release the session context cache at this time. Therefore, after the user supplements the information, the constructed input feature vector and existing slot records can be reused directly without having to re-execute the complete parsing process.
[0082] The relevant logic can be explained by examining the actual operation of the initial screening scenario in human resources: When a user inputs "Please help me check the resumes of those Java developers I just received," the system first performs normalization and feature concatenation to obtain V. At this point, the confidence score of the "HRSCREEN" intent output by the intent classifier is 0.62, lower than the first threshold of 0.75. Since the "jobtitle" and "headcount" fields in the slot dictionary are both empty, the system terminates the subsequent inference process, sets the stage marker to "Information pending," and proactively generates a guiding interaction instruction: "Please supplement the specific job title and target number of people to be screened." The user then inputs "Screen 3 senior Java engineers." The system directly completes the slots based on the cached session state, recalculates the intent confidence score, and only after confirming that the threshold is met does it formally enter the retrieval and automated scheduling process.
[0083] It should be noted that the slot data dictionary is actually organized as JSON structured data in key-value pair format at the computer level.
[0084] Simply relying on the similarity score obtained during the retrieval stage cannot reliably eliminate factual deviations introduced during the content reorganization of the pre-trained language model. Furthermore, simply relying on the word generation probability score cannot directly verify whether the generated content is strictly anchored to the reference document. Therefore, this invention introduces a dual-source index fusion method to construct a quantifiable confidence assessment channel.
[0085] First, the average cosine similarity of each retrieved document fragment is calculated as the similarity score. Let K be the number of knowledge fragments returned by the vector database (K=5 is preferable in this embodiment), and let s be the cosine similarity between the i-th document fragment and the query vector. i Therefore, the formula for calculating the similarity score S1 is as follows:
[0086] ;
[0087] The calculation process takes the arithmetic mean of the search results, smoothing out local fluctuations in the spatial distribution of individual document vectors. A minimum smoothing term ϵ (taken as 10 in this embodiment) is introduced into the cosine similarity calculation. −8 This avoids numerical overflow when the vector magnitude is zero, and the resulting similarity score is reliably normalized to the [0, 1] interval, reflecting the degree of matching between the query intent and the knowledge base facts.
[0088] The system directly uses the average log probability of the first preset number of words generated by the pre-trained language model as the word generation probability score. However, during actual inference, the pre-trained language model outputs the probability distribution word by word. Therefore, the system extracts the first N0 words of the generated sequence (in this embodiment, the preset number N0 is 20) and extracts the log probability value L of each word j. j To eliminate the adverse effects of low-probability extreme values on the overall index calculation, and to map indices of different scales to a unified dimension, the system uses a logarithmic averaging followed by exponential restoration to determine the word generation probability score S2.
[0089] ;
[0090] The core conclusions, action instructions, and key parameters given in the structured business response generally appear at the beginning of the generated sequence. The predictive stability within the window period can be used to represent the logical determinism of the entire response. Operations such as logarithmic transformation and exponential restoration make the obtained score fall in the [0, 1] interval, and its confidence decay has a clear linear interpretation.
[0091] Since two basic scores have already been obtained, the system can use the given first and second weighting coefficients to perform a weighted summation operation on the two scores, thereby obtaining the joint confidence level C0:
[0092] ;
[0093] Wherein, k1 is the first weighting coefficient, and k2 is the second weighting coefficient.
[0094] In the business scenario of this embodiment, k1∈[0.2,0.6], k2∈[0.3,0.8], and when k1=0.4 and k2=0.6, the correlation coefficient between the joint confidence and the accuracy of manual annotation reaches its maximum value. Therefore, the certainty (k2) of the language model's understanding of business logic and instruction generation in the automated execution chain should be slightly greater than the simple knowledge retrieval matching degree (k1), thereby avoiding the generation of ambiguous instructions in the logic deduction stage after the model retrieves the correct material.
[0095] After the joint confidence score is calculated, it needs to be compared with the second threshold, which is the execution threshold. Therefore, in this implementation, the execution threshold is set to 0.85.
[0096] In the validation set test, when the threshold was set to 0.85, the system's accuracy in calling downstream automated tasks reached over 90%, and the rate of unnecessary manual intervention was well controlled at around 10%. Therefore, if the joint confidence level mentioned in the paper is less than the selected execution threshold, the stage identifier of the dialogue state machine will be updated to the suspended state, blocking the downstream execution queue and outputting the guiding interaction instruction. Only when the joint confidence level is greater than or equal to the execution threshold will the state machine be unlocked and the task scheduling instruction that drives the execution sequence of automated tasks be formally issued to the robot process automation scheduling module.
[0097] Taking the specific operational data of the candidate initial screening scenario as an example: after the user queries, the system retrieves 5 documents related to job specifications from the vector database, and thus calculates the average cosine similarity S1=0.82, while the average log probability of the first 20 words generated by the pre-trained language model, after exponentialization, is S2=0.91.
[0098] Substituting into the weighted formula, we get C0 = 0.4 × 0.82 + 0.6 × 0.91 = 0.874. Since 0.874 is greater than the execution threshold of 0.85, the system determines that the current response has deterministic execution and automatically triggers the task scheduling instruction issuance process.
[0099] Since the retrieval score for long-tail policy consultation is 0.55 and the generated score is 0.68, the joint confidence level is 0.628. However, this value is lower than the selected threshold. Therefore, the system automatically switches to a suspended state and requests the user to supplement the business context. This effectively prevents low-confidence instructions from interfering with the RPA pipeline in engineering.
[0100] When the joint confidence score is detected to be less than the second threshold for the first time, the interaction round count is initialized to zero. After each output of the guided interaction command, the count is automatically incremented by one. If the new joint confidence score calculated after the user supplements information is greater than or equal to the second threshold or the session times out, the count is reset.
[0101] The processor needs to read the interaction round count used in the current session, so it must first compare it with a preset round threshold.
[0102] In this embodiment, the preset round threshold is 2. The user's effective information completion rate is about 80% when asking a single follow-up question, drops to about 50% when asking two follow-up questions, and is less than 30% after asking three follow-up questions.
[0103] Setting the preset round threshold to 2 allows the system to have limited self-correction capabilities while preventing the infinite loop of follow-up questions caused by continuous semantic divergence, which helps to balance the success rate of interaction and the overhead of computing resources.
[0104] The interaction round count has not reached the given round threshold, so the processor executes the first branch logic.
[0105] First, change the flags of each stage of the dialogue state machine to the suspended state and write the flags to the session-level state storage area. This indicates that the interaction is currently in the stage of waiting for the user to provide additional information. Subsequent user messages should be bound to the suspended state and should not be fully identified.
[0106] Secondly, the processor serializes the currently generated input feature vector and the slot data dictionary containing identified entities, storing them in the local session cache. The cache key is associated with the session's unique identifier, and its lifespan is set to 1800 seconds. Therefore, when the user responds to the guided interaction command and enters supplementary text, the system can directly retrieve the frozen input feature vector and slot data dictionary from the local session cache, only merging and incrementally updating the features of the newly extracted slots, and then naturally proceeding to the joint confidence calculation stage.
[0107] If the interaction round count is greater than or equal to the selected preset round threshold, the processor can determine that the automatic clarification mechanism has reached its limit and thus execute the second branch logic.
[0108] The processor updates the stage identifiers of each stage of the dialogue state machine to the manual processing state. The current session has been removed from the automated processing link, and all future interactions should be routed to the manual service channel. The system can extract the context state data of the current session and encapsulate it into a structured data packet.
[0109] After the encapsulation is completed, the system uses a message middleware to deliver the obtained structured data packets to the exception handling queue without loss and reliably. The human customer service monitoring system subscribes to this queue, and the data packets have a validity period of 1800 seconds in the queue, after which they are automatically cleared.
[0110] Sending task scheduling instructions to the robotic process automation scheduling module to drive the execution sequence of automated tasks is to solve problems such as state loss and data inconsistency that occur in serial calls between multiple systems.
[0111] First, a task scheduling instruction with a data version verification mark is sent to the robot process automation scheduling module. The data version verification mark used is physically implemented as a monotonically increasing sequence number or timestamp identifier attached to the task payload. Therefore, before the downstream business system receives the instruction and prepares to execute the write operation, it will read the version identifier currently contained in the target data record and compare it: if the versions are the same, the update will be performed and the mark will be incremented; if the versions are different, the request will be directly intercepted and a conflict signal will be returned.
[0112] The scheduling module instantiates task execution units according to the execution logic order corresponding to the target intent. Therefore, it can detect communication response timeouts and interface abnormal signals in a timely and reliable manner during the execution of each task execution unit. Once detected, it interrupts the current call link, clearly and strictly sets the status of the unit to the retry state, and at the same time serializes the original task scheduling instructions carried by the unit at this moment and persists them to the temporary storage area bound to the current session.
[0113] Because a preset incremental delay strategy is used to control the retry rhythm, the waiting time interval D before the nth retry is... n Calculated according to the exponential retreat pattern:
[0114] ;
[0115] Where T0 is the base interval time, which is preferably 2 seconds in this embodiment; n is the currently accumulated retry sequence number (retry after the first failure is counted as 0); N max The maximum number of times threshold is set to 3 in this embodiment.
[0116] In industrial-grade network environments, transient congestion and downstream service overload typically heal within seconds. Using exponentially increasing target waiting time intervals avoids duplicate requests caused by linear retries and provides ample resource reclamation windows for downstream heterogeneous systems. Therefore, approximately 90% of temporary communication failures can be resolved within N seconds. max Recovery under the constraint of 3, the total time is strictly controlled within 14 seconds, achieving a balance between execution success rate and user-perceived latency.
[0117] If the cumulative number of retries reaches the maximum threshold and the task still fails, the system classifies the failure as a persistent anomaly. Therefore, the processor permanently sets the status of the task execution unit to failure and terminates the execution of the relevant task.
[0118] The system iterates through the execution queue, first finding all downstream nodes that require the output data of the currently failed unit as a prerequisite, setting their states directly to the terminated state, and simultaneously stopping the issuance of control loads to the robot process automation scheduling module.
[0119] To identify potential knowledge gaps, the background processing layer scans the log storage layer periodically, extracting abnormal session records that meet the abnormal conditions. The logic for determining abnormal session records is based on dual-path feedback signals:
[0120] One approach is to examine the joint confidence level of the system's internal evaluation. If it is less than the given second threshold, it is considered that the model does not have sufficient confidence in the generated answer, which is often seen in cases of insufficient knowledge retrieval or divergent reasoning.
[0121] Secondly, there are external user feedback signals. If the user feedback rating is lower than the given rating threshold, it can be determined that the user is not satisfied with the service result.
[0122] In this embodiment, the selected second threshold is preferably 0.85, and the preset scoring threshold is preferably 2 (the scoring system used is a 5-point system).
[0123] By combining the two types of signals, the system can effectively collect scenarios with insufficient confidence identified by the machine and scenarios with explicit error reports from users, thus establishing a truly complete knowledge blind spot collection pool.
[0124] Since the extracted abnormal session records were analyzed, the input text data was first extracted and then clustered to identify common problems.
[0125] First, the input text data is preprocessed by word segmentation and stop word removal. Then, the text embedding model is used to map the text into a high-dimensional dense vector. This leads to the use of a vector space model to solve the cosine similarity or sequence edit distance of the text vectors. Finally, texts with similar semantics are merged into the same cluster.
[0126] After the clustering is completed, the frequency of each cluster is counted. Any cluster whose frequency exceeds the given frequency threshold is automatically generated as a candidate knowledge entry.
[0127] In this embodiment, the frequency threshold is preferably set to 3. Most of the abnormal questions that appear once are caused by input errors, or contain invalid characters, or are extremely personalized expressions. Therefore, directly entering them into the database will cause redundancy in the knowledge base. Questions with a frequency greater than the frequency threshold are truly common and repetitive, and are more likely to be knowledge gaps.
[0128] Once triggered, the system automatically extracts the core text of the cluster as the question description, associates it with the response content generated by the highest confidence session in the history of the cluster as a candidate answer, constructs candidate knowledge entries, updates its status to pending review, and pushes it to the manual review queue.
[0129] When the system receives the approval instruction for the candidate knowledge item, it executes the knowledge hot update process. The processor calls the text embedding encoder, which is consistent with the front-end retrieval stage, to convert the approved candidate knowledge item text into a vector representation. Subsequently, the vector representation, along with the metadata, is written into a specified set in the vector database to complete the persistent storage of the knowledge entity.
[0130] To ensure data consistency in a distributed retrieval environment, the system immediately broadcasts a data update instruction to each retrieval node that depends on the vector database after the write operation is completed. Upon receiving the instruction, the retrieval node clears the old index cache in its local memory and reloads the latest metadata of the vector database.
[0131] Furthermore, when the automated task execution sequence involves cross-system data interaction, the system automatically generates application interface code that adapts to multi-source heterogeneous systems by parsing the service orchestration process constructed by the user. First, it obtains the topology data of the service call process. This topology data comes from the structured configuration file exported by the business orchestration platform and is represented at the underlying level as a service dependency directed acyclic graph (DAG), mathematically denoted as G=(V,E).
[0132] Since the node set V is the set of atomic service interfaces, each node is labeled with its corresponding service type, calling endpoint, request method, input data structure characteristics and output data structure characteristics, and the directed edge set E is used to represent the service call dependency relationship and data flow path, each directed edge has a set of data mapping relationships.
[0133] After obtaining the topology data, a depth-first search algorithm is first used to verify unidirectional dependencies, and node access states are used to detect circular dependencies. Once a closed loop is found, the process is immediately terminated, and a structure verification error is returned. After successful verification, topology sorting is performed, which involves using in-degree statistics and a zero-in-degree queue to remove nodes with an in-degree of zero one by one and adjust the in-degree of adjacent nodes accordingly. This yields a node execution sequence that conforms to the preceding dependencies, and also provides a timing benchmark for cross-system service calls.
[0134] Based on the topological sorting results, the system extracts the input data structure features of the first node and the output data structure features of the last node, and merges them into the request parameter definition and response payload definition of the aggregation interface, respectively; if there are multiple parallel first or last nodes, the corresponding fields are subjected to field-level union operation.
[0135] When constructing the execution logic, the system resolves field conflicts when multiple input edges point to the same field of the same input data structure feature and the source values are inconsistent: it first checks whether the directed edges carry a preset priority mark. If they do, it forces the adoption of the source field value provided by the marked edge. If none of them are marked, it retains the value corresponding to the first edge reached according to the topology sorting result and records the field overwrite event in the running log.
[0136] Since topology verification, temporal sorting, and field resolution have been completed, the system can assemble the application interface code for service calls, thereby directly obtaining the interface definition document and an executable orchestration script. More importantly, the orchestration script arranges service call instructions in topology order, automatically injects conflict-resolved field mapping parameters before each call, and automatically adds status verification and exception handling logic after the call.
[0137] Taking the collaborative scenario of human resources and engineering monitoring as an example, the user orchestrates a service flow containing two parallel nodes: "engineering progress query" and "team skill matching". After system parsing, it verifies that there are no cycles and determines that the two nodes can be executed in parallel through topology sorting. Then, they converge to the "human efficiency calculation" node. If both parallel nodes are mapped to the same weight parameter of the calculation node and no priority flag is set, the system retains the value corresponding to the first edge that arrives according to the result of topology sorting, ignores the mapping requests of subsequent nodes, and finally outputs the complete application interface code and delivers it to the scheduling module for execution.
[0138] Furthermore, the present invention also provides an intelligent dialogue processing device that integrates LLM and RPA, wherein each functional unit is implemented collaboratively through software instructions, hardware circuits, or a combination of both.
[0139] The feature construction unit is used to receive multimodal user input, perform text normalization processing, and construct input feature vectors based on the current round text, multi-round dialogue history context, and user permission information.
[0140] The semantic parsing unit is used to perform intent recognition and slot extraction operations based on the input feature vector, and outputs intent confidence and slot data dictionary;
[0141] The joint reasoning unit is used to perform vector database knowledge retrieval and call a pre-trained language model to generate candidate responses when the intent confidence is greater than a first threshold.
[0142] The confidence assessment unit is used to integrate the similarity score of knowledge retrieval with the word generation probability score output by the language model to calculate the joint confidence score.
[0143] The state coordination and scheduling unit is used to update the stage identifier of the dialogue state machine to a suspended state and output a guided interaction instruction when the joint confidence is less than the second threshold, and to issue a task scheduling instruction to the robot process automation scheduling module to drive the execution sequence of automated tasks only when the joint confidence is greater than or equal to the second threshold.
[0144] Since the functional units interact with each other through memory sharing, message queues, or standard interfaces, and their collaboration process is exactly the same as the steps of the method described, those skilled in the art can implement each unit as a microservice, a containerized module, or a monolithic application according to the actual deployment needs.
[0145] The present invention also provides an intelligent dialogue processing system that integrates LLM and RPA, the hardware architecture of which includes: at least one processor, volatile and non-volatile memory, a network interface supporting multi-protocol communication, and a database cluster for persistent storage.
[0146] The processor is used to execute a computer program stored in the memory. The program includes a sequence of instructions such as input preprocessing, intent recognition, pre-trained language model inference, confidence assessment, state machine control, and automated task scheduling. Its execution process implements the aforementioned steps.
[0147] In addition to storing program code, the memory is also used to cache session state, feature vectors, and intermediate calculation results to support low-latency multi-turn dialogue processing.
[0148] The database includes a collaborative deployment of vector databases and relational databases:
[0149] Vector databases are used to store vector knowledge data containing business rules and document fragments, and support approximate nearest neighbor retrieval based on similarity metrics; relational databases are used to store multi-turn dialogue history logs and task execution status records for robot process automation.
[0150] The two are linked by a unique session identifier or task identifier, supporting cross-database joint queries and data consistency maintenance.
[0151] Since the communication interface needs to receive natural language input data sent by external access terminals, when its measured joint confidence level is greater than or equal to the second threshold, it sends a task scheduling instruction with a data version verification mark to the external heterogeneous business system. The communication protocol used conforms to the standard and has its own identity authentication and encryption channel.
[0152] The present invention also provides a computer-readable storage medium, including but not limited to: read-only memory, programmable read-only memory, erasable programmable read-only memory, flash memory, solid-state drive, optical disk or magnetic tape, etc.
[0153] The storage medium stores a computer program, which, when executed by the processor, implements the above-mentioned method. When the program is loaded and executed by the processor, the processor sequentially performs operations such as natural language input acquisition, input feature vector construction, intent recognition and slot extraction, knowledge retrieval and pre-trained language model inference, joint confidence calculation, dialogue state machine control, and automated task scheduling, thereby completing intelligent dialogue processing that integrates pre-trained language models and robotic process automation.
[0154] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent dialogue processing integrating LLM and RPA, characterized in that, include: Acquire natural language input data and generate input feature vectors; Based on the input feature vector, perform intent recognition and slot extraction operations to obtain intent confidence and slot data dictionary; When the intent confidence is greater than the intent confidence threshold, a knowledge fragment retrieval is performed in the vector database, and the retrieved document fragments and the input feature vector are input into the pre-trained language model to generate candidate responses; The joint confidence score is calculated by integrating the similarity score from knowledge retrieval with the word generation probability score output by the language model. If the joint confidence level is less than the execution threshold, the stage identifier of the dialogue state machine is updated to the suspended state, and a guiding interaction instruction for requesting supplementary information is output. A task scheduling instruction to drive the execution sequence of automated tasks is issued to the robotic process automation scheduling module only when the joint confidence level is greater than or equal to the execution threshold. The step of updating the stage identifier of the dialogue state machine to a suspended state and outputting a guided interaction instruction for requesting supplementary information includes: obtaining the interaction round count value recorded in the dialogue state machine; if the interaction round count value is less than a preset round threshold, updating the stage identifier of the dialogue state machine to a suspended state, maintaining the input feature vector and the slot data dictionary in the local session cache, and outputting the guided interaction instruction to pause the processing of the downstream automated execution queue; The method further includes: scanning and extracting abnormal session records in the log storage layer where the joint confidence score is less than the execution threshold or the user feedback score is less than a preset score threshold; extracting the input text data from the abnormal session records and performing clustering operations; when the frequency of occurrence of the same cluster is greater than a frequency threshold, generating candidate knowledge entries and updating their status to pending review; after receiving an approval instruction for the candidate knowledge entries, converting the text of the candidate knowledge entries into vector representations and storing them in the vector database, while simultaneously sending data update instructions to the corresponding retrieval nodes.
2. The intelligent dialogue processing method integrating LLM and RPA according to claim 1, characterized in that, The step of acquiring natural language input data and generating an input feature vector includes: acquiring the user's natural language input data and concatenating it with multi-turn dialogue history context features and user permission features to generate the input feature vector; After performing the intent recognition and slot extraction operations to obtain the intent confidence and slot data dictionary, the method further includes: if the intent confidence is less than the intent confidence threshold, skipping the inference step of the pre-trained language model, updating the stage identifier to the information to be supplemented state, and dynamically generating the guidance interaction instruction based on the missing slot information and feeding it back to the user terminal.
3. The intelligent dialogue processing method integrating LLM and RPA according to claim 2, characterized in that, The joint confidence score is calculated by combining the similarity score from the fusion knowledge retrieval with the word generation probability score output by the language model, including: The average cosine similarity value of the retrieved document fragments is obtained as the similarity score; The average log probability of the first preset number of lexical units generated by the pre-trained language model is obtained as the lexical unit generation probability score. The similarity score and the word generation probability score are weighted and summed according to the preset first and second weight coefficients to obtain the joint confidence score.
4. The intelligent dialogue processing method integrating LLM and RPA according to claim 1, characterized in that, The step of updating the stage identifier of the dialogue state machine to the suspended state and outputting a guided interaction instruction for requesting supplementary information also includes: If the interaction round count is greater than or equal to the preset round threshold, the stage identifier is updated to manual processing status, the context state data of the current session is serialized into a structured data packet, and the data packet is transmitted to the exception handling queue.
5. The intelligent dialogue processing method integrating LLM and RPA according to claim 1, characterized in that, The task scheduling instruction issued to the robotic process automation scheduling module to drive the execution sequence of automated tasks includes: The robot process automation scheduling module is issued a task scheduling instruction carrying a data version verification mark. Multiple task execution units are created based on the execution logic sequence corresponding to the target intent, and the status flag of each task execution unit is initialized to the pending execution state. When any of the task execution units experiences a communication response timeout or interface abnormality during execution, the status flag of that unit is updated to retry status, and the original task scheduling instruction is retained in the temporary storage area. Based on a preset incremental delay strategy, the execution call is re-initiated after waiting for the target time interval. If the execution still fails when the accumulated number of retries reaches the maximum threshold, the execution of subsequent related tasks is terminated to maintain cross-system data consistency.
6. The intelligent dialogue processing method integrating LLM and RPA according to claim 1, characterized in that, The automated task execution sequence involves cross-system data interaction, and the method further includes: Obtain the topology data of the service call process, verify the one-way dependency attribute of the topology data, and sort its nodes in the topology to determine the execution order of cross-system service calls; The input data structure features of the first node and the output data structure features of the last node are merged, and field conflict resolution is performed based on the data mapping relationship carried by the directed edges between nodes. The field conflict resolution operation includes: when multiple input edges point to the same field of the same input data structure feature and the source field values are inconsistent, the value provided by the edge carrying a preset priority mark is adopted first; if the preset priority mark does not exist, the value corresponding to the first edge reached is retained according to the result of the topology sorting, so as to automatically generate application interface code for service calls.
7. An intelligent dialogue processing device integrating LLM and RPA, characterized in that, include: The feature construction unit is used to acquire natural language input data and generate input feature vectors; The semantic parsing unit is used to perform intent recognition and slot extraction operations based on the input feature vector to obtain intent confidence and slot data dictionary; The joint reasoning unit is used to perform knowledge retrieval in the vector database and call the large language model to generate candidate responses when the intent confidence is greater than the intent confidence threshold. The confidence assessment unit is used to integrate the similarity score of knowledge retrieval with the word generation probability score output by the language model to calculate the joint confidence score. The state coordination and scheduling unit is used to update the stage identifier of the dialogue state machine to a suspended state and output a guided interaction instruction when the joint confidence is less than the execution threshold; and to issue a task scheduling instruction to the robot process automation scheduling module to drive the execution sequence of automated tasks only when the joint confidence is greater than or equal to the execution threshold. Specifically, updating the stage identifier of the dialogue state machine to a suspended state and outputting a guided interaction instruction for requesting supplementary information involves obtaining the interaction round count value recorded in the dialogue state machine; if the interaction round count value is less than a preset round threshold, the operation of updating the stage identifier of the dialogue state machine to a suspended state involves maintaining the input feature vector and the slot data dictionary in the local session cache and outputting the guided interaction instruction to pause the processing of the downstream automated execution queue. The device is also used to scan and extract abnormal session records in the log storage layer where the joint confidence level is less than the execution threshold or the user feedback score is less than a preset score threshold; extract the input text data in the abnormal session records and perform clustering operations; when the frequency of occurrence of the same cluster is greater than the frequency threshold, generate candidate knowledge entries and update their status to pending review; after receiving the approval instruction for the candidate knowledge entries, convert the text of the candidate knowledge entries into vector representations and store them in the vector database, and simultaneously send data update instructions to the corresponding retrieval nodes.
8. An intelligent dialogue processing system integrating LLM and RPA, characterized in that, include: Processor, memory, communication interface, and database; The memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-6; The database is used to store vector knowledge data containing business rules and document fragments, multi-turn dialogue history logs, and task execution status records of robot process automation. The communication interface is used to receive natural language input data sent by an external access terminal, and when the joint confidence level is greater than or equal to the execution threshold, to send a task scheduling instruction carrying a data version verification mark to the external heterogeneous business system.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the intelligent dialogue processing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Electric power work order intelligent processing method with RPA fused with multi-mode large model
CN120563072A
Call automation process control method and system based on large model intention recognition
CN122067513A