A medical consultation simulation method and device based on a clinical state diagram and multi-agent collaboration and electronic equipment
Patent Information
- Application Number
- CN202611162914.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-08-03
AI Technical Summary
[0003]第一,单模型架构下,系统需同时承担角色扮演、反馈逻辑与评分功能,易产生角色串扰导致医学逻辑混乱;
[0027]第一,通过临床状态图与多智能体协同架构,有助于降低角色串扰,提升医学逻辑一致性。本申请实施例将临床状态图作为全局一致性载体,由患者智能体、环境智能体、安全智能体、考官智能体各司其职、并行提案,再经冲突消解约束后对临床状态图进行更新,有助于使各智能体的输出在医学逻辑上保持一致;相比传统方案中单一大语言模型需同时承担角色扮演、医学逻辑推演与评估打分而导致的角色串扰和逻辑混乱,本申请实施例的多智能体解耦架构大幅提升了多轮问诊场景中病情演化与应答输出的逻辑一致性和可靠性。
Smart Images

Figure CN122677134B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to a medical consultation simulation method, device, and electronic device based on clinical state graphs and multi-agent collaboration. Background Technology
[0002] Existing medical simulation consultation systems mostly use a single large language model for driving, but they have the following technical shortcomings in practical applications:
[0003] First, under a single-model architecture, the system needs to simultaneously handle role-playing, feedback logic, and scoring functions, which can easily lead to role crosstalk and confusion in medical logic.
[0004] Second, the disease progression lacks definitive physical or pathological mechanisms to support it, making it difficult to simulate the causal chain in the continuous diagnosis and treatment process.
[0005] Third, the evaluation indicators are mostly based on text semantic similarity, which cannot objectively quantify the substantial contribution of trainees' questions to clinical diagnosis from an information theory perspective. Summary of the Invention
[0006] In view of this, this application proposes a medical consultation simulation method, device, and electronic device based on clinical state diagrams and multi-agent collaboration. Specifically, this application is implemented through the following technical solution:
[0007] According to a first aspect of the embodiments of this specification, a medical consultation simulation method based on clinical state diagrams and multi-agent collaboration is provided, the method comprising the following steps:
[0008] Step S1: For the current interaction command of the consultation operator, the orchestrator parses the interaction command to determine its corresponding operation category, and extracts the target node associated with the interaction command from the current clinical state graph based on the operation category.
[0009] Step S2: Distribute proposal requests carrying the target node to the patient agent, environment agent, examiner agent, and security agent respectively;
[0010] The environmental agent generates physiological parameter update proposals for the target node based on the latent variable pathological state corresponding to the current clinical state map.
[0011] The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state.
[0012] The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph.
[0013] The examiner agent generates the current distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram before the interaction instruction is executed;
[0014] Step S3: Conflict detection and resolution are performed on the proposals generated by the patient agent, the environment agent, and the security agent. The clinical state graph is updated based on the resolution results, and the latent variable pathological state and the observable state set are updated based on the updated clinical state graph instance.
[0015] Step S4: Obtain the response text generated by the patient agent based on the updated observable state set, perform a consistency check on the response text, and output the response text after the check passes.
[0016] According to a second aspect of the embodiments of this specification, a medical consultation simulation device based on clinical state graphs and multi-agent collaboration is provided, the device comprising:
[0017] The target node determination unit is used to parse the current interaction command of the consultation operator to determine its corresponding operation category by the orchestrator, and extract the target node associated with the interaction command from the current clinical state graph based on the operation category.
[0018] An action proposal generation unit is used to distribute proposal requests carrying the target node to the patient agent, the environment agent, the examiner agent, and the security agent, respectively.
[0019] The environmental agent generates physiological parameter update proposals for the target node based on the latent variable pathological state corresponding to the current clinical state map.
[0020] The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state.
[0021] The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph.
[0022] The examiner agent generates the current distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram before the interaction instruction is executed;
[0023] The data update unit is used to perform conflict detection and conflict resolution on the proposals generated by the patient agent, the environment agent, and the security agent, update the clinical state graph according to the resolution results, and update the latent variable pathological state and the observable state set based on the updated clinical state graph instance.
[0024] The text verification unit acquires the response text generated by the patient agent based on the updated observable state set, performs a consistency check on the response text, and outputs the response text after the check passes.
[0025] According to a third aspect of the embodiments of this specification, an electronic device is provided, comprising: a processor; and a computer-readable storage medium storing computer program instructions that, when executed by the processor, cause the processor to perform the method as described in the first aspect.
[0026] The embodiments of this application have at least the following technical effects:
[0027] First, the clinical state diagram and multi-agent collaborative architecture help reduce role crosstalk and improve the consistency of medical logic. In this embodiment, the clinical state diagram serves as a global consistency carrier, with patient agents, environment agents, safety agents, and examiner agents each performing their respective roles and proposing in parallel. After conflict resolution constraints, the clinical state diagram is updated, helping to ensure that the outputs of each agent remain consistent in medical logic. Compared to traditional solutions where a single large language model simultaneously handles role-playing, medical logic deduction, and evaluation scoring, leading to role crosstalk and logical confusion, the multi-agent decoupled architecture of this embodiment significantly improves the logical consistency and reliability of disease evolution and response output in multi-round consultation scenarios.
[0028] Second, through a two-tiered deduction mechanism driven by clinical state graphs—comprising latent variable pathological states and observable state sets—the dynamic evolution of disease progression conforms to medical causality. This embodiment separates unobservable pathological mechanism parameters from clinical manifestation data accessible to trainees, and drives the temporal evolution of latent variable pathological states based on clinical state graphs, which are then mapped to synchronous updates of the observable state set via observation functions. Compared to traditional approaches that lack deterministic pathological mechanism support and rely solely on large models for arbitrary generation, this embodiment ensures that each state update has a clear medical logical basis, improving the realism and interpretability of disease progression. Attached Figure Description
[0029] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the accompanying drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Some specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings in an exemplary and non-limiting manner. The same reference numerals in the drawings indicate the same or similar parts or components. Those skilled in the art should understand that these drawings are not necessarily drawn to scale. In the drawings:
[0030] Figure 1This is a flowchart illustrating an exemplary embodiment of a medical consultation simulation method based on clinical state diagrams and multi-agent collaboration, as shown in this application.
[0031] Figure 2 This is a schematic diagram of a medical consultation system architecture shown in an exemplary embodiment of this application;
[0032] Figure 3 This is a block diagram illustrating an electronic device according to an exemplary embodiment of this application;
[0033] Figure 4 This is a block diagram of a medical consultation simulation device based on a clinical state diagram and multi-agent collaboration, as illustrated in an exemplary embodiment of this application. Detailed Implementation
[0034] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0035] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0036] To address the problem that traditional solutions often employ a single large language model, which leads to role interference between tasks when simultaneously handling personalized responses, medical contraindication review, and disease evolution, making it impossible to maintain the consistency of global logic, this application's technical solution constructs a Clinical State Graph (CSG) as a global consistency carrier and uses it to drive the orchestration of heterogeneous multi-agent systems.
[0037] The clinical state is modeled using a graph data structure for the target case. Nodes represent core elements in clinical practice, and edges represent causal relationships between nodes constrained by medical logic. In this embodiment, the clinical state graph includes the following five types of nodes:
[0038] Symptom nodes are used to record abnormal symptoms subjectively experienced by the patient, such as abdominal pain, nausea, and headache. Each symptom node includes at least the following attributes: symptom name, time of occurrence, severity, description of its nature, and current status. The current status attribute values include inactive, queried, and confirmed. Symptom nodes are referenced by the patient agent when generating responses, serving as a source of material for anthropomorphic dialogue.
[0039] Physical sign nodes are used to record abnormal findings obtained through physical examination, such as McBurney's point tenderness, rebound tenderness in the abdomen, and decreased bowel sounds. Each physical sign node includes at least the sign name, examination site, examination result, and current status. Examination result attribute values include, for example, positive, negative, and detailed description, while current status attribute values include, for example, not examined, examined, and confirmed. The values of physical sign nodes are calculated and updated by the environmental agent based on the latent variable pathological state when the patient performs the physical examination.
[0040] Test nodes are used to record physiological parameters obtainable through laboratory or auxiliary examinations, such as white blood cell count, body temperature, blood pressure, and CT imaging findings. Each test node includes at least the test name, result value, reference range, and current status. The current status attribute value may include, for example, not ordered, pending report, or reported. The test node's specific value is also calculated and updated by the environmental agent based on the latent variable pathological state when the patient requests the test.
[0041] Treatment nodes are used to record the treatment or intervention measures taken by the consultation operator for the patient, such as intravenous antibiotic infusion, emergency surgery, and oral analgesics. Each treatment node includes at least the following attributes: treatment name, dosage / method, execution time, and current status. The current status attribute value includes, for example, "not executed" or "executed." The recording of treatment nodes is used for two purposes: firstly, for the security agent to retrieve medical contraindications, such as determining whether prescribing aspirin to a patient with a gastric ulcer violates a contraindication; and secondly, for evaluating and recording the consultation operator's actions.
[0042] Differential diagnosis hypothesis nodes represent potential disease diagnoses that are yet to be validated. For example, when a patient presents with lower back pain and hematuria, the established differential diagnosis hypothesis nodes might include urinary tract stones, acute pyelonephritis, urinary system tumors, and renal infarction. Each differential diagnosis hypothesis node does not indicate that the system has made a definitive diagnosis, but rather that the disease is currently a diagnostic hypothesis that needs to be validated. Each differential diagnosis hypothesis node includes at least the disease name, current probability, a list of supporting evidence, and a list of excluding evidence; the current probability is a continuous value between 0 and 1, which is recalculated and updated based on the currently activated evidence nodes after each update of the clinical state graph.
[0043] The nodes in the clinical state are connected by directed edges, which represent causal constraints in medical logic. For example, a node representing right lower abdominal pain can lead to an edge pointing to a node representing McBurney's point tenderness, indicating that the symptom is usually accompanied by this sign; a node representing the prescription of aspirin can lead to an edge representing a medical contraindication pointing to a node representing a differential diagnosis hypothesis for gastric ulcers, indicating that the drug is contraindicated for this disease. These edges form the basis for the safety agent to perform contraindication checks and for the inference engine to update probabilities.
[0044] This technical solution utilizes pre-built clinical states for medical consultation. When the consultation operator (such as a doctor) needs to interact with instructions, the orchestrator parses the interaction instructions and determines the corresponding target node. Subsequently, it distributes proposal requests to the multi-agent collaborative architecture through a multi-agent message bus. Each agent then performs tasks such as response generation, objective node updating, evaluation scoring, and taboo interception, and returns a structured action proposal.
[0045] The multi-agent collaborative architecture constructed in this technical solution comprises four heterogeneous agents: a patient agent, an environment agent, a safety agent, and an examiner agent. Each agent has independent responsibilities and works in parallel, uniformly scheduled by an orchestrator through a multi-agent message bus. Specifically:
[0046] The patient agent simulates a patient's response behavior. Based on activated clinical performance data from the current observable state set, and combined with pre-set emotion model output control parameters, it generates anthropomorphic response text that matches the current patient's condition and emotional characteristics. Internally, the patient agent uses a large language model as its natural language generation engine, but this engine's generation process is constrained by consistent projection to ensure that the output content does not deviate from the medical facts recorded in the clinical state diagram.
[0047] An environmental intelligent agent is used to simulate a patient's physiological environment and quantifiable responses to procedures such as physical examinations and tests. Based on the current latent variable pathological state, it calculates the specific physiological parameter values (such as blood pressure, heart rate, body temperature, etc.) corresponding to the target node through a preset physiological dynamics mapping function, and generates physiological parameter update proposals containing numerical update information.
[0048] A security agent is used to simulate the security review mechanism in clinical diagnosis and treatment. After receiving an operation request from the patient, it searches the clinical state graph for medical contraindication edges associated with the target node and determines whether the current operation violates a contraindication, such as prescribing contraindicated drugs or performing contraindicated examinations for patients with specific diseases. If a contraindication is violated, an operation prohibition proposal is generated to prevent unsafe operations from entering the state update process.
[0049] The examiner agent is used to simulate a clinical examiner's quantitative assessment of consultation quality. Before the interaction command from the patient is executed, it reads the probability distribution of each differential diagnosis hypothesis node in the clinical state diagram and calculates and temporarily stores the current distribution entropy value. After the clinical state diagram is updated based on the interaction command, it reads the probability distribution of each differential diagnosis hypothesis node again and calculates the updated distribution entropy value. By comparing the two entropy values, it calculates the information gain corresponding to the interaction command, and then combines redundant questions and unsafe operation penalties to generate the final consultation quality assessment result.
[0050] Figure 1 This is a flowchart illustrating an exemplary embodiment of a medical consultation simulation method based on clinical state graphs and multi-agent collaboration, as shown in this application. Figure 1 As shown, the medical consultation simulation method includes the following steps:
[0051] Step S1: For the current interaction command of the consultation operator, the orchestrator parses the interaction command to determine its corresponding operation category, and extracts the target node associated with the interaction command from the current clinical state graph based on the operation category; the clinical state graph uses symptoms, signs, examinations, treatments and differential diagnosis hypotheses as node types, and medical logical causal constraints as edges between nodes.
[0052] Step S2: Distribute proposal requests carrying the target node to the patient agent, environment agent, examiner agent, and security agent respectively.
[0053] The environmental agent generates a physiological parameter update proposal for the target node based on the latent variable pathological state corresponding to the current clinical state graph; the latent variable pathological state is used to characterize the pathological mechanism parameters corresponding to the target case.
[0054] The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state; the observable state set is a set of clinical manifestation data generated after the latent variable pathological state is mapped by a preset observation function.
[0055] The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph.
[0056] The examiner agent generates the current distribution entropy based on the probability distribution of each differential diagnosis hypothesis node in the clinical state diagram before the interaction instruction is executed.
[0057] Step S3: Perform conflict detection and conflict resolution on the proposals generated by the patient agent, the environment agent, and the security agent; update the clinical state graph based on the resolution results; and update the latent variable pathological state and the observable state set based on the updated clinical state graph instance.
[0058] The initial clinical status map is constructed based on the target case, and the specific construction process will be explained in detail later.
[0059] The target case is a structured digital patient model instantiated for the current single medical consultation simulation task. The electronic medical record is an objective, desensitized data set that stores historical patient diagnosis and treatment records. It records the original information of the patient's medical history, examination results, and treatment process in the actual clinical environment. The target case is not a direct copy or playback of a real electronic medical record, but a virtual patient instance reconstructed based on the fusion of population statistical laws and medical knowledge graph.
[0060] Step S4: Obtain the response text generated by the patient agent based on the updated observable state set, perform a consistency check on the response text, and output the response text after the check passes.
[0061] Figure 1 The medical consultation method shown uses a multi-agent collaborative architecture driven by a clinical state graph, which helps reduce role crosstalk, improve the consistency of medical logic, and realizes the dynamic evolution of the disease in accordance with medical causality based on a two-layer inference of latent variable pathological state and observable state set. This overcomes the deficiency of existing solutions in that the disease evolution lacks the support of deterministic pathological mechanisms.
[0062] In some embodiments, Figure 1 The method shown also includes:
[0063] Step S5: The examiner agent generates an updated distribution entropy based on the probability distribution of each differential diagnosis hypothesis node in the clinical state diagram after the interaction instruction is executed. Based on the current distribution entropy and the updated distribution entropy, the information gain of the interaction instruction is calculated, and a consultation quality assessment result is generated based on the information gain and a preset penalty term.
[0064] The preset penalty items include penalties for redundant questioning and unsafe operations.
[0065] This embodiment provides an objective and scientific measure of consultation quality based on information gain quantification evaluation using posterior entropy reduction. In this embodiment, the examiner agent calculates information gain based on the entropy change of the probability distribution of differential diagnostic hypotheses before and after the execution of interactive instructions, thus objectively quantifying the actual contribution of each consultation action to narrowing the diagnostic scope. Compared to traditional solutions that often rely on textual semantic similarity or subjective rule scoring, this embodiment provides a precisely quantifiable and reproducible evaluation index from an information theory perspective, offering objective and scientific feedback for medical education.
[0066] Figure 1The medical consultation methods shown can be executed through a medical consultation system. The processing procedure of the medical consultation system can be referenced. Figure 2 ,like Figure 2 As shown, the medical consultation system includes a CSG database, a trainee interaction layer, an orchestrator, a multi-agent message bus, and a constraint satisfaction merging module.
[0067] The medical consultation system first performs the construction and initialization of the clinical status graph.
[0068] The medical consultation system extracts disease stage characteristics, contraindications, and standard pathways from a standard case database and treatment guidelines. The disease stage characteristics refer to the probability distribution of clinical symptoms and signs that patients may exhibit at different stages of disease progression, as well as underlying pathophysiological parameters, used to characterize the pathological patterns of disease evolution over time. These progression stages, such as the acute phase, remission phase, and recovery phase of the disease, or clinical stages I, II, and III, are mapped to a many-to-many relationship between the probability distribution of clinical symptoms and signs and the underlying pathophysiological parameters that patients may exhibit at that stage. The standard pathway refers to a standardized clinical treatment process for a specific disease, constructed based on clinical treatment guidelines, such as the Clinical Practice Guideline (CPG). In the clinical state diagram, the standard pathway is represented as a directed graph path composed of a series of nodes connected in a logical medical sequence, serving as a standard benchmark for evaluating the compliance and logic of the consultation operator's decision-making path.
[0069] The medical consultation system also extracts de-identified baseline data of historical patients from electronic medical records, uses prior medical knowledge to vectorize patient features, and performs correlation calculations and dimensionality reduction through principal component analysis or autoencoders to construct an individual difference parameter matrix. , This represents the individualized background characteristics of the patient, such as age, gender, underlying medical history, and genetic sensitivity. Representing dimensions of physiological response characteristics, such as drug metabolism rate coefficient, pain tolerance threshold, and immune response intensity coefficient; individual difference parameter matrix. elements in Indicates the first Individualized background characteristics for the first Regulatory weights for physiological response characteristics.
[0070] Subsequently, tensor decomposition technology was used to fuse disease stage characteristics with individual difference parameter matrices, generating interrelated symptom nodes, sign nodes, test nodes, and differential diagnosis hypothesis nodes in the clinical state graph.
[0071] After constructing the initial clinical state map, the initial values of the latent variable pathological states are determined according to the disease stage characteristics, individual difference parameter matrix, and structured target cases, following preset state initialization rules. And generate initial values for the observable state set according to the following observation function:
[0072] (1)
[0073] in, These are the initial values for the observable state set; This is a preset observation function; This is the set of parameters for the observation function, which is pre-calibrated based on a standard case database and treatment guidelines.
[0074] During the operation of the medical consultation system, the user inputs interactive commands, such as text-based consultations or physical examinations, through the system's interactive front end. The orchestrator, based on its built-in natural language understanding model, performs intent recognition on the interactive commands to determine the operation category, which includes medical history inquiries or physical examinations. It then extracts medical entities from the interactive commands using slot filling and entity extraction techniques and aligns them with the clinical state graph, thereby accurately parsing the intent type of the interactive command. The system extracts target nodes and encapsulates them into standard messages, broadcasting proposal requests via a multi-agent message bus.
[0075] For example, in a medical consultation simulation training scenario, if the trainee's intention is to inquire about medical history, the target node is the symptom node; if the trainee's intention is to conduct a physical examination, the target node is the vital signs node; if the trainee's intention is to order laboratory tests or auxiliary examinations, the target node is the examination node; if the trainee's intention is to implement treatment measures or issue medical orders, the target node is the treatment node; and if the trainee's intention is to make a stage diagnosis or differential diagnosis judgment, the target node is the differential diagnosis hypothesis node. This mapping relationship is used to align different types of training interaction instructions to the corresponding nodes in the clinical state graph to support clinical state updates in a controlled training environment.
[0076] After receiving a broadcast message, the safety agent prioritizes searching for medical taboo edges in the clinical state graph based on the target node. If the other end node associated with the taboo edge matches an activated pathological state node in the current training case, for example, if the trainee performs the operation of prescribing aspirin in a training case related to gastric ulcer, the safety agent determines that the operation triggers a taboo and generates an operation prohibition proposal.
[0077] After receiving a broadcast message, the environmental agent parses the target node identifier, calculates the physiological parameter values corresponding to the target node based on the current latent variable pathological state and through a preset physiological dynamics mapping function, thereby generating a physiological parameter update proposal containing numerical update information.
[0078] After receiving a broadcast message, the patient agent extracts the target node identifier and obtains the clinical facts corresponding to it in the observable state set. Combined with the control parameters output by the patient's current emotion model, it generates a response text proposal that conforms to the set emotional characteristics and is consistent with the current training case.
[0079] After receiving the proposals generated by the three agents, the constraint merging module performs conflict detection on the proposals sent by the relevant agents. When a conflict exists, conflict resolution is performed according to a preset priority rule. Specifically, the priority rule is as follows: proposals generated by the safety agent have a higher priority than proposals generated by the environment agent, and proposals generated by the environment agent have a higher priority than proposals generated by the patient agent.
[0080] For example, when a security agent's operation prohibition proposal for a target node and an environmental agent's physiological parameter update proposal for the same target node both act on that target node and become mutually exclusive, the system prioritizes executing the security protection logic and removes the physiological parameter update operation corresponding to that target node. The processed valid instruction sequence is converted into a database write transaction, atomically updating the clinical state graph. For example, updating the state attribute values of relevant nodes in the clinical state graph, such as changing the explored state of symptom nodes and sign nodes from inactive to active, or the specific feedback values corresponding to examination nodes and treatment nodes, as well as the activation state of each associated edge, to ensure that the clinical state graph can reflect the latest and globally consistent clinical state corresponding to the current training case at any time under multiple rounds of training interaction or logically mutually exclusive operations. This embodiment, through this conflict resolution mechanism, ensures that the system maintains the consistency and stability of clinical facts in the training scenario when facing multiple rounds of concurrent or logically mutually exclusive training operations.
[0081] After updating the clinical state map through the above embodiments, the latent variable pathological state and the observable state set are updated simultaneously.
[0082] In some embodiments, the process of updating latent pathological states includes:
[0083] Obtain the encoding characteristics of the interactive instructions;
[0084] The current latent variable pathological state, the encoding features of the interactive instruction, and the disease feature parameters corresponding to the target case are used as inputs to a preset state transition function to calculate the updated latent variable pathological state.
[0085] The updated latent variable pathological state is used as the input to the preset observation function to generate an updated set of observable states.
[0086] This embodiment focuses on the dynamic deduction of pathological states, and uses a preset state transition function:
[0087] (2)
[0088] in, For the first The latent variable pathological state of the wheel, For the first The latent variables of the cycle, pathological states, such as characteristics including blood volume and inflammatory factor levels, are initialized with the following values: Determined based on structured case data, disease stage mapping relationships, and individual difference parameters; The encoding features of interactive commands represent the intervention actions of the person performing the consultation. These are disease characteristic parameters that can be read from a preset parameter library based on the target case; This is process noise, used to simulate the physiological randomness of a patient's condition naturally deteriorating or experiencing individualized fluctuations over time without external intervention.
[0089] Based on the evolution results, the updated latent variables are mapped to clinical manifestations that can be perceived by the patient's medical history taking using the observation function of formula (1), such as blood pressure, heart rate, pain score, etc.
[0090] Upon obtaining the updated observable state set, the patient agent generates a response text based on the updated observable state set and performs a consistency check on the response text to determine whether the response text does not contain clinical manifestation data that is not activated in the current observable state set and does not negate the clinical manifestation data already recorded in the current clinical state graph.
[0091] If the response text does not contain clinical manifestation data that is not activated in the current observable state set, and does not negate the clinical manifestation data already recorded in the current clinical state graph, then the response text passes the consistency check.
[0092] If the response text fails the consistency check, the response text is discarded, and the state attribute value of the activated node in the current clinical state graph is written as a constraint condition into the generation prompt word of the patient agent, controlling the patient agent to regenerate the response text.
[0093] The clinical manifestation data that is not activated in the observable state set refers to the positive disease descriptions that are not configured or activated in the current observable state set when the patient agent generates the response text, such as positive symptom or sign nodes.
[0094] For example, when a medical consultation system determines that the response text is inconsistent with the current clinical status diagram, it specifically includes the following two situations:
[0095] Positive inconsistency (i.e., medical illusion): The response text affirms a positive sign that is not present in the current clinical state diagram. For example, the patient's current clinical state diagram only includes the node of upper abdominal dull pain and does not have the node of right lower quadrant rebound pain, but the patient agent outputs the response text "I feel that my right lower quadrant is particularly painful when I press and release it", then the response text belongs to the case of a mismatched positive sign.
[0096] Negative inconsistency (i.e., contrary to fact): The response text contradicts the objective clinical facts recorded in the current clinical state graph. For example, the activation node in the clinical state graph records that the patient's current heart rate has reached 120 beats / min, while the patient agent outputs the response text "I feel my heartbeat is quite stable". This response text is a mismatch of clinical manifestation.
[0097] If the response text fails the consistency check, the medical consultation system extracts node data from the clinical state graph as hard constraints and writes it into the prompt words. This guides the patient's agent to correct content that contradicts the medical facts in the clinical state graph while maintaining the original tone of voice.
[0098] Finally, the medical consultation system performs a quantitative quality assessment through an examiner agent. The assessment process is based on the information gain index of the differential diagnosis set.
[0099] (3)
[0100] in, The distribution entropy before the interactive command is executed is calculated by... The information entropy of the probability distribution of all differential diagnosis hypothesis nodes in the clinical state graph of the round is obtained, and this probability distribution is obtained from the information entropy of the probability distribution up to the round. The clinical manifestations already discovered by the round-trip consultation operator are inferred in real time using Bayesian networks.
[0101] The expected entropy after the execution of the interactive command is the intervention action of the person performing the consultation. (For example, if the patient chooses to have a blood routine test), the medical consultation system estimates all possible test result branches that the test node may present and their corresponding probabilities based on the current pathological state. It calculates the new posterior entropy of the set of diagnostic hypotheses under these potential results, and finally sums these new posterior entropies by weight to obtain the expected value.
[0102] To more clearly illustrate the implementation details of this solution, an exemplary embodiment is given below, using a medical consultation simulation training scenario of acute right lower quadrant abdominal pain as an example:
[0103] (1) Initialization: The medical consultation system compiles cases related to acute appendicitis into an initial clinical state diagram, which includes symptom nodes, sign nodes, examination nodes and differential diagnosis hypothesis nodes related to the case; at the same time, it initializes the latent variable pathological state according to the structured information of the case, and generates an observable state set according to the preset observation function. The observable state set initially only exposes part of the clinical manifestation information corresponding to the current training process.
[0104] (2) Interaction and parsing: The trainee inputs the interactive command "Does pressing my stomach hurt?" The orchestrator performs intent recognition and entity extraction on the interactive command, parses it into a physical examination operation, and determines the corresponding target node as the McBurney point related sign node in the right lower abdomen.
[0105] (3) Multi-agent collaboration and conflict resolution: The environmental agent calculates the corresponding vital sign feedback proposals based on the current latent variable pathological state and the target node, such as generating positive vital sign candidate results such as McBurney's point tenderness and rebound tenderness; if the trainee further inputs unsafe operation-type interaction instructions at this time, the safety agent generates operation prohibition proposals based on the medical contraindication edges in the clinical state graph. After the constraint satisfaction merging module performs conflict resolution on each proposal according to the preset priority rules, it writes the effective results back to the clinical state graph and updates the latent variable pathological state and observable state set simultaneously to ensure the consistency of clinical facts during the simulation training process.
[0106] (4) State Evolution and Response: As the simulation progresses, the latent variable pathological state deduced by the state transition function changes, and the observable state set is further updated. The patient agent generates response text based on the updated observable state set, such as outputting the chief complaint or reaction that matches the current case state; the consistency verification module verifies the response text, confirms that it does not contain clinical manifestations that do not exist in the current observable state set, and does not negate the facts already recorded in the current clinical state graph, and then outputs the response text to the trainee.
[0107] (5) Evaluation: The trainee then proposes further consultation instructions related to the case. The examiner agent calculates the information gain corresponding to the consultation instruction based on the change in the probability distribution of each differential diagnosis hypothesis node in the clinical state diagram before and after the execution of the interaction instruction, and generates a consultation quality evaluation result in combination with a preset penalty term, which is used to characterize the contribution of this consultation action to narrowing the scope of differential diagnosis and improving consultation efficiency.
[0108] Thus, through the above simulation training process, the embodiments of this application can achieve logically consistent disease evolution, strict security interception, and objective quantitative evaluation in a controlled training environment, thereby improving the interpretability, stability, and reproducibility of medical consultation training.
[0109] Figure 3This is a schematic diagram of an electronic device illustrated in this specification according to an exemplary embodiment. Please refer to... Figure 3 At the hardware level, the device includes a processor 310, an internal bus 320, a network interface 330, memory 340, a hardware acceleration device 350, and non-volatile memory 360, and may also include other hardware required for its functions. One or more embodiments of this application can be implemented in software, for example, the processor 310 reads the corresponding computer program from the non-volatile memory 360 into the memory 340 and then runs it. Of course, in addition to software implementation, one or more embodiments of this application do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the above processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0110] Figure 4 This is a structural block diagram of a medical consultation simulation device based on clinical state graphs and multi-agent collaboration, as illustrated in an exemplary embodiment of this application. The medical consultation simulation device can be applied to, for example... Figure 3 The electronic device shown implements the technical solution of this application. The medical consultation device includes: a target node determination unit 410, an action proposal generation unit 420, a data update unit 430, and a text verification unit 440, wherein:
[0111] The target node determination unit 410 is used to parse the current interaction command of the consultation operator to determine its corresponding operation category by the orchestrator, and extract the target node associated with the interaction command from the current clinical state graph based on the operation category; the clinical state graph uses symptoms, signs, examinations, treatments and differential diagnosis hypotheses as node types, and medical logical causal constraints as edges between nodes.
[0112] Action proposal generation unit 420 is used to distribute proposal requests carrying the target node to the patient agent, environment agent, examiner agent, and security agent, respectively; wherein:
[0113] The environmental agent generates a physiological parameter update proposal for the target node based on the latent variable pathological state corresponding to the current clinical state graph; the latent variable pathological state is used to characterize the pathological mechanism parameters corresponding to the target case.
[0114] The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state; the observable state set is a set of clinical manifestation data generated after the latent variable pathological state is mapped by a preset observation function.
[0115] The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph.
[0116] The examiner agent generates the current distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram before the interaction instruction is executed;
[0117] The data update unit 430 is used to perform conflict detection and conflict resolution on the proposals generated by the patient agent, the environment agent, and the security agent, update the clinical state graph according to the resolution results, and update the latent variable pathological state and the observable state set based on the updated clinical state graph instance; wherein, the initialized clinical state graph is constructed based on the target case;
[0118] The text verification unit 440 acquires the response text generated by the patient agent based on the updated observable state set, performs a consistency check on the response text, and outputs the response text after the check passes.
[0119] In some embodiments, the medical consultation device further includes:
[0120] The consultation quality assessment unit 450 generates an updated distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state graph after the interaction instruction is executed, calculates the information gain of the interaction instruction based on the current distribution entropy and the updated distribution entropy, and generates a consultation quality assessment result based on the information gain and a preset penalty term.
[0121] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0122] Accordingly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the above embodiments.
[0123] Accordingly, embodiments of this application also provide a computer program product configured to perform the methods described in any of the above embodiments.
[0124] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which can take the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.
[0125] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0126] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0127] Computer-readable media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random-access memory (SRAM), dynamic random-access memory (DRAM), other types of random-access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0128] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0129] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0130] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0131] It should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0132] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A medical consultation simulation method based on clinical state graphs and multi-agent collaboration, characterized in that, The method includes the following steps: Step S1: For the current interaction command of the consultation operator, the orchestrator parses the interaction command to determine its corresponding operation category, and extracts the target node associated with the interaction command from the current clinical state graph based on the operation category. Step S2: Distribute proposal requests carrying the target node to the patient agent, environment agent, examiner agent, and security agent respectively; The environmental agent generates physiological parameter update proposals for the target node based on the latent variable pathological state corresponding to the current clinical state map. The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state. The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph. The examiner agent generates the current distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram before the interaction instruction is executed; Step S3: Conflict detection and resolution are performed on the proposals generated by the patient agent, the environment agent, and the security agent. The clinical state graph is updated based on the resolution results, and the latent variable pathological state and the observable state set are updated based on the updated clinical state graph. Step S4: Obtain the response text generated by the patient agent based on the updated observable state set, perform a consistency check on the response text, and output the response text after the check passes.
2. The method according to claim 1, characterized in that, The conflict resolution in step S3 is performed according to the following priority rules: Proposals generated by the safety agent have a higher priority than those generated by the environment agent, and proposals generated by the environment agent have a higher priority than those generated by the patient agent.
3. The method according to claim 1, characterized in that, The process of updating the latent variable pathological status in step S3 includes: Obtain the encoding characteristics of the interactive instructions; The current latent variable pathological state, the encoding features of the interactive instruction, and the disease feature parameters corresponding to the target case are used as inputs to a preset state transition function to calculate the updated latent variable pathological state.
4. The method according to claim 3, characterized in that, The expression for the preset state transition function is as follows: ; in, For the first The latent variable pathological state of the wheel, For the first The latent variable pathological state of the wheel, The encoding characteristics of interactive instructions, For disease characteristic parameters, This is process noise.
5. The method according to claim 1, characterized in that, The update process of the observable state set in step S3 includes: The updated latent variable pathological state is used as the input to the preset observation function to generate an updated set of observable states.
6. The method according to claim 1, characterized in that, The consistency check in step S4 includes: Determine whether the response text does not contain clinical manifestation data that is not activated in the current observable state set and does not negate the clinical manifestation data already recorded in the current clinical state graph.
7. The method according to claim 6, characterized in that, The conditions for successful verification in step S4 are: The response text did not contain clinical manifestation data that were not activated in the current observable state set, nor did it deny the clinical manifestation data already recorded in the current clinical state graph.
8. The method according to claim 1, characterized in that, Step S4 further includes: If the response text fails the consistency check, the response text is discarded, and the state attribute value of the activated node in the current clinical state graph is written as a constraint condition into the generation prompt word of the patient agent, controlling the patient agent to regenerate the response text.
9. The method according to any one of claims 1 to 8, characterized in that, The method includes the following steps: Step S5: The examiner agent generates an updated distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram after the interaction instruction is executed. Based on the current distribution entropy and the updated distribution entropy, the information gain of the interaction instruction is calculated, and a consultation quality assessment result is generated based on the information gain and a preset penalty term.
10. A medical consultation simulation device based on clinical state graphs and multi-agent collaboration, characterized in that, The device includes: The target node determination unit is used to parse the current interaction command of the consultation operator to determine its corresponding operation category by the orchestrator, and extract the target node associated with the interaction command from the current clinical state graph based on the operation category. An action proposal generation unit is used to distribute proposal requests carrying the target node to the patient agent, the environment agent, the examiner agent, and the security agent, respectively. The environmental agent generates physiological parameter update proposals for the target node based on the latent variable pathological state corresponding to the current clinical state map. The patient agent generates a response text proposal corresponding to the target node based on the observable state set corresponding to the current latent variable pathological state. The security agent generates an operation prohibition proposal for the target node based on the medical contraindication edges in the clinical state graph. The examiner agent generates the current distribution entropy based on the probability distribution of all differential diagnosis hypothesis nodes in the clinical state diagram before the interaction instruction is executed; The data update unit is used to perform conflict detection and conflict resolution on the proposals generated by the patient agent, the environment agent, and the security agent, update the clinical state graph based on the resolution results, and update the latent variable pathological state and the observable state set based on the updated clinical state graph. The text verification unit acquires the response text generated by the patient agent based on the updated observable state set, performs a consistency check on the response text, and outputs the response text after the check passes.
11. An electronic device, characterized in that, include: processor; as well as A computer-readable storage medium storing computer program instructions that, when executed by the processor, cause the processor to perform the method as described in any one of claims 1 to 9.