Patient complaint flow processing method and system based on multi-agent cooperation
Patent Information
- Application Number
- CN202610843142.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-09-18
AI Technical Summary
[0008]本发明提供基于多智能体协同的患者诉求流处理方法及系统,通过构建多维特征向量化招标、基于双曲空间与槽位就绪度的智能体动态竞价、有向无环图任务链路自动生成以及基于图谱安全红线的全局冲突消解机制,旨在解决复杂混合多意图医疗诉求处理中存在的中心化任务调度极易过载失准、分布式节点跨专业协同缺乏可靠的上下文隔离与传递机制、以及多源局部诊疗建议直接融合极易产生药物拮抗或医学禁忌等安全隐患等问题
1.本发明提出的处理方法构建了一种去中心化的多智能体协同与竞价机制。在处理患者复杂、长尾且混合多重意图的医疗诉求时,能够实现系统的动态解耦与高并发响应,显著提升了医疗诉求的处理效率与资源分配的合理性,并保障输出方案的医学安全性。
Smart Images

Figure CN122779080A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical artificial intelligence technology, and specifically relates to a method and system for processing patient request flow based on multi-agent collaboration. Background Technology
[0002] With the rapid development of artificial intelligence technology, the application of Large Language Model (LLM) and multi-agent collaborative technology in the field of healthcare is becoming increasingly widespread. Patients' daily medical needs often exhibit multi-dimensional, long-tailed, and high-concurrency characteristics. For example, in a single long text or voice input, a patient may simultaneously include multiple overlapping intentions such as inquiring about pathological mechanisms, consulting about dietary restrictions, and checking medical insurance policies.
[0003] Existing multi-agent medical consultation systems typically employ centralized routing and distribution mechanisms. For example, Chinese invention patent application CN121528472A discloses a medical business system processing method based on multi-agent collaboration. This method involves a task analysis agent receiving requests and generating standardized descriptions, followed by a routing and scheduling agent decomposing the tasks and directly assigning them to the corresponding business execution agents. In this method, the task analysis agent receives medical business requests, uses a large language model to parse user intent, and generates standardized task descriptions. The routing and scheduling agent decomposes the tasks according to task type and business rules and assigns them to the corresponding business execution agents. Multiple business execution agents process their respective sub-tasks in parallel, calling the corresponding medical information system interfaces to complete specific business operations. The result aggregation agent collects the processing results from each execution agent and integrates them to generate the final business response.
[0004] However, such top-down, strongly controlled scheduling architectures rely heavily on the omniscient capabilities of the central scheduling node, making it difficult to dynamically perceive the real-time processing capabilities and tool readiness status of the underlying vertical intelligent agents. When dealing with complex cross-domain intentions, they are prone to task assignment errors or system overload.
[0005] On the other hand, to address the time-series scheduling problem of complex tasks, some existing technologies have introduced task dependency graphs. For example, Chinese invention patent application CN121812046A discloses a medical data processing system based on dynamic knowledge graphs and multi-agent collaboration, which uses a central scheduling engine to construct a directed acyclic graph for task scheduling among multiple agents. The specific method involves: a central scheduling engine and multiple agents; the central scheduling engine receives user requests; it decomposes requests into tasks through semantic parsing and constructs a directed acyclic graph to schedule tasks among the agents; an image analysis agent generates corresponding test indicator data based on medical test report images using a cross-modal fusion model; a structured data analysis agent updates the medical knowledge graph based on the test indicator data; and it performs reasoning on the test indicator data using a thought chain approach to obtain analysis results.
[0006] However, after the agents have completed their parallel or serial execution, such methods often only perform simple text splicing or summarizing of local results, lacking the ability to verify conflicts at a deep semantic level. In serious medical scenarios, if the dietary advice given by the nutrition agent and the prescription issued by the medical agent have potential antagonistic or contraindications in terms of medical knowledge, traditional summarization mechanisms cannot identify and intercept such high-risk logical conflicts.
[0007] Therefore, how to break through the bottleneck of traditional centralized task assignment, achieve precise dynamic capability matching among various professional medical intelligent agents, and ensure the medical safety of the global output solution in the process of multi-intent collaborative processing is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0008] This invention provides a method and system for processing patient requests based on multi-agent collaboration. By constructing multi-dimensional feature vectorized bidding, agent dynamic bidding based on hyperbolic space and slot readiness, automatic generation of directed acyclic graph task links, and a global conflict resolution mechanism based on graph security red lines, it aims to solve problems in the processing of complex mixed multi-intent medical requests, such as centralized task scheduling being prone to overload and inaccuracy, distributed node cross-professional collaboration lacking reliable context isolation and transmission mechanisms, and the direct fusion of multi-source local diagnosis and treatment suggestions being prone to drug antagonism or medical contraindications.
[0009] To address the aforementioned technical problems, this invention proposes a method for processing patient request flow based on multi-agent collaboration, comprising the following steps: The system receives the patient's original request and generates a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition. The feature vector is used as a bidding task and broadcast to a collaborative network containing multiple agents; Each agent calculates its bidding score based on the similarity of its local knowledge base, tool confidence, and current load, and submits a bidding response vector to the orchestration engine. The orchestration engine selects target agent combinations based on global bidding scores and generates task flow links in a directed acyclic graph format for distribution based on the temporal dependencies between intents. The system acquires the local results output by each target agent along the link, performs security red line verification and global conflict resolution based on the medical knowledge graph, and then merges them to generate the final collaborative response.
[0010] Preferably, the multidimensional feature vectors are processed based on a natural language understanding model to generate a set of feature vectors as multidimensional feature vectors; the set of feature vectors includes: A semantic feature vector representing the overall textual information of the request; An intention probability distribution vector representing the category of potential appeal; The extracted standardized medical entity vectors include disease codes or drug names mapped to a standard medical terminology set; The urgency level weight parameters are generated based on a preset urgency value knowledge base.
[0011] Preferably, the bidding scores of each agent are calculated using the following method: After receiving the bidding task, agent i calculates the bidding score. :
[0012] In the formula, Characteristic vector representing the demand Centroid of the local domain knowledge base of agent i Similarity; The skill confidence of agent i in response to this request; The expected processing latency and current computing load for agent i; These are the preset weighting coefficients.
[0013] Preferably, the similarity is calculated as follows: The feature vectors and the centroids of the local domain knowledge base are mapped to the Poincaré hyperbolic space through a manifold to generate hyperbolic vectors containing hierarchical relationships and semantic depth of medical entities. The geodesic distance between the hyperbolic vectors is calculated, and the semantic similarity of the hyperbolic space is determined based on the geodesic distance. Construct a local relational subgraph based on the original requirements, and perform a topological comparison between the local relational subgraph and the domain knowledge graph subgraph maintained locally by the agent to calculate the maximum number of edges in the maximum common subgraph between the two. The ratio of the number of edges in the maximum common subgraph to the maximum number of edges in the two subgraphs is used as the topological isomorphism density to characterize the degree of matching between the appeal logic and the rules of medical knowledge. Using a preset fusion weight threshold, the semantic similarity of the hyperbolic space and the topological isomorphism density are weighted and fused together to obtain the similarity between the appeal feature vector and the centroid of the agent's local domain knowledge base.
[0014] Preferably, the method for calculating the skill confidence level is as follows: Traverse the candidate tools in the agent's local toolset; For any candidate tool, calculate the number of intersections between the set of medical entities extracted from the original request and the set of input parameter slots required for the successful execution of the candidate tool, and use the ratio of the number of intersections to the total number of input parameter slots as the parameter slot readiness. The basic tool matching degree is obtained by weighting and summing the parameter slot readiness degree with the corresponding candidate tool's execution success rate decay weight within a preset historical period. Based on the relative entropy algorithm, the divergence of intent distribution between the current appeal's intent probability distribution and the standard intent distribution applicable to the corresponding candidate tool is calculated, and an exponential decay penalty term is generated based on the intent distribution divergence. Multiply the basic tool matching degree by the exponential decay penalty term to obtain the individual confidence degree of the corresponding candidate tool; Extract the maximum value among the individual confidence scores of all candidate tools, and use it as the skill confidence score of the agent for the claim.
[0015] Preferably, the weighting coefficient is a dynamically adjustable parameter, and the adjustment method is as follows: The orchestration engine dynamically adjusts the weight coefficients based on the urgency weights in the feature vectors; when the urgency weight exceeds a preset urgency threshold, the expected processing delay weight is increased. The proportion of similarity was reduced. The proportion of [agents] is used to prioritize the selection of agents with fast response times and low load.
[0016] Preferably, the step of dynamically generating a directed acyclic graph (DAG) format task flow links for distribution based on the temporal dependencies between intents specifically includes: If there is no temporal or logical relationship between the requests and intentions of each target agent, the orchestration engine will distribute the tasks to each target agent in parallel. If there is a causal or temporal relationship between the requests and intentions of each target agent, the orchestration engine maps the intentions to nodes in a directed acyclic graph, generates directed edges containing the execution order, and distributes the tasks to the corresponding agents according to the topological sorting of the directed acyclic graph; wherein, the output of the preceding agent is passed to the following agent as a context parameter.
[0017] Preferably, the output of the preceding agent is passed to the following agent as a context parameter, specifically: Create a dynamic storage area in the orchestration engine's memory space that is bound to the current patient's needs; After completing its own task, the front-end intelligent agent encapsulates the local results in a structured manner, extracts the entity list, attribute key-value pairs and conclusion confidence, and writes them into the dynamic storage area after attaching the context version number. Before starting execution, the post-processor uses an attention mechanism model to extract weighted features from the historical write records in the dynamic storage area, filters out redundant information that is irrelevant to its own task, and generates prompt word context to guide the execution of the local task.
[0018] Preferably, the execution of security red line verification and global conflict resolution based on medical knowledge graph specifically includes: Extract the suggested entities from the local results output by each target agent; In the medical knowledge graph, query the relationship edges between the suggested entities. If there are relationship edges represented as taboo or antagonistic between suggested entities output by different agents, then a global logical conflict is determined to have occurred. When a global logical conflict occurs, the orchestration engine, based on the preset medical safety priorities of the agents, uses the local results of the high-priority agents to overwrite the local results of the low-priority agents, or sends the conflict node information back to the high-priority agents for secondary verification and reconstruction.
[0019] A second aspect of the present invention also proposes a patient request flow processing system based on multi-agent collaboration, the system being used to implement the method as described in the first aspect of the present invention, comprising: The feature extraction module is used to receive the patient's original request and generate a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition. The task broadcasting module is used to broadcast the feature vector as a bidding task to a collaborative network containing multiple agents. The agent bidding module is deployed in each agent of the collaborative network. It is used to calculate the bidding score based on the similarity of the local knowledge base, the tool confidence and the current load, and submit the bidding response vector to the orchestration engine. The orchestration and distribution module, deployed in the orchestration engine, is used to select target agent combinations based on global bidding scores and generate task flow links in a directed acyclic graph format for distribution based on the temporal dependencies between intents. The conflict resolution and fusion module is used to obtain the local results output by each target agent according to the link, perform security red line verification and global conflict resolution based on medical knowledge graph, and fuse them to generate the final collaborative response.
[0020] Compared with the prior art, the present invention has the following technical effects: 1. The processing method proposed in this invention constructs a decentralized multi-agent collaboration and bidding mechanism. When dealing with complex, long-tailed, and mixed multi-intent medical requests from patients, it can achieve dynamic decoupling and high-concurrency response of the system, significantly improving the processing efficiency of medical requests and the rationality of resource allocation, while ensuring the medical safety of the output solution.
[0021] 2. The processing method proposed in this invention transforms unstructured, colloquial original requests into multi-dimensional feature vectors containing semantics, intent distribution, standardized entities, and urgency weights. This effectively eliminates cognitive ambiguity caused by patients' natural language expressions, provides a high-precision structured input basis for subsequent quantitative bidding, and ensures that high-risk and urgent requests can obtain priority scheduling weights.
[0022] 3. In the processing method proposed in this invention, when each agent bids, the Poincaré hyperbolic space metric and topological isomorphism density are used to calculate knowledge similarity, which can restore the tree-like hierarchical relationship of medical entities with high fidelity and avoid semantic loss caused by conventional dimensionality reduction. At the same time, the confidence of the tool is dynamically evaluated by combining the parameter slot readiness degree and the relative entropy intention divergence, ensuring that the task is accurately distributed to the optimal agent node.
[0023] 4. The processing method proposed in this invention dynamically generates a directed acyclic graph, which can adapt to the causal and temporal dependencies between cross-intents, achieving efficient parallelism of unrelated tasks and ordered serialization of strongly related tasks. Furthermore, by combining a dynamic storage area with an attention mechanism model, the context parameters are passed between nodes without losing key data and filtering redundant information, effectively avoiding the illusion caused by information overload in downstream large language models.
[0024] 5. The processing method proposed in this invention introduces deterministic relation edge verification based on medical knowledge graph at the end of the link, supplemented by a strict intelligent agent medical safety priority coverage mechanism, which can accurately identify and intercept medical logic conflicts generated by intelligent agents in multiple vertical domains when seeking local optimization, and eliminate drug interactions and other drug and physiological safety hazards. Attached Figure Description
[0025] Figure 1This is a flowchart illustrating the processing method described in this invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present application and with reference to the accompanying drawings.
[0027] Example 1 This embodiment describes a method for processing patient request flow based on multi-agent collaboration, such as... Figure 1 As shown, it includes the following steps one through five: Step 1: Receive the patient's original request, and generate a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition.
[0028] In real-world healthcare scenarios, patient input often consists of unstructured long texts or audio messages containing numerous colloquial expressions and complex logic. First, the raw data is acquired through a multimodal access layer; if it is an audio signal, it is converted into text using an automatic speech recognition engine. Subsequently, the multidimensional feature vectors are processed based on a natural language understanding model to generate a feature vector set. As multidimensional feature vectors; the set of feature vectors includes: Semantic feature vectors representing global textual information The algorithm encodes and reduces the dimensionality of long texts by calling a pre-trained large-scale language model in the medical field, extracting deep global semantic features and outputting a dense vector of fixed dimensions. This feature vector is used in subsequent calculations to evaluate the similarity between the current request and the centroids of each agent's local knowledge base.
[0029] Intent probability distribution vector representing the category of potential appeal Since a patient's single input often mixes multiple demands, this embodiment uses a multi-label classifier to decouple the intent from the original text. The classifier outputs a vector matrix representing the probability score of the input text corresponding to each preset medical intent category, thereby transforming vague subjective demands into quantitative indicators that can be used by the intelligent agent for bidding and matching.
[0030] Extracted standardized medical entity vector The standardized medical entities include disease codes or drug names mapped to a standard medical terminology set. To eliminate systemic cognitive ambiguity caused by patients' colloquial expressions, this embodiment uses named entity recognition technology to extract proper nouns such as symptoms, drugs, and test indicators from the text, and performs forced normalization processing in combination with a local medical thesaurus. The extracted entities are then mapped to international disease classification codes or anatomical, therapeutic, and chemical classification systems to form a structured and standardized set of entities, providing accurate parameter slot inputs for subsequent intelligent agents to call APIs.
[0031] Urgency level weight parameters generated based on a pre-set urgency value knowledge base The system internally maintains a critical value knowledge base containing high-risk medical symptoms and extreme emotional polarity characteristics. During the entity recognition and sentiment analysis stages, once a match is found to be one of these high-risk characteristics, the system is boosted according to a preset weight gradient. The value of this weight parameter, as a key adjustment factor, will directly determine the weight of response time calculation in subsequent bidding stages, ensuring that critical and severe cases are prioritized for distribution to agents with high response efficiency.
[0032] To make the generation process of the aforementioned multidimensional feature vectors clearer to those skilled in the art, a specific application example is provided below. Suppose we receive an initial request from a cancer patient: "I'm currently taking paclitaxel, and I feel nauseous and can't eat. Can I eat some grapefruit? Also, can the imported anti-nausea medication prescribed by my doctor be reimbursed by medical insurance?" After the processing in step one of this embodiment: The corresponding global semantic feature vector ; Intent decoupling generates an intent probability distribution vector. For: {Adverse reaction management: 0.95, dietary restrictions: 0.92, medical insurance policy consultation: 0.88}; Medical entity vectors are generated through entity recognition and standardized mapping. Including: [paclitaxel (ATC code: L01CD01), nausea / vomiting (ICD-10 code: R11.2), grapefruit (a specific dietary entity), antiemetics (ATC code: A04)]; Based on the critical value matching, the system determined that nausea and loss of appetite are common adverse reactions to chemotherapy. While not yet meeting the severe case threshold, considering the vulnerability of cancer patients, it was assigned a moderate urgency weight. .
[0033] Finally, the feature parameters of the above four dimensions are fused and packaged into a unified multidimensional feature vector. This completes the bidding process and is then transferred to subsequent steps.
[0034] Step 2: Broadcast the feature vector as a bidding task to a collaborative network containing multiple agents.
[0035] To overcome the limitations of traditional single agents or centralized routing in handling complex tasks and the risk of single points of failure, this embodiment adopts a decentralized publish-subscribe architecture or event bus mechanism to build a multi-agent collaborative network.
[0036] Before broadcasting, the system (or orchestration engine) first processes the feature vector set generated in step one. Standardize task encapsulation. The encapsulation includes not only the multidimensional feature vector itself, but also a globally unique task tracking identifier (Task ID), a timestamp, and a weight based on the urgency level (…). The bidding deadline is dynamically calculated. The more urgent the request, the shorter the bidding deadline, thus forcing agents in the network to respond quickly.
[0037] After encapsulation, the feature vectors are used as bidding tasks and broadcast indiscriminately to a collaborative network of multiple vertical domain agents via a message broker (typically Kafka or RabbitMQ). The collaborative network deploys multiple heterogeneous specialized agents, such as a medical agent carrying a disease database and medication guidelines, a nutrition agent carrying a nutritional composition table and metabolic model, and a payment risk control agent carrying a medical insurance catalog and settlement rules. These agents, acting as subscribers, continuously listen to the bidding bus. Once they receive a broadcast bidding task, they immediately trigger local parallel feature matching and capability assessment processes, thereby delegating task allocation decisions to each agent and achieving high scalability and decoupling of the system architecture.
[0038] Continuing from the cancer patient consultation scenario in Step 1 (including three potential intentions: adverse reactions to paclitaxel chemotherapy, dietary restrictions related to grapefruit, and medical insurance reimbursement for antiemetics, with varying degrees of urgency), ).
[0039] In the specific execution of this step: The orchestration engine will generate the content from step one. , , and Multidimensional feature vectors Package it into a bidding task package, generate a global task number "Task_10024", and classify it according to medium urgency. The bidding deadline for this task is set to 600 milliseconds (meaning each agent must decide whether to bid and submit a bid within 600ms).
[0040] The "Task_10024" tender package is submitted to the global message bus of the multi-agent cooperative network.
[0041] At this point, medical agents, nutritional agents, payment and risk control agents, and even psychological counseling agents that are idle or available simultaneously listen to the bidding task on the bus and download it to their respective local memory, preparing to enter the next stage of bidding evaluation (i.e., assessing whether their own capabilities are sufficient to address nausea / vomiting medication, contraindications of grapefruit and paclitaxel, or medical insurance catalog searches). Through this broadcast mechanism, even if a traditional Chinese medicine conditioning agent is added to the system in the future, there is no need to modify the orchestration engine code. The new agent only needs to connect to the bus to seamlessly participate in the bidding, fully demonstrating the scalability advantage of this embodiment.
[0042] Step 3: Each agent calculates its bidding score based on the similarity of its local knowledge base, tool confidence, and current load, and submits its bidding response vector to the orchestration engine.
[0043] After listening to the broadcast bidding task, each intelligent agent in the collaborative network does not passively accept the assignment, but conducts a multi-dimensional quantitative self-assessment and bidding based on its own professional knowledge, the availability of tools, and the current computing power.
[0044] The bidding scores of each agent are calculated using the following method: After receiving the bidding task, agent i calculates the bidding score. :
[0045] In the formula, Characteristic vector representing the demand Centroid of the local domain knowledge base of agent i Similarity; The skill confidence of agent i in response to this request; The expected processing latency and current computing load for agent i; These are the preset weighting coefficients.
[0046] Because medical knowledge naturally possesses a strong hierarchical tree structure, traditional Euclidean cosine similarity can easily lose structured information such as hierarchical levels. Therefore, this embodiment introduces a Poincaré hyperbolic space and topological graph isomorphism metric.
[0047] The similarity is calculated as follows: The feature vectors and the centroids of the local domain knowledge base are mapped onto a Poincaré hyperbolic space via a manifold to generate hyperbolic vectors containing hierarchical relationships and semantic depth of medical entities. The geodesic distance between these hyperbolic vectors is calculated, and the semantic similarity of the hyperbolic space is determined based on this distance. The capacity of the hyperbolic space grows exponentially with its radius, enabling high-fidelity reconstruction of distances between hierarchical medical concepts such as tumor-gastrointestinal tumor-gastric cancer. A local relational subgraph is constructed based on the original request, and a topological comparison is performed between this subgraph and the domain knowledge graph subgraph maintained locally by the agent. The number of edges in the maximum common subgraph between the two is calculated. The ratio of the number of edges in the maximum common subgraph to the maximum number of edges in the two subgraphs is used as the topological isomorphism density, representing the degree of matching between the request logic and medical knowledge rules. Using a preset fusion weight threshold, the semantic similarity of the hyperbolic space and the topological isomorphism density are weighted and summed to obtain the similarity between the request feature vectors and the centroids of the agent's local domain knowledge base.
[0048] Specifically, the similarity of the knowledge base is defined as a weighted fusion of hyperbolic semantic distance and topological isomorphism density:
[0049] Among them, hyperbolic space distance The calculation formula is:
[0050] In the formula, Indicates the similarity of knowledge bases; and The first method maps the demand feature vector and the centroid of the agent's local knowledge graph to a hyperbolic vector representation in the Poincaré hyperbolic space through a Riemannian manifold; Let be the geodesic distance in hyperbolic space, which contains the inverse hyperbolic cosine function. And Euclidean norm calculation, since the capacity of hyperbolic space increases exponentially with radius, this distance can faithfully reproduce the hierarchical relationship and semantic depth of medical entities; This is a local relational subgraph dynamically constructed based on the original requirements; A domain knowledge graph subgraph maintained locally for agent i; The maximum common subgraph edge count between two graphs is used to measure the structural matching degree between the appeal logic and the rules of medical knowledge. To balance the fusion weight threshold between semantic mapping and graph topology.
[0051] Skill confidence is used to measure whether the information provided by the current patient meets the prerequisites for calling a specific API or tool. In this embodiment, the skill confidence is calculated as follows: The agent iterates through the candidate tools in its local toolset. For any candidate tool, it calculates the number of intersections between the set of medical entities extracted from the original request and the set of input parameter slots required for successful execution of the candidate tool. The ratio of this intersection number to the total number of input parameter slots is used as the parameter slot readiness level. A higher slot readiness level means the agent can directly process the task without initiating a second follow-up question to the patient. The parameter slot readiness level is weighted and summed with the execution success rate decay weight of the corresponding candidate tool within a preset historical period to obtain the basic tool matching degree. To prevent tools from being misused in irrelevant scenarios, the agent further calculates the intent distribution divergence between the intent probability distribution of the current request and the standard intent distribution applicable to the corresponding candidate tool based on the relative entropy algorithm, and generates an exponential decay penalty term based on the intent distribution divergence. Finally, the basic tool matching degree is multiplied by the exponential decay penalty term to obtain the individual confidence level of the corresponding candidate tool. The maximum value among the individual confidence levels of all candidate tools is extracted as the agent's skill confidence level for the request.
[0052] Specifically, agent i evaluates the local toolset based on the current demand feature vector. The execution confidence of each available tool t is used, and the maximum value is taken as the overall skill confidence. The calculation formula is as follows:
[0053] In the formula, t represents the local toolset of agent i. Candidate tools include medical insurance interface call APIs; It is a set of medical entities extracted from the patient's original demands; This refers to the set of input parameter slots required for the successful execution of the candidate tool t, such as the disease code and drug name required for executing a medical insurance query; ratio. The readiness of the parameter slots reflects the ability of the tool to be directly driven by current demands; The success rate decay weight of candidate tool t within a preset historical period; The divergence of the intention distribution is calculated based on relative entropy; Let be the probability distribution vector of the current demand's intent. The standard intent distribution matrix that candidate tool t is good at processing; This is the preset linear adjustment coefficient; is the divergence penalty coefficient; exp() represents the exponential decay function with the natural constant as the base, which is used to exponentially penalize and reduce the confidence level when the intention of the appeal deviates too much from the scope of application of the tool.
[0054] In another embodiment of the invention, regarding the method for calculating skill confidence, The skill confidence of agent i in response to the request is quantified based on whether there is an available API in its local tool library to solve the intention.
[0055] This embodiment also considers the timeliness requirements in medical emergency scenarios. The weight coefficient is a dynamically adjustable parameter, and the adjustment method is as follows: the orchestration engine dynamically adjusts the weight coefficient according to the urgency weight in the feature vector; when the urgency weight exceeds a preset urgency threshold, the expected processing delay weight is increased. The proportion of similarity was reduced. The proportion of [agents] is used to prioritize agents with fast response times and low workloads. This mechanism is used to ensure [safety] in response to extremely high-risk (high-risk) events such as sudden myocardial infarction and severe trauma. When a request is made, the system would rather distribute the task to a general emergency rescue agent with available computing power than queue up a specialist authority agent that is already under heavy load in pursuit of the ultimate diagnostic depth, thus firmly safeguarding the golden time for life rescue.
[0056] After completing all the above calculations, each agent will calculate its bidding score. The data, along with metadata such as the planned tool identifier and estimated time, is concatenated into a bidding response vector and submitted to the orchestration engine.
[0057] Continuing with the aforementioned scenario of cancer patient consultations (nausea from paclitaxel chemotherapy, grapefruit contraindications, and medical insurance coverage for antiemetics): For the nutritional agent, due to the large number of regular edges in its local graph concerning the interaction between paclitaxel and grapefruit (furanocoumarin), its calculated topological isomorphism density and hyperbolic space semantic similarity are extremely high; therefore, the score of its submitted bidding vector regarding the intent to prohibit dietary restrictions is significant. Ranked among the top.
[0058] For the payment risk control intelligent agent, it includes a local medical insurance catalog query tool. The required parameter slots for this tool are disease classification and drug name. The entity extracted in step one... The data exactly includes nausea / vomiting and antiemetic medications, with a 100% overlap in slots and a slot readiness of 1.0. Furthermore, the current intent distribution has not triggered a relative entropy divergence penalty; therefore, the payment risk control agent reported an extremely high skill confidence level for the medical insurance reimbursement intent. .
[0059] Ultimately, these agents each complete their calculations independently and submit their bidding response vectors to the central orchestration engine.
[0060] Step 4: The orchestration engine selects the target agent combination based on the global bidding score, and generates a directed acyclic graph format task flow link for distribution based on the temporal dependencies between intents.
[0061] In this stage, the orchestration engine acts as both an auctioneer and a scheduling hub. First, for each specific intent decoupled in step one, the orchestration engine selects the agent with the highest bid score from the bidding response vectors submitted by each agent as the target execution node for that intent. The highest bid score indicates the most relevant expertise, the most complete tools, and the fastest response. After selecting the target agent combination, the timing issues of multi-task collaboration must be addressed to avoid logical deadlocks or missing upfront information.
[0062] The dynamic generation and distribution of task flow links in a directed acyclic graph format based on the temporal dependencies between intents specifically includes: If there is no temporal or logical correlation between the intents of the target agents, the orchestration engine will distribute the tasks to the target agents in parallel. This mechanism aims to reduce the overall response latency of the system. For example, if a patient simultaneously inquires about dietary restrictions before a gastroscopy and the location of the outpatient queue, these two intents are completely decoupled in medical logic, and the corresponding nutrition agent and triage agent can be triggered to work in parallel.
[0063] If there is a causal or temporal relationship between the requests and intentions of each target agent, the orchestration engine maps the intentions to nodes in a directed acyclic graph, generates directed edges containing the execution order, and distributes the tasks to the corresponding agents according to the topological sorting of the directed acyclic graph; wherein, the output of the preceding agent is passed to the following agent as a context parameter.
[0064] In real-world business scenarios, many healthcare needs are progressive, such as diagnosis -> prescription -> payment. The orchestration engine, through its built-in healthcare logic dependency resolver, transforms these intentions into a Directed Acyclic Graph (DAG). Topological sorting ensures that subsequent nodes are only activated after all nodes with an in-degree of zero have completed their execution.
[0065] To ensure that cross-agent information transmission neither loses core data nor causes context pollution, this embodiment introduces a low-level mechanism similar to blackboard mode and attention filtering. The output of the preceding agent is passed to the following agent as a context parameter, specifically: A dynamic storage area bound to the current patient's needs is established in the orchestration engine's memory space; this storage area is a one-time session level and is automatically destroyed when the task lifecycle ends, ensuring the physical isolation and memory security of patient privacy data.
[0066] After completing its own task, the front-end agent encapsulates the local results in a structured manner, extracts the entity list, attribute key-value pairs, and conclusion confidence, and writes them into the dynamic storage area after attaching a context version number. Forced structured encapsulation avoids the downstream agent from parsing errors caused by directly transmitting natural language, while the context version number effectively prevents concurrent write conflicts in complex DAG links.
[0067] Before execution, the downstream agent uses an attention mechanism model to extract weighted features from historical write records in the dynamic storage area, filtering out redundant information irrelevant to its own task and generating contextual prompts to guide local task execution. Because the upstream agent might output lengthy text, if the downstream agent accepts it indiscriminately, its local large language model may become distracted or experience illusions. Using the attention mechanism, downstream nodes can precisely focus on the slot data they need.
[0068] Continuing with the aforementioned common concerns of cancer patients: "I'm currently taking paclitaxel, and I feel nauseous and can't eat. I'd like to ask if I can eat some grapefruit? Also, can the imported antinausea medication prescribed by the doctor be reimbursed by medical insurance?" In this step, following the bidding process in step three, the nutrition agent won the bid for the grapefruit dietary contraindication intention; the medical agent won the bid for the paclitaxel-induced nausea medication regimen intention; and the payment risk control agent won the bid for the imported antiemetic drug medical insurance reimbursement intention. The orchestration engine analysis revealed that eating grapefruit is unrelated to medical insurance reimbursement and can be done concurrently; however, the medical agent must first determine which imported antiemetic drug the doctor prescribed before the payment risk control agent can check the drug's medical insurance catalog.
[0069] Therefore, the generated DAG topology is as follows: Branch A (Independent Node): The nutritional agent executes directly to assess the contraindications between paclitaxel and grapefruit.
[0070] Branch B (serial link): Front-end node medical agent -> directed edge -> back-end node payment risk control agent.
[0071] The front-end medical AI agent infers that the imported antiemetic drug the patient refers to is aprepitant, encapsulates it as {"entity category":"drug","entity name":"aprepitant","attribute":"imported","confidence level":0.98,"version number":"V1"}, and writes it to the dynamic storage area. The back-end payment risk control AI agent is then activated. Before starting, it scans the dynamic storage area using an attention mechanism. Since its task is medical insurance query, it automatically filters out redundant information such as grapefruit nutritional components that might be written in branch A of the storage area, accurately extracts the two key-value pairs of aprepitant and "imported", and assembles them into query parameters for the local medical insurance API, thereby completing the AI agent collaboration.
[0072] Step 5: Obtain the local results output by each target agent according to the link, perform security red line verification and global conflict resolution based on medical knowledge graph, and fuse them to generate the final collaborative response.
[0073] While multi-agent distributed processing improves system response efficiency and intent coverage, the limited vision of each vertical domain agent makes it prone to local optima leading to global conflicts. Therefore, this embodiment incorporates a gatekeeper mechanism at the end of the link.
[0074] The execution of security red line verification and global conflict resolution based on medical knowledge graphs specifically includes: First, the orchestration engine aggregates the return data from each node in the aforementioned directed acyclic graph link and uses an entity extraction algorithm to extract suggested entities from the local results output by each target agent. For example, it can structurally extract recommended medicines, dietary ingredients, or exercise methods from large segments of natural language suggestions.
[0075] Next, these entities are mapped to a medical knowledge graph maintained uniformly in the background. The relationship edges between the suggested entities are queried in the medical knowledge graph. If there are relationship edges represented as taboos or antagonisms between suggested entities output by different agents, a global logical conflict is determined. Hard rule verification based on deterministic relationship edges in the knowledge graph can effectively compensate for the occasional medical illusions that arise when large language models generate data based on probability.
[0076] When a global logical conflict occurs, the orchestration engine, based on the preset medical safety priorities of the agents, either uses the local results of the higher-priority agents to overwrite the local results of the lower-priority agents, or sends the conflict node information back to the higher-priority agents for secondary verification and reconstruction. In the system configuration of this embodiment, the medical safety priorities of the agents are typically set as follows: medical agent > nutrition agent > psychological counseling agent > payment risk control agent. This is because, in a medical setting, medication and pathological safety have veto power.
[0077] Finally, the orchestration engine calls the natural language generation model to splice and fuse the multi-source local conclusions that have been verified and resolved through security checks, and combines them with the patient's emotional parameters extracted in step one to generate an empathetic and logically rigorous natural language response to output to the patient.
[0078] Continuing from the previous example of a complex consultation scenario involving a cancer patient (the patient is receiving paclitaxel injections and asks if they can eat grapefruit, and whether imported antinausea medication is reimbursable).
[0079] When dealing with nausea and loss of appetite, and a craving for grapefruit, the nutrition agent (low priority) might suggest grapefruit as a primary food source if its focus is solely on stimulating appetite and supplementing vitamins. The medical agent (high priority), addressing chemotherapy, would output the current diagnosis and medication: "Currently using paclitaxel, supplemented by aprepitant." The payment risk control agent, after calculating medical insurance rules, would output: "Aprepitant is covered by Category B medical insurance in the local area."
[0080] The orchestration engine extracted suggested entities such as grapefruit, paclitaxel, and aprepitant, and performed a graph search on the global medical knowledge graph. The graph search instantly identified a high-risk relationship edge: grapefruit (rich in furanocoumarins) – [inhibits CYP3A4 metabolic enzyme / leads to a dramatic increase in blood drug concentration] – paclitaxel. Based on this, the system determined that the nutritional agent's suggestions had a serious, taboo-level global logical conflict with the patient's current medical condition.
[0081] At this point, the arbitration mechanism is triggered. Since the medical agent has a higher priority than the nutrition agent, the system enforces priority override, intercepts and invalidates the nutrition agent's suggestion of edible grapefruit, and sends the reason for the conflict (CYP3A4 enzyme metabolism conflict) back to the nutrition agent as context for secondary reconstruction. After receiving this, the nutrition agent regenerates the suggestion entity, such as recommending mild liquid foods or apples instead.
[0082] Finally, the orchestration engine integrated and resolved the conclusions, outputting the following final collaborative response: "Hello, nausea during chemotherapy is indeed very difficult, and we fully understand your feelings. Regarding your question, we have provided a comprehensive overview: First, you absolutely cannot eat grapefruit. Grapefruit can severely affect the metabolism of paclitaxel, increasing toxic side effects. We suggest you switch to a mild liquid diet. Second, the imported antinausea medication aprepitant prescribed by your doctor is covered by Class B medical insurance and can be reimbursed according to the prescribed ratio. Please feel free to take care of yourself." Example 2 This embodiment is a patient complaint processing system based on multi-agent collaboration. The system is used to implement the method described in Embodiment 1, including: The feature extraction module is used to receive the patient's original request and generate a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition. The task broadcasting module is used to broadcast the feature vector as a bidding task to a collaborative network containing multiple agents. The agent bidding module is deployed in each agent of the collaborative network. It is used to calculate the bidding score based on the similarity of the local knowledge base, the tool confidence and the current load, and submit the bidding response vector to the orchestration engine. The orchestration and distribution module, deployed in the orchestration engine, is used to select target agent combinations based on global bidding scores and generate task flow links in a directed acyclic graph format for distribution based on the temporal dependencies between intents. The conflict resolution and fusion module is used to obtain the local results output by each target agent according to the link, perform security red line verification and global conflict resolution based on medical knowledge graph, and fuse them to generate the final collaborative response.
[0083] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method for processing patient request flow based on multi-agent collaboration, characterized in that, Includes the following steps: The system receives the patient's original request and generates a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition. The feature vector is used as a bidding task and broadcast to a collaborative network containing multiple agents; Each agent calculates its bidding score based on the similarity of its local knowledge base, tool confidence, and current load, and submits a bidding response vector to the orchestration engine. The orchestration engine selects target agent combinations based on global bidding scores and generates task flow links in a directed acyclic graph format for distribution based on the temporal dependencies between intents. The system acquires the local results output by each target agent along the link, performs security red line verification and global conflict resolution based on the medical knowledge graph, and then merges them to generate the final collaborative response.
2. The method according to claim 1, characterized in that, The multidimensional feature vector is generated by processing the original request based on a natural language understanding model, and a set of feature vectors is generated as the multidimensional feature vector. The feature vector set includes: A semantic feature vector representing the overall textual information of the request; An intention probability distribution vector representing the category of potential appeal; The extracted standardized medical entity vectors include disease codes or drug names mapped to a standard medical terminology set; The urgency level weight parameters are generated based on a preset urgency value knowledge base.
3. The method according to claim 1, characterized in that, The bidding scores of each agent are calculated using the following method: After receiving the bidding task, agent i calculates the bidding score. : In the formula, Characteristic vector representing the demand Centroid of the local domain knowledge base of agent i Similarity; The skill confidence of agent i in response to this request; The expected processing latency and current computing load for agent i; These are the preset weighting coefficients.
4. The method according to claim 3, characterized in that, The similarity is calculated as follows: The feature vectors and the centroids of the local domain knowledge base are mapped to the Poincaré hyperbolic space through a manifold to generate hyperbolic vectors containing hierarchical relationships and semantic depth of medical entities. The geodesic distance between the hyperbolic vectors is calculated, and the semantic similarity of the hyperbolic space is determined based on the geodesic distance. Construct a local relational subgraph based on the original requirements, and perform a topological comparison between the local relational subgraph and the domain knowledge graph subgraph maintained locally by the agent to calculate the maximum number of edges in the maximum common subgraph between the two. The ratio of the number of edges in the maximum common subgraph to the maximum number of edges in the two subgraphs is used as the topological isomorphism density to characterize the degree of matching between the appeal logic and the rules of medical knowledge. Using a preset fusion weight threshold, the semantic similarity of the hyperbolic space and the topological isomorphism density are weighted and fused together to obtain the similarity between the appeal feature vector and the centroid of the agent's local domain knowledge base.
5. The method according to claim 3 or 4, characterized in that, The method for calculating the skill confidence level is as follows: Traverse the candidate tools in the agent's local toolset; For any candidate tool, calculate the number of intersections between the set of medical entities extracted from the original request and the set of input parameter slots required for the successful execution of the candidate tool, and use the ratio of the number of intersections to the total number of input parameter slots as the parameter slot readiness. The basic tool matching degree is obtained by weighting and summing the parameter slot readiness degree with the corresponding candidate tool's execution success rate decay weight within a preset historical period. Based on the relative entropy algorithm, the divergence of intent distribution between the current appeal's intent probability distribution and the standard intent distribution applicable to the corresponding candidate tool is calculated, and an exponential decay penalty term is generated based on the intent distribution divergence. Multiply the basic tool matching degree by the exponential decay penalty term to obtain the individual confidence degree of the corresponding candidate tool; Extract the maximum value among the individual confidence scores of all candidate tools, and use it as the skill confidence score of the agent for the claim.
6. The method according to claim 3, characterized in that, The weighting coefficient is a dynamically adjustable parameter, and the adjustment method is as follows: The orchestration engine dynamically adjusts the weight coefficients based on the urgency weights in the feature vectors; when the urgency weight exceeds a preset urgency threshold, the expected processing delay weight is increased. The proportion of similarity was reduced. The proportion of [agents] is used to prioritize the selection of agents with fast response times and low load.
7. The method according to claim 1, characterized in that, The dynamic generation and distribution of task flow links in a directed acyclic graph format based on the temporal dependencies between intents specifically includes: If there is no temporal or logical relationship between the requests and intentions of each target agent, the orchestration engine will distribute the tasks to each target agent in parallel. If there is a causal or temporal relationship between the requests and intentions of each target agent, the orchestration engine maps the intentions to nodes in a directed acyclic graph, generates directed edges containing the execution order, and distributes the tasks to the corresponding agents according to the topological sorting of the directed acyclic graph; wherein, the output of the preceding agent is passed to the following agent as a context parameter.
8. The method according to claim 7, characterized in that, The output of the preceding agent is passed to the following agent as a context parameter: Create a dynamic storage area in the orchestration engine's memory space that is bound to the current patient's needs; After completing its own task, the front-end intelligent agent encapsulates the local results in a structured manner, extracts the entity list, attribute key-value pairs and conclusion confidence, and writes them into the dynamic storage area after attaching the context version number. Before starting execution, the post-processor uses an attention mechanism model to extract weighted features from the historical write records in the dynamic storage area, filters out redundant information that is irrelevant to its own task, and generates prompt word context to guide the execution of the local task.
9. The method according to claim 1, characterized in that, The execution of security red line verification and global conflict resolution based on medical knowledge graphs specifically includes: Extract the suggested entities from the local results output by each target agent; In the medical knowledge graph, query the relationship edges between the suggested entities. If there are relationship edges represented as taboo or antagonistic between suggested entities output by different agents, then a global logical conflict is determined to have occurred. When a global logical conflict occurs, the orchestration engine, based on the preset medical safety priorities of the agents, uses the local results of the high-priority agents to overwrite the local results of the low-priority agents, or sends the conflict node information back to the high-priority agents for secondary verification and reconstruction.
10. A patient request flow processing system based on multi-agent collaboration, characterized in that, The system is used to implement the method as described in any one of claims 1-9, comprising: The feature extraction module is used to receive the patient's original request and generate a multi-dimensional feature vector containing semantics, intent distribution, and urgency through intent decoupling and entity recognition. The task broadcasting module is used to broadcast the feature vector as a bidding task to a collaborative network containing multiple agents. The agent bidding module is deployed in each agent of the collaborative network. It is used to calculate the bidding score based on the similarity of the local knowledge base, the tool confidence and the current load, and submit the bidding response vector to the orchestration engine. The orchestration and distribution module, deployed in the orchestration engine, is used to select target agent combinations based on global bidding scores and generate task flow links in a directed acyclic graph format for distribution based on the temporal dependencies between intents. The conflict resolution and fusion module is used to obtain the local results output by each target agent according to the link, perform security red line verification and global conflict resolution based on medical knowledge graph, and fuse them to generate the final collaborative response.
Citation Information
Patent Citations
Medical business system processing method based on multi-agent cooperation, medium and equipment
CN121528472A
Medical data processing system based on dynamic knowledge graph and multi-agent cooperation
CN121812046A