Emergency department auxiliary decision-making method and system based on multi-agent hierarchical counterfactual inference
Patent Information
- Application Number
- CN202611262208.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-09-25
AI Technical Summary
[0006]针对现有急诊辅助决策过程中多阶段任务衔接不足、单一智能体推理易受初始假设偏差影响、不同决策阶段缺少反事实验证和统一裁决机制以及推断过程可追溯性不足的问题,本发明提供一种基于多智能体分层反事实推断的急诊辅助决策方法及系统,通过在分诊、专科转诊和诊断辅助三个层级分别构建任务上下文,引入初始假设生成、反事实攻击、元裁决、反馈修正和候选假设博弈机制,提高急诊辅助决策的可靠性、一致性和可追溯性
1. 通过构建分诊、专科转诊和诊断依次关联的任务链,实现患者信息和阶段性结果的有序传递,减少各任务独立处理造成的信息割裂。
Smart Images

Figure CN122822306A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and computer-aided diagnostic technology, and in particular to an emergency auxiliary decision-making method and system based on multi-agent hierarchical counterfactual inference. Background Technology
[0002] Emergency clinical decision-making is characterized by rapid changes in patient condition, a short treatment window, incomplete patient information, and high risk levels. Medical staff must continuously complete disease triage, specialist referral, and preliminary diagnosis based on the patient's chief complaint, vital signs, past medical history, and laboratory test results. These tasks are hierarchically dependent; deviations in earlier stages can alter the scope of evidence and the direction of reasoning in later stages, and this effect is passed down the decision chain.
[0003] Existing emergency decision support methods mainly employ rule-based models, single-intelligence models, or retrieval-enhanced models. Rule-based models have limited adaptability to unstructured cases and complex symptom combinations; single-intelligence models are easily affected by initial conclusions, information order, and incomplete evidence, resulting in anchoring bias, evidence omissions, or unstable outputs; simply introducing external medical knowledge also makes it difficult to guarantee accurate matching between retrieval content and cases, and lacks active verification of initial conclusions.
[0004] To improve reliability, existing research has attempted to assign multiple agents to roles such as analysis, discussion, review, and summarization. However, current methods often employ fixed roles, flat discussions, simple voting, or direct consensus mechanisms, failing to fully reflect the task hierarchy between disease grading, specialist referral, and diagnosis. If agents conduct discussions based on similar prompts and the same initial judgments, highly correlated reasoning paths may form, causing erroneous viewpoints to be repeatedly reinforced during interactions, making it difficult to avoid group convergence.
[0005] Therefore, existing technologies lack a multi-agent reasoning method that is geared towards continuous decision-making processes in emergency departments, can deliver clinical information in stages, and conduct mutual questioning, counterfactual verification, independent adjudication, and outcome correction around different clinical hypotheses, so as to improve the accuracy, stability, and traceability of emergency triage, specialist referral, and preliminary diagnosis while controlling computational and deployment costs. Summary of the Invention
[0006] To address the problems of insufficient task integration across multiple stages in existing emergency medical decision support processes, susceptibility of single-agent reasoning to initial hypothesis bias, lack of counterfactual verification and unified adjudication mechanisms across different decision stages, and insufficient traceability of the inference process, this invention provides an emergency medical decision support method and system based on multi-agent hierarchical counterfactual inference. By constructing task contexts at three levels—triage, specialist referral, and diagnostic assistance—and introducing mechanisms for initial hypothesis generation, counterfactual attack, meta-adjudication, feedback correction, and candidate hypothesis game theory, the reliability, consistency, and traceability of emergency medical decision support are improved. The specific technical solution is as follows: In a first aspect, the present invention provides an emergency auxiliary decision-making method based on multi-agent hierarchical counterfactual inference, comprising the following steps: S1. Obtain the patient's electronic medical data that has been entered or stored, extract and standardize the fields of the patient's electronic medical data, and construct the patient task context.
[0007] Specifically, the process involves acquiring the patient's basic information, chief complaint, vital signs, pain level, present illness, past medical history, laboratory test results, and medication information. Data from different sources and in different formats is then standardized in terms of fields and terminology, and missing information is marked to create structured patient data. Based on this structured patient data, a patient context is constructed, serving as the factual basis for triage, specialist referral, and shared diagnostic tasks.
[0008] S2. Generate initial triage hypotheses based on case retrieval and emergency rules.
[0009] Based on the patient's chief complaint, vital signs, pain level, and other high-risk characteristics, the system retrieves similar historical cases or triage examples from the case knowledge base and corresponding triage criteria, risk signs, and medical resource demand rules from the emergency department rule base. The patient facts, similar cases, and emergency department rules are then input into the triage agent, which generates an initial triage hypothesis containing the triage level, supporting evidence, and initial confidence information.
[0010] S3. Perform a task-level counterfactual attack, meta-decision, and feedback correction on the triage hypothesis to obtain the final triage result.
[0011] The counterfactual verification agent constructs a task-level counterfactual problem based on the initial triage hypothesis, examining whether there are overlooked high-risk signs, conflicting triage rules, abnormal vital signs, or opposing evidence that supports other triage levels. The meta-adjudication agent independently judges the evidence used in the counterfactual attack, the attack strength, and its consistency with patient facts and emergency rules. When the counterfactual attack is valid, the adjudication opinion is fed back to the triage agent, causing it to regenerate or revise the triage hypothesis; when the counterfactual attack is insufficient to overturn the current hypothesis, or when a preset iteration condition is met, the revision stops, and the current hypothesis is determined as the final triage result.
[0012] S4. Construct a specialist task context based on the patient context and the final triage result, and generate a set of candidate hypotheses by the specialist agent.
[0013] The patient context and the final triage results are combined to form the basic context of the specialty task. Specialty-related medical knowledge is then retrieved based on the patient's symptoms, potentially affected systems, and disease severity. After the retrieval results are added to the specialty task context, the specialty agent generates multiple candidate specialty hypotheses with different clinical bases, forming a specialty hypothesis set.
[0014] S5. Establish a position agent for each specialty hypothesis, and execute argumentation, counterfactual attack, meta-decision, and rebuttal respectively. Aggregate the results of specialty referral based on the effective state and inference strength of each hypothesis.
[0015] For each specialty hypothesis in the specialty hypothesis set, a corresponding position agent is established. Each position agent formulates arguments supporting its hypothesis based on patient facts and retrieved evidence. Counterfactual verification agents construct counterfactual attacks against each specialty hypothesis, examining for missing necessary conditions, conflicting case facts, and other specialty interpretations. The meta-decision agent judges whether the opposing evidence is valid and determines the retention, downgrading, or exclusion status of the corresponding hypothesis. For specialty hypotheses that are not excluded, the corresponding position agent responds to or modifies the adopted opposing evidence. The specialist referral result is obtained by comprehensively aggregating the validity status of each hypothesis, the strength of supporting evidence, the strength of counterfactual attacks, the meta-decision result, and the strength of the response.
[0016] S6. Construct a diagnostic context based on the patient context, final triage results, and specialist referral results, and generate a set of candidate diagnostic hypotheses by the diagnostic agent.
[0017] The patient context, final triage results, and specialist referral results are combined to form the basic context for the diagnostic task. Relevant disease knowledge and differential diagnostic criteria are retrieved based on the patient's symptoms, examination results, and specialist conditions. After incorporating the retrieval results into the diagnostic context, the diagnostic agent generates multiple candidate diagnostic hypotheses that can explain the current case, forming a set of diagnostic hypotheses. Each diagnostic hypothesis includes corresponding case evidence, medical knowledge evidence, and initial inference strength.
[0018] S7. Establish a position agent for each diagnostic hypothesis, perform candidate-level counterfactual game, and aggregate to obtain diagnostic auxiliary results.
[0019] For each candidate diagnostic hypothesis, a corresponding diagnostic stance agent is established, and these agents form a chain of evidence supporting their respective hypotheses. The counterfactual verification agent, by assuming the diagnosis is invalid, examines whether there is exclusionary evidence, missing key diagnostic conditions, contradictory results, or alternative diagnoses with stronger explanatory power. The meta-adjudication agent independently adjudicates supporting and opposing opinions. The diagnostic stance agents respond to or revise based on the adopted opposing evidence. After at least one round of candidate-level counterfactual game, the results are aggregated based on the validity status and inference strength of each diagnostic hypothesis to obtain diagnostic assistance results or differential diagnostic assistance information.
[0020] S8 outputs triage, specialist referral, and diagnostic assistance results, along with corresponding inference trajectories.
[0021] The final triage results, specialist referral results, and diagnostic support results are structured and summarized to form emergency auxiliary decision-making outputs. At the same time, the initial hypotheses, candidate hypotheses, supporting evidence, counterfactual attacks, meta-ruling opinions, responses, feedback and correction processes, hypothesis validity status, and information transmission relationships between task layers are recorded at each task level, forming an inference trajectory that can be queried and reviewed by medical staff.
[0022] Furthermore, the patient context includes patient factual data, external retrieval evidence, and upstream task results, with information from different sources being labeled separately. Patient factual data serves as the common factual basis for all task layers; external retrieval evidence supplements medical knowledge; and upstream task results are only passed to downstream tasks after a final result is formed, thereby avoiding interference from intermediate hypotheses or unresolved opinions in subsequent decisions.
[0023] Furthermore, the hierarchical counterfactual inference includes task-level counterfactual inference and candidate-level counterfactual inference. Task-level counterfactual inference is used for emergency triage tasks, using a current triage hypothesis as the verification object, and gradually forming the final triage result through counterfactual attacks, meta-decisions, and feedback corrections; candidate-level counterfactual inference is used for specialist referral and diagnosis tasks, verifying multiple candidate hypotheses separately, and aggregating them after completing the counterfactual game of each hypothesis.
[0024] Furthermore, the candidate hypothesis set is dynamically generated by the corresponding task agent based on the current case context, and each candidate hypothesis includes at least a hypothesis identifier, hypothesis content, generation basis, and initial inference strength. The hypothesis identifier is used to maintain the consistency of the identity of the same hypothesis during the processes of argumentation, counterfactual attack, meta-decision, response, and aggregation.
[0025] Furthermore, the validity status of the hypothesis is determined based on the completeness of the hypothesis's premise, counterfactual attacks, meta-rule, and response, as well as whether the meta-rule result meets preset retention conditions; the inference strength is determined comprehensively based on the initial inference strength of the hypothesis, the strength of the premise's support, the strength of the counterfactual attacks confirmed by the meta-rule, the strength of the response, and consistency with medical rules. During aggregation, only candidate hypotheses in a valid state are sorted or combined; hypotheses that are excluded or whose inference process is incomplete are not included in the final result.
[0026] Furthermore, the aggregation includes validity screening, inference strength threshold screening, and global comparison. First, candidate hypotheses that fail the validity check or have been excluded by the meta-judgment agent are eliminated. Then, candidate hypotheses whose inference strength reaches a preset aggregation threshold are designated as admission candidates. These admission candidates are then sorted according to their inference strength, and a global comparison is performed based on supporting evidence, counterfactual evidence, and response information for each candidate hypothesis. For candidate hypotheses that constitute a mutually substitutive relationship, one is selected and retained based on the global comparison results. For candidate hypotheses that are supported by independent case facts and are mutually independent, both can be retained. The aggregation process can only generate specialist referral results or diagnostic assistance results from the admission candidates and must not reintroduce candidate hypotheses that have been excluded or failed the validity check.
[0027] In this invention, each task agent and the medical knowledge base are deployed in the local computing environment of the medical institution, and the original patient data is structured, retrieved, and inferred locally; alternatively, controlled remote computing resources can be used after the patient data has been anonymized. This allows the method to adapt to the computing conditions and data security requirements of different medical institutions.
[0028] Secondly, the present invention provides an emergency auxiliary decision-making system based on multi-agent hierarchical counterfactual inference, including a master control orchestration module, a patient data and task context construction module, a knowledge support module, a triage reasoning module, a specialist reasoning module, a diagnostic reasoning module, a counterfactual verification module, a meta-decision module, and a result and inference trajectory output module.
[0029] The main control orchestration module is used to call each module in the hierarchical order of triage, specialist referral and diagnostic assistance, and manage the task context, agent state and stage output of each level; The patient data and task context building module is used to extract fields, standardize, and organize contexts from patient data to obtain the patient task context. The knowledge support module is used to retrieve similar cases, emergency triage rules, specialty-related medical knowledge, or disease diagnosis knowledge based on the current task type, and provide the corresponding reasoning module with knowledge evidence marked with source tags. The triage reasoning module is used to generate initial triage hypotheses and call the counterfactual verification module and the meta-adjudication module to perform task-level counterfactual attacks, adjudication and feedback correction to obtain the final triage result. The specialty reasoning module is used to construct a specialty task context based on the patient task context and the final triage result. The specialty agent generates a set of candidate specialty hypotheses and establishes a position agent for each specialty hypothesis. The module then aggregates the results to obtain the specialty referral results. The diagnostic reasoning module is used to construct a diagnostic task context based on the patient's task context, final triage results, and specialist referral results. The diagnostic agent generates a set of candidate diagnostic hypotheses and obtains diagnostic assistance results through candidate-level counterfactual game. The counterfact verification module is used to generate counterfactual attack content and evidence for questioning regarding triage tasks and specialty and diagnostic candidate hypotheses. The meta-decision module is used to generate valid states, inference strengths, correction instructions, or sorting results based on the original arguments, counterfactual attacks, and responses. The Results and Inference Trajectory Output Module is used to output triage results, specialist referral results, diagnostic auxiliary results, and corresponding intermediate hypotheses, attacks, decisions, responses, and aggregate trajectories.
[0030] Furthermore, the master control orchestration module writes the final triage result into the specialty task context, and writes the final triage result and the specialty referral result together into the diagnostic task context, so as to form a hierarchical information transmission relationship between the triage layer, the specialty layer and the diagnostic layer.
[0031] Furthermore, the counterfactual verification module and the meta-decision module are functional modules shared by the triage reasoning module, the specialist reasoning module, and the diagnostic reasoning module, and adopt either the task-level counterfactual verification method or the candidate hypothesis-level counterfactual verification method according to the current task level.
[0032] Furthermore, each module is a logical function module implemented by one or more processors executing computer programs; each module can be centrally located in the same computing device, or it can be distributed among multiple computing devices that communicate with each other.
[0033] The innovation of this invention is: 1. Construct a hierarchical task chain for continuous decision-making processes in emergency departments. Emergency decision support is divided into three sequentially linked task layers: triage, specialist referral, and diagnostic assistance. Corresponding task contexts are constructed for each task layer, and only the final results from upstream tasks are passed to downstream tasks. This ensures that inferences at different stages maintain consistency with the facts of the case while avoiding interference from unresolved intermediate assumptions in subsequent tasks.
[0034] 2. Different counterfactual inference methods with varying granularities are designed for different task characteristics. For triage tasks with clear hierarchical rules and primarily forming a single current hypothesis, a task-level counterfactual attack, meta-adjudication, and feedback correction mechanism is used to iteratively verify the current triage hypothesis. For specialist referral and diagnostic assistance tasks that may have multiple reasonable clinical interpretations, a candidate-level counterfactual game mechanism is used to verify multiple candidate hypotheses separately and perform a global comparison, ensuring that the counterfactual inference method matches the decision structure of the corresponding task.
[0035] 3. Establish a position agent and role separation mechanism uniquely bound to each candidate hypothesis. Each candidate hypothesis is independently generated by the corresponding position agent, which generates the argument and the response. The counterfactual verification agent is responsible for finding opposing evidence from the opposite direction, and the meta-decision agent is responsible for independently adjudicating the argument, counterfactual attack, and response. This assigns hypothesis proposal, support, questioning, and adjudication to different agents, forming a mutually constraining reasoning structure.
[0036] 4. Establish a hierarchical evidence constraint mechanism for patient facts, external retrieval evidence, and upstream task results. Source tags are assigned to information from different sources. Patient facts serve as the common factual basis for each task layer, while external retrieval evidence serves as medical rules or background knowledge. A meta-decision agent checks the consistency between counterfactual evidence and patient facts and medical rules, ensuring that retrieval knowledge cannot replace or cover the facts already provided by the patient.
[0037] 5. Establish a candidate result generation mechanism based on valid state, inference strength threshold, and global ranking. The valid state of candidate hypotheses is determined through identity association verification, output format verification, and inference phase integrity verification. The inference strength is calculated by comprehensively considering the prior confidence of the candidate hypotheses, the confidence of the argument support, the strength of the response, the valid attack strength confirmed by the meta-judgment, and the proportion of strong attack rounds. Based on this, validity screening, inference strength threshold screening, and global ranking are performed, forming the final result only from the admitted candidates.
[0038] 6. Establish a structured inference trajectory that runs through the task hierarchy and agent interaction process. By associating hypothesis, argument, counterfactual attack, adjudication, response, correction, and final result with task identifiers, request identifiers, candidate identifiers, inference rounds, and processing stages, each specialist referral result and diagnostic aid result can be traced back to the corresponding case facts, supporting evidence, and opposing evidence.
[0039] The working principle of this invention is: First, patient electronic medical data is structured and a patient task context is constructed. Through field standardization, missing state labeling, and information source labeling, a unified case fact basis is provided for different task agents. During the triage phase, the triage agent generates an initial triage hypothesis by combining patient facts, similar cases, and emergency triage rules. The counterfactual verification agent, using the condition "the current triage hypothesis is not true," searches for overlooked high-risk signs, abnormal vital signs, differences in resource requirements, or rule conflicts. The meta-adjudication agent judges whether the opposing evidence has factual and rule-based basis. When a counterfactual attack is successful, the adjudication result is fed back to the triage agent to correct the current triage hypothesis; when the attack is unsuccessful, the attack strength is below a threshold, or a preset termination condition is met, the current hypothesis is determined as the final triage result. This utilizes counterfactual feedback to correct initial judgment biases and prevents invalid repeated reasoning through termination conditions.
[0040] Secondly, during the specialist referral and diagnostic assistance stages, the corresponding task agents generate multiple candidate hypotheses based on the current task context, and establish a uniquely bound position agent for each candidate hypothesis. The position agent formulates arguments supporting the corresponding hypothesis based on patient facts and retrieved evidence; the counterfactual verification agent attacks the hypothesis from directions such as missing necessary conditions, factual conflicts, exclusionary evidence, and alternative interpretations; the meta-adjudication agent independently judges whether the attack is valid and the degree of weakening of the candidate hypothesis; candidate hypotheses that are not ruled out are then defended by the corresponding position agent against the adopted opposing evidence. Because each position agent only maintains its bound candidate hypothesis, and other agents are responsible for questioning and adjudicating, confirmation bias caused by the same agent generating and verifying its own conclusions can be reduced, and erroneous viewpoints can be suppressed from being repeatedly reinforced in multi-agent interactions.
[0041] Furthermore, the system determines the validity of each candidate hypothesis based on the protocol execution integrity and meta-decision results. It calculates the inference strength of each candidate hypothesis by increasing the inference strength through supporting factors, decreasing the inference strength through adjudicated attack factors, and partially offsetting the attack penalty through response factors. Candidate hypotheses excluded by strong counter-evidence, with incorrect identity association, incorrect output format, or incomplete inference processes are not included in subsequent result generation; other candidate hypotheses can only become admission candidates after their inference strength reaches a preset threshold. Through this mechanism, the agent's output can be transformed from simple natural language opinions into structured candidates with valid states and comparable inference strengths.
[0042] Finally, the meta-decision agent performs a global comparison of the admission candidates. For candidate hypotheses that can explain the same case facts and constitute a substitution relationship, the one with the higher global ranking is retained; for candidate hypotheses supported by independent case facts and independent of each other in clinical interpretation, both can be retained. The meta-decision agent can only select results from the admission candidates and cannot reinstate candidate hypotheses that have been excluded or have not reached the inference strength threshold. This avoids the accumulation of weak evidence candidates caused by simple voting and also prevents candidates that have been excluded by local decisions from being reintroduced in the final comparison stage.
[0043] During the above processing, the system continuously records the input and output, information sources, candidate identities, inference rounds, supporting evidence, counterfactual evidence, decisions, responses, and result generation relationships for each task layer. This inference trajectory allows medical personnel to verify the reasons why a result is retained, downgraded, or excluded, thereby improving the interpretability and traceability of the decision support process. The task agents, emergency rule base, case knowledge base, and medical knowledge base can also be deployed on the local computing environment of the medical institution, enabling the structuring, retrieval, and inference of raw patient data locally, thus reducing the transmission of medical data to external networks.
[0044] Based on the above-mentioned innovative structure and working principle, compared with the prior art, the present invention has the following beneficial effects: 1. By constructing a task chain that links triage, specialist referral, and diagnosis sequentially, the orderly transmission of patient information and interim results can be achieved, reducing information fragmentation caused by independent processing of each task.
[0045] 2. Task-level counterfactual correction is used in the triage stage, and candidate-level counterfactual game theory is used in the specialist referral and diagnosis stages, so that the counterfactual inference method is adapted to the decision-making characteristics of different tasks.
[0046] 3. By dynamically generating multiple candidate hypotheses, the system can simultaneously examine different clinical interpretations, reducing anchoring bias and premature convergence caused by single-path reasoning.
[0047] 4. By delegating the argumentation, attack, adjudication, and response to different agents, we can avoid the same agent generating and verifying conclusions on its own, thereby reducing the risk of erroneous viewpoints being repeatedly reinforced and the convergence of multiple agents.
[0048] 5. Using case retrieval and medical rules for hypothesis generation and counterfactual verification enables external knowledge to both support supporting evidence and uncover contradictory evidence and alternative explanations.
[0049] 6. By recording the processes of hypothesis generation, counterfactual attacks, adjudication, response, and aggregation, a traceable inference trajectory is formed, which facilitates medical personnel in reviewing the basis for auxiliary decision-making.
[0050] 7. Each task agent and medical knowledge base can be deployed in the local computing environment of the medical institution, reducing the transmission of raw patient data to external networks and meeting the requirements for medical data security and controlled deployment. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0052] Figure 1 This is a schematic flowchart of the method of the present invention; Figure 2 This is a flowchart of the triage task-level counterfactual inference process of the present invention; Figure 3 This is a flowchart of the candidate-level counterfactual game and aggregation process of the present invention; Figure 4 This is a schematic diagram of the system of the present invention. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of the present invention.
[0054] Example 1
[0055] See Figure 1 This is a flowchart illustrating an emergency auxiliary decision-making method based on multi-agent hierarchical counterfactual inference provided by an embodiment of the present invention.
[0056] S1. Patient data structuring and task context construction.
[0057] The main control module receives the original problem and patient data. The patient data includes at least gender, age, chief complaint, pain level, vital signs, present medical history, laboratory test results, and medication information. Vital signs may include body temperature, heart rate, respiratory rate, blood oxygen saturation, systolic blood pressure, and diastolic blood pressure.
[0058] The patient data processing module first standardizes field names, numerical representations, and missing status, and then uses a chief complaint standardization module to identify English abbreviations, synonyms, anatomical locations, symptom types, and lateralization in the chief complaint. The standardization results include the original chief complaint, standardized current events, potential risk identification, and specialist suggestions. Specifically, standardized current events are used as patient facts; potential risk identification is only used to indicate whether the counterfactual verification agent checks for potential missed diagnoses and is not directly considered as a fact that the patient already has the corresponding disease.
[0059] Patient contexts are organized according to the following priorities: (1) The current chief complaint and standardized current events are given the highest priority; (2) Pain level, vital signs, present medical history and laboratory test results are used as current medical information; (3) Gender, age, past medical history and medication information as background information; (4) Externally retrieved knowledge, as medical rules or background knowledge, must not cover facts already provided by the patient.
[0060] This provides a unified patient context, which serves as the common case fact basis for subsequent triage, specialist referral, and diagnostic tasks.
[0061] S2. Generate initial triage hypotheses based on case retrieval and emergency rules.
[0062] The triage intelligence agent loads the historical triage case database and preprocesses the chief complaint, vital signs, pain score, and triage level of the historical cases.
[0063] For the current patient, relevant cases are first recalled from the case database based on the set of chief complaint terms, and then the similarity of chief complaint text, vital sign values, pain intensity, and vital sign risk patterns are calculated respectively.
[0064] In this embodiment, the overall similarity of cases is calculated as follows:
[0065] in, The Jaccard similarity of the set of main complaint terms is represented. This indicates the similarity of standardized vital sign values. This indicates the similarity between pain scores and pain categories. This indicates the similarity of risk patterns for abnormal vital signs. The top three similar cases are selected based on overall similarity.
[0066] The similar cases mentioned are only used to assist in assessing resource needs and vital sign risks. When the historical triage level of similar cases conflicts with the emergency triage rules, the emergency triage rules shall prevail.
[0067] The triage agent makes judgments sequentially according to the A, B, C, and D decision points in the ESI rules: Decision point A is used to determine whether a patient requires immediate life-saving intervention; when the conditions are met, an ESI Level 1 hypothesis is generated. Decision point B is used to determine whether a patient has a high-risk condition, acute altered consciousness, severe pain, or severe distress; when the conditions are met, an ESI Level 2 hypothesis is generated. After excluding ESI Level 1 and ESI Level 2, Decision Point C generates ESI Level 3, 4 or 5 hypotheses based on the expected number of types of emergency resources needed. Decision point D performs a high-risk vital sign review on patients provisionally classified as ESI level 3 to determine whether they need to be upgraded to ESI level 2.
[0068] The triage agent output includes the triage level, the rationale for the triage, and the initial assumptions about key uncertainties.
[0069] S3. Perform task-level counterfactual attacks, meta-decision, and feedback corrections on triage assumptions.
[0070] The main control module establishes a task-level counterfactual inference state machine for the triage task. The state machine includes, in sequence, a hypothesis generation state, a counterfactual attack state, a meta-decision state, a feedback correction state, and a termination state.
[0071] The counterfactual verification agent receives the patient context and the current triage hypothesis, and retrieves the corresponding ESI rules based on the current hypothesis. For example, when the current hypothesis is ESI level 3 to 5, in addition to retrieving the corresponding resource rules, it also retrieves ESI level 1 and ESI level 2 rules to check whether any patient facts requiring immediate intervention or of high risk have been missed.
[0072] The counterfactual verification agent generates a counterfactual probe by assuming the current triage result is invalid, and extracts evidence supporting the counterfactual probe from the patient context and emergency rules. The verification result includes at least the counterfactual probe, opposing evidence, rebuttal reasons, attack strength, whether there is strong counter-evidence, and suggested correction methods.
[0073] The meta-decision agent receives the current triage hypothesis and validation results, determines whether the opposing evidence stems from provided patient facts or explicit emergency rules, and recalibrates the attack strength. When the opposing evidence only involves missing information, general risks, or speculations not supported by patient facts, the meta-decision agent determines that the attack is invalid.
[0074] When the meta-arbitration agent determines that an attack has occurred and the attack strength has reached a preset threshold, it sends its ruling as feedback to the triage agent, which then regenerates the revised triage hypothesis. The counterfactual attack and meta-arbitration are then executed again.
[0075] In this embodiment, the task-level counterfactual inference is executed for a maximum of 3 rounds, and the attack trigger threshold is set to 0.3. When the attack fails, the attack strength is lower than the threshold, or the maximum number of inference rounds is reached, the task-level counterfactual inference is terminated, and the current hypothesis is determined as the final triage result.
[0076] During the inference process, the main control module records the triage hypothesis and opposing evidence as nodes in the inference graph, and connects the corresponding nodes through the "refutation" and "correction" relationships.
[0077] S4. Construct a specialty task context and generate candidate specialty hypotheses.
[0078] The main control module combines the patient context and the final triage result to form the basic context for the specialty task. The medical knowledge retrieval module constructs specialty retrieval queries based on the patient's chief complaint, vital signs, present medical history, and final triage result, and retrieves knowledge such as referral criteria, organ system localization, dangerous diseases, and candidate specialties from the graph-structured medical knowledge base.
[0079] This embodiment uses a graph retrieval module based on the triplet pattern. The top five relevant knowledge items are retrieved for the specialty task, and the retrieved knowledge is marked as medical background knowledge. When the retrieved knowledge conflicts with the patient's facts, the patient's facts prevail.
[0080] The specialist agent first forms a baseline referral opinion based on the specialist task context, and then generates multiple candidate specialist hypotheses that can support, supplement, or challenge the baseline opinion. This embodiment generates four candidate specialist hypotheses, each of which includes at least: a specialist hypothesis identifier, a specialist name, an initial inference strength, case clues supporting the specialist, missing or weak case clues, and the clinical risks that may arise from omitting the specialist.
[0081] The main control module standardizes hypothesis identifiers and names, deletes empty and duplicate hypotheses, and creates a unique candidate identifier for each retained hypothesis.
[0082] S5. Perform candidate-level counterfactual game on the candidate specialty hypothesis.
[0083] The main control module establishes a separate candidate position agent for each specialty hypothesis. Each position agent is responsible for only one specialty hypothesis and can read the names of other hypotheses to compare their explanatory power for the patient's facts.
[0084] To avoid confusion between responses from different hypotheses during parallel processing, the main control module generates identity information for each agent request. This identity information includes at least a running identifier, a request identifier, a candidate identifier, an inference round, and a processing stage. Each agent's output must return the same identity information; outputs with inconsistent identities are identified as protocol anomalies.
[0085] Candidate-level counterfactual games include the following stages: (1) Argumentation stage: Based on patient facts and retrieval knowledge, the candidate position agent forms the strongest supporting opinion for the corresponding specialty hypothesis, and outputs the claim, supporting evidence, known weaknesses and support strength. Each piece of supporting evidence includes the patient field, the field value and its supporting role for the current specialty hypothesis.
[0086] (2) Counterfactual attack phase: The counterfactual agent attacks only the current single specialty hypothesis, checking whether the position opinion contains unfounded claims, whether it contradicts the patient's facts, whether it is overly specific, and whether other specialty hypotheses can better explain the same evidence. The counterfactual agent outputs counterfactual probes, opposing evidence, attack strength, unsupported hypotheses, and alternative explanations.
[0087] (3) Meta-decision stage: The meta-decision agent judges whether the counterfactual attack actually weakens the current specialty hypothesis and determines whether to retain, downgrade, or exclude it. Retrieved knowledge can only be used as clinical rules and cannot be used as new patient facts.
[0088] (4) Response stage: For specialty hypotheses that have not been excluded, the corresponding candidate position agent responds based on counterfactual attacks and meta-ruling opinions, outputting the accepted weaknesses, still valid supporting evidence, and response strength. For hypotheses that are determined to be excluded by the meta-ruling agent and whose attack strength reaches the threshold, the response stage is not required and they are marked as clinically excluded.
[0089] This embodiment performs one round of candidate-level counterfactual game on each specialty hypothesis. In other embodiments, two or more rounds of game can be performed depending on the complexity of the case.
[0090] After completing the candidate-level counterfactual game, the main control module first determines the validity status of each hypothesis. When a hypothesis has inconsistent identity information, incorrect output format, or lacks any of the necessary stages of argumentation, attack, adjudication, and response, it is marked as technically invalid; when the meta-adjudication agent makes an exclusion decision and the attack intensity reaches the threshold, it is marked as clinically excluded.
[0091] For specialist hypotheses that pass the validity check, their inference strength is calculated. This embodiment uses the following calculation method:
[0092] in, For the first The initial inference strength of the hypothesis, To strengthen the support for one's argument, To ensure the average intensity of the defense, The average net attack penalty confirmed by the original ruling. The proportion of strong counterfactual attacks.
[0093] The net attack penalty for a single round is calculated as follows:
[0094] in, For the first The hypothesis in the first... The effective attack strength confirmed by the judgment of the Wheel of Heaven. The strength of the defense is determined by the strength of the response. A defense can reduce the penalty for an attack, but it cannot restore a hypothesis that has been explicitly ruled out.
[0095] This embodiment includes hypotheses with an inference strength of at least 0.45 and that pass the validity check in the final aggregation. The meta-decision agent performs a global comparison of the hypotheses included in the aggregation to determine one or more necessary and independent specialist referral results. The final aggregation must not reintroduce hypotheses that have been excluded or failed the validity check.
[0096] S6. Construct the diagnostic context and generate candidate diagnostic hypotheses.
[0097] The main control module combines the patient context, final triage results, and specialist referral results obtained from S5 to form the basic context for the diagnostic task. The medical knowledge retrieval module constructs diagnostic retrieval queries based on the patient's chief complaint, vital signs, pain level, present medical history, laboratory test results, medication information, final triage results, and specialist referral results, and retrieves relevant diseases, high-risk missed diagnoses, supporting clues, exclusion clues, and key examination knowledge from the graph-structured medical knowledge base.
[0098] This embodiment uses a graph retrieval module based on the triplet pattern to retrieve the first eight relevant knowledge items for diagnostic tasks.
[0099] The diagnostic agent first forms a baseline diagnostic opinion, and then generates multiple candidate diagnostic hypotheses that can explain the current case. This embodiment generates four candidate diagnostic hypotheses, each of which includes a diagnostic identifier, a diagnostic name, an initial inference strength, supporting clues, missing or weak clues, and the risk of missed diagnosis.
[0100] S7. Perform a counterfactual game on candidate-level diagnoses and aggregate diagnostic auxiliary results.
[0101] The main control module establishes a diagnostic candidate position agent for each candidate diagnostic hypothesis and executes the candidate-level diagnostic counterfactual game in the order of argumentation, counterfactual attack, meta-decision, and response.
[0102] The diagnostic candidate-level counterfactual game employs the same identity binding, counterfactual attack, meta-judgment, and response protocol as S5. The difference lies in that the object of verification is the diagnostic hypothesis, and the attack content includes exclusionary evidence, missing key diagnostic conditions, contradictory check results, and alternative diagnoses with stronger explanatory power.
[0103] S8. Output auxiliary decision-making results and inferred trajectory.
[0104] The main control module outputs the final triage result, specialist referral result, and diagnostic assistance result. The output results also include the decision source, candidate inference strength, final decision opinion, and abnormal warning information.
[0105] The inference trajectory recording module stores the triage task map, specialty task map, and diagnostic task map respectively. Nodes in the task map include initial hypothesis nodes, candidate hypothesis nodes, argument nodes, opposing evidence nodes, response nodes, and final result nodes; nodes are connected by at least the following relationships: (1) "Support" relationship, which indicates the relationship between the candidate hypothesis and the content of the argument; (2) "Refutation" relationship, indicating that the adjudicated opposing evidence weakens the current hypothesis; (3) "Response" relationship, which means the candidate position agent's response to opposing evidence; (4) "Revision" relationship indicates that a task-level counterfactual attack prompts an update to the triage hypothesis; (5) “Selection” relationship, which represents the relationship between valid hypotheses and the final aggregation result.
[0106] Each node records the corresponding inference round, content, and inference strength, while each edge records the relationship type and relationship weight. Medical personnel can use the inference trajectory to verify why a particular specialty or diagnostic hypothesis is retained, downgraded, or excluded.
[0107] The diagnostic assistance results output in this embodiment are diagnostic assistance information for medical personnel to review, and do not directly replace the final clinical diagnosis or treatment decision made by medical personnel.
[0108] Example 2
[0109] like Figure 4As shown, this embodiment also provides a multi-agent emergency auxiliary decision-making system 100, which includes a master control orchestration module 101, a patient data and task context construction module 102, a knowledge support module 103, a triage reasoning module 104, a specialist reasoning module 105, a diagnostic reasoning module 106, a counterfactual verification module 107, a meta-decision module 108, and a result and inference trajectory output module 109.
[0110] System 100 runs on a computing device with one or more processors, memory, and data communication interfaces. The memory stores computer programs, emergency rules, case data, and medical knowledge data used to implement the functions of each module. The modules can be executed by the same processor or distributed across multiple communicating computing devices.
[0111] The patient data and task context construction module 102 receives electronic medical records, triage records, vital signs, chief complaints, present illness, past medical history, laboratory results, and imaging examination results. It then performs field extraction, unit standardization, missing status marking, and source marking on the data to generate a patient task context. The main control orchestration module 101 establishes a task identifier for the current processing procedure and records the current task type, hypothesis identifier, inference round, and processing stage.
[0112] The knowledge support module 103 provides relevant knowledge base based on the current task type. During the triage phase, the knowledge support module 103 retrieves similar cases and emergency triage rules; during the specialist referral phase, it retrieves specialist knowledge related to patient symptoms, potentially affected systems, and disease severity; during the diagnostic assistance phase, it retrieves disease knowledge related to patient symptoms, test results, imaging findings, and differential diagnosis. The search results are marked with source tags and written into the corresponding task context as external evidence.
[0113] The main control orchestration module 101 first calls the triage reasoning module 104. The triage reasoning module 104 generates the current triage hypothesis based on the patient's task context, similar cases, and emergency rules, and calls the counterfactual verification module 107 to generate task-level counterfactual attack information. The meta-adjudication module 108 adjudicates the counterfactual attack information; when the attack is valid and meets preset correction conditions, it returns correction feedback to the triage reasoning module 104 to update the current triage hypothesis; when the attack is invalid or meets the stopping conditions, the current triage hypothesis is determined as the final triage result.
[0114] After obtaining the final triage result, the master orchestration module 101 writes the patient task context and the final triage result into the specialty task context and calls the specialty reasoning module 105. The specialty reasoning module 105 generates a set of candidate specialty hypotheses and establishes a uniquely bound specialty position agent for each candidate hypothesis. Each specialty position agent generates supporting argument information for the corresponding hypothesis. The counterfactual verification module 107 generates candidate-level counterfactual attack information for each hypothesis. The meta-adjudication module 108 determines whether the attack is valid and the processing status of the hypothesis. Each specialty position agent generates a response based on the adopted opposing evidence. The specialty reasoning module 105 aggregates the valid states and inference strengths of each hypothesis to obtain the specialty referral result.
[0115] The main control orchestration module 101 further writes the patient task context, final triage result, and specialist referral result into the diagnostic task context and calls the diagnostic reasoning module 106. The diagnostic reasoning module 106 generates a set of candidate diagnostic hypotheses and, following the candidate-level counterfactual game process corresponding to the specialist reasoning stage, performs argumentation, counterfactual attack, meta-decision, and defense on each diagnostic hypothesis. The diagnostic reasoning module 106 aggregates these hypotheses based on their valid states, inference strength, and mutual explanatory power to obtain diagnostic assistance results or differential diagnostic assistance information.
[0116] The counterfactual verification module 107 and the meta-decision module 108 are jointly invoked by the triage reasoning module 104, the specialist reasoning module 105, and the diagnostic reasoning module 106. The counterfactual verification module 107 is responsible for proposing opposing evidence, missing key conditions, factual contradictions, or alternative interpretations; the meta-decision module 108, independent of the agent that proposes the current hypothesis, generates the attack validity status, attack strength, hypothesis handling decision, correction feedback, or aggregate ranking results based on the original argument, counterfactual attack, and response information.
[0117] The results and inference trajectory output module 109 outputs structured results of final triage, specialist referral, and diagnostic assistance, and saves the input and output data of each agent according to task level, hypothesis identifier, inference round, and processing stage. The inference trajectory includes the initial hypothesis, candidate hypothesis, supporting evidence, counterfactual attack, meta-decision, response content, hypothesis validity status, inference strength, and information transmission relationships between task levels, for medical personnel to query and verify.
[0118] The system 100 in this embodiment can be deployed on a local server or workstation in a medical institution, or it can be deployed in a controlled remote computing environment after the patient data has been anonymized. The information output by the system 100 is used to assist medical personnel in making emergency decisions, but does not replace the final clinical judgment made by medical personnel.
[0119] Example 3
[0120] To verify the feasibility and effectiveness of the emergency decision support method described in this invention on actual emergency case data, this embodiment uses emergency cases from the MIMIC-IV-Ext dataset for testing. The dataset contains 2200 patient records, and 200 cases were randomly selected for testing. Each record includes the patient's gender, age, chief complaint, pain level, initial vital signs, present medical history, examination results, and medication information, along with emergency triage, specialist referral, and diagnostic reference labels.
[0121] The experiment was conducted on a server configured with an NVIDIA A100 graphics processor, occupying one card. All agents shared a locally deployed Qwen2.5-7B-Instruct model, loaded with BF16 precision, with a maximum generation length of 1024 tags, random sampling disabled, greedy decoding employed, and a random seed of 42. Medical knowledge retrieval used a graph-structured knowledge retrieval method, with the Qwen3-Embedding-4B embedding model.
[0122] The following indicators were used to evaluate the test results in this embodiment: (1) Triage matching accuracy, which represents the proportion of cases whose predicted ESI level is completely consistent with the reference ESI level; (2) Triage range accuracy rate, which represents the proportion of cases where the predicted ESI level is consistent with the reference level, or the predicted result is one level higher than the reference level. The smaller the ESI value, the higher the urgency. (3) Specialty referral matching accuracy: The first three specialty referral results output by the system are strictly matched one-to-one with the reference labels. The number of strict matches is divided by the smaller of the number of reference labels and 3 to obtain the single case matching score. The average is then calculated for all evaluable cases. (4) Specialty referral accuracy rate, which represents the proportion of cases in which at least one of the first three specialty referral results output by the system is strictly consistent with the reference label; (5) Diagnostic matching accuracy is calculated using the same strict matching method as that used for specialist referral matching accuracy; (6) Diagnostic range accuracy rate, which represents the proportion of cases in which at least one of the first three diagnostic results output by the system is strictly consistent with the reference diagnosis, or in which there is a predetermined hierarchical relationship between the system and the reference diagnosis.
[0123] The test results are shown in Table 1:
[0124] The test results above show that the method of the present invention can sequentially complete emergency triage, specialist referral and diagnostic assistance tasks in a local computing environment supported by a single graphics processor, and form an inference trajectory including candidate hypotheses, supporting evidence, counterfactual attacks, meta-decision, response and final result, thereby verifying the feasibility of the method of the present invention and its ability to perform structured and traceable reasoning on the emergency auxiliary decision-making process.
[0125] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, 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, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element.
[0126] The various embodiments in this specification are described in a related manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. An emergency decision support method based on multi-agent hierarchical counterfactual inference, characterized in that, The steps include the following: S1. Obtain the patient's electronic medical data that has been entered or stored, extract and standardize the fields of the patient's electronic medical data, and construct the patient task context; S2 retrieves similar case information from the case knowledge base based on the patient task context and obtains emergency triage rules. The triage agent then generates initial triage hypotheses based on the patient task context, similar case information, and emergency triage rules. S3 The counterfactual verification agent generates task-level counterfactual attack information for the current triage hypothesis, and the meta-adjudication agent adjudicates the task-level counterfactual attack information according to the patient task context and emergency triage rules; when the adjudication result indicates that the counterfactual attack is valid, a correction feedback is generated according to the adjudication result, and the triage agent updates the current triage hypothesis according to the correction feedback. Repeat the counterfactual attack, adjudication and update until the counterfactual attack is not valid or the preset termination condition is met, and obtain the final triage result; S4 Constructs a specialist task context based on the patient task context and the final triage result, and the specialist agent generates multiple candidate specialist hypotheses based on the specialist task context to form a candidate specialist hypothesis set; S5 establishes a corresponding specialty stance agent for each candidate specialty hypothesis in the candidate specialty hypothesis set. Each specialty stance agent generates assertion information for the corresponding candidate specialty hypothesis. The counterfactual verification agent generates counterfactual attack information against each assertion information. The meta-adjudication agent adjudicates each counterfactual attack information, and the corresponding specialty stance agent generates response information based on the adjudication result. Based on the validity status and inference strength of each candidate specialty hypothesis, validity screening, inference strength threshold screening, and global ranking are performed on each candidate specialty hypothesis to obtain the specialty referral result. S6 Constructs a diagnostic task context based on the patient task context, final triage result, and specialist referral result. The diagnostic agent generates multiple candidate diagnostic hypotheses based on the diagnostic task context to form a candidate diagnostic hypothesis set. S7 establishes a corresponding diagnostic stance agent for each candidate diagnostic hypothesis in the candidate diagnostic hypothesis set. Each diagnostic stance agent sequentially performs argumentation, accepts counterfactual attacks, and responds. The meta-adjudication agent adjudicates the counterfactual attacks. Based on the validity status and inference strength of each candidate diagnostic hypothesis, validity screening, inference strength threshold screening, and global ranking are performed on each candidate diagnostic hypothesis to obtain diagnostic assistance results. S8 outputs the final triage results, specialist referral results, and diagnostic assistance results, and outputs the inference trajectory used to characterize the hypotheses, counterfactual attacks, adjudications, corrections, responses, and aggregation relationships at each stage.
2. The method according to claim 1, characterized in that, Step S2, which involves retrieving similar case information, includes: calculating a comprehensive similarity based on at least two of the following: textual similarity between the patient's chief complaint and the case's chief complaint; numerical similarity between the patient's vital signs and the case's vital signs; pain level similarity; and similarity of vital sign risk status. Cases in the case knowledge base are then sorted according to the comprehensive similarity to obtain a preset number of similar case information. When similar case information conflicts with emergency triage rules, the emergency triage rules are used as the priority for generating initial triage hypotheses.
3. The method according to claim 1, characterized in that, The task-level counterfactual attack information mentioned in step S3 includes at least one of the following: patient data fields that conflict with the current triage assumption, emergency triage rules that conflict with the current triage assumption, counterfactual detection problems, attack strength, and suggested correction information; The meta-decision agent determines whether the counterfactual attack information is valid based on whether it originates from the patient's task context, upstream task output, or emergency triage rules, and outputs the attack status, calibrated attack strength, and correction feedback.
4. The method according to claim 1, characterized in that, The preset termination conditions in step S3 include at least one of the following: the meta-judgment agent determines that the counterfactual attack is not valid; the calibrated attack strength is lower than the preset attack strength threshold; the number of completed counterfactual inference rounds reaches the preset maximum number of rounds.
5. The method according to claim 1, characterized in that, Each position agent is bound to a unique candidate hypothesis and generates assertion information and response information only for the bound candidate hypothesis; the assertion information includes supporting claims, supporting evidence and supporting confidence, and each position agent receives other candidate hypotheses in the same set of candidate hypotheses as competing explanatory information.
6. The method according to claim 1, characterized in that, The argumentation, counterfactual attack, meta-decision, and response for each candidate hypothesis are associated with a request identifier, hypothesis identifier, inference round, and processing stage, respectively. After receiving the corresponding processing result, a consistency check is performed on the request identifier, hypothesis identifier, inference round, and processing stage, and processing results that fail the consistency check are marked as protocol execution failures.
7. The method according to claim 1, characterized in that, The valid states in steps S5 and S7 are determined based on the following conditions: the corresponding candidate hypothesis has completed the argumentation, counterfactual attack, meta-decision, and rebuttal; and the outputs of each stage pass format validation and identity association validation. The meta-judgment agent did not determine the corresponding candidate hypothesis as being overturned by strong rebuttal based on a counterfactual attack of preset strength.
8. The method according to claim 1, characterized in that, In steps S5 and S7, the inference strength of the candidate hypothesis is calculated based on the prior confidence of the candidate hypothesis, the confidence of the argument support, the response strength, the strength of the valid attack confirmed by the meta-judgment agent, and the proportion of strong attack rounds. The response strength is used to reduce the reduction in inference strength caused by the valid attack, but does not eliminate the counterfactual evidence already confirmed by the meta-judgment agent, and does not restore the candidate hypothesis that has been judged to be overturned by strong counter-evidence.
9. The method according to claim 1, characterized in that, The global ranking and the generation of specialist referral results or diagnostic assistance results based on the global ranking in steps S5 and S7 include: determining only candidate hypotheses with a valid state and an inference strength not lower than a preset inference strength threshold as admission candidates; ranking the admission candidates from high to low inference strength, and having the meta-decision agent perform a global comparison based on the supporting evidence, counterfactual attacks, decision results, and response information corresponding to each admission candidate to generate a decision to retain, downgrade, or exclude each admission candidate; retaining the admission candidate with the higher global ranking for multiple admission candidates that correspond to the same clinical interpretation and constitute a mutually substitutable relationship; allowing multiple admission candidates that have independent case fact support and are independent in clinical interpretation to be retained simultaneously; generating the specialist referral results or diagnostic assistance results from the admission candidates determined to be retained according to a preset output quantity; wherein, the meta-decision agent can only select candidate hypotheses from the admission candidates, and the result generation process must not reintroduce candidate hypotheses with a valid state of invalidity or an inference strength lower than the preset inference strength threshold.
10. The method according to claim 8, characterized in that, For step S5 or step S7 The strength of the inference of the candidate hypotheses Calculate according to the following formula: in, For the first The initial inference strength of the hypothesis, To strengthen the support for one's argument, To ensure the average intensity of the defense, The average net attack penalty confirmed by the original ruling. The proportion of strong counterfactual attacks. The first The candidate hypothesis is in the... Net attack penalty in counterfactual games Calculate according to the following formula: in, For the first The hypothesis in the first... The effective attack strength confirmed by the judgment of the Wheel of Heaven. To respond to the strength of the argument.
11. An emergency auxiliary decision-making system based on multi-agent hierarchical counterfactual inference, characterized in that, include: The main control orchestration module is used to call each functional module in the hierarchical order of triage, specialist referral and diagnostic assistance, and to pass the final triage result to the specialist reasoning module, and pass the final triage result and specialist referral result to the diagnostic reasoning module. The patient data and task context construction module is used to acquire the recorded or stored patient electronic medical data, extract and standardize the fields of the patient electronic medical data, and construct the patient task context. The knowledge support module is used to retrieve similar case information, obtain emergency triage rules, and obtain the medical knowledge required for specialist referral and diagnosis based on the patient task context. The triage reasoning module is used to generate initial triage hypotheses based on the patient task context, similar case information and emergency triage rules, and obtain the final triage result through counterfactual attacks, meta-decision and feedback correction. The specialty reasoning module is used to construct a specialty task context based on the patient task context and the final triage result, generate multiple candidate specialty hypotheses, establish a corresponding specialty stance agent for each candidate specialty hypothesis, and obtain the specialty referral result through argumentation, counterfactual attack, meta-decision, and defense. The diagnostic reasoning module is used to construct a diagnostic task context based on the patient task context, final triage result and specialist referral result, generate multiple candidate diagnostic hypotheses, establish a corresponding diagnostic stance agent for each candidate diagnostic hypothesis, and obtain diagnostic auxiliary results through argumentation, counterfactual attack, meta-decision and defense. The counterfactual verification module is used to generate counterfactual attack information against triage hypothesis, candidate specialty hypothesis, and candidate diagnosis hypothesis. The meta-decision module is used to adjudicate the counterfactual attack information and generate at least one of the following: attack establishment status, attack strength, hypothesis handling decision, and correction feedback. The Results and Inference Trajectory Output Module is used to output the final triage results, specialist referral results, diagnostic assistance results, and corresponding inference trajectories.
12. The system according to claim 11, characterized in that, The triage reasoning module includes a triage hypothesis generation unit and a feedback correction unit; the triage hypothesis generation unit is used to generate the current triage hypothesis; the counterfactual verification module and the meta-adjudication module are used to sequentially perform task-level counterfactual attacks and adjudications on the current triage hypothesis; The feedback correction unit is used to transmit the correction feedback generated by the meta-judgment module to the triage hypothesis generation unit when the attack is established and the attack strength reaches the preset attack strength threshold, so as to update the current triage hypothesis.
13. The system according to claim 11, characterized in that, The specialist reasoning module and the diagnostic reasoning module respectively include a hypothesis generation unit, a position agent construction unit, a game execution unit, and an aggregation unit. The hypothesis generation unit is used to generate multiple candidate hypotheses at runtime. The position agent construction unit is used to establish a position agent uniquely bound to each candidate hypothesis. The game execution unit is used to enable each position agent to perform argumentation, accept counterfactual attacks, and respond. The aggregation unit is used to eliminate candidate hypotheses that fail the validity check or are excluded by the meta-adjudication module, select candidate hypotheses with inference strength not lower than a preset aggregation threshold from the remaining candidate hypotheses to form an admission candidate set, sort the admission candidate set according to inference strength, and call the meta-adjudication module to perform a global comparison of the admission candidate set to generate corresponding specialist referral results or diagnostic assistance results.
14. The system according to claim 11, characterized in that, The counterfact verification module and the meta-decision module are shared functional modules of the triage reasoning module, the specialist reasoning module, and the diagnostic reasoning module. The counterfact verification module generates task-level counterfactual attack information for the current triage hypothesis in the triage stage according to the current task type, and generates hypothesis-level counterfactual attack information for each candidate hypothesis in the specialist referral stage and the diagnostic assistance stage.
15. The system according to claim 11, characterized in that, The result and inference trajectory output module is used to record the input and output data of each agent according to the task level, hypothesis identifier, inference round and processing stage, and to construct a directed graph including hypothesis nodes, counterfactual evidence nodes and response nodes to represent the support, rebuttal, response and correction relationships between the outputs of each agent.