Construction method and system of traditional Chinese medicine intelligent agent driven by syndrome knowledge graph

CN122840264APending Publication Date: 2026-09-29XUZHOU MEDICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611327779.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0006]本发明的一个目的在于提出证候知识图谱驱动的中医智能体构建方法及系统,针对多源异构证候数据统一表示、复杂证候关系不确定性推理、动态多轮问诊以及结果可追溯的问题,采用多源记录保留来源与时间信息并按证候本体对齐,形成带方向和可靠性的冲突证据集合;在带时间边和证据属性的异构证候图上进行关系类型化消息传递、概率因子更新、证据区间传播及时序分层记忆更新;依据模拟回答分支的区间熵下降上下界、鉴别度、禁忌、重复度和患者负担约束求解下一问;将回答和医生修正写入不可变图谱事件日志并循环更新;在生成前回放事件日志与可重现快照进行一致性校验,校验失败时回退快照,校验通过时仅依据证据子图生成证候排序、问题记录、置信度和推理路径,并标注待确认结论

Benefits of technology

[0038]1、通过来源、时间、原始指针保留以及证候本体对齐和冲突证据集合,统一多源异构证候数据并保留证据方向与可靠性,减少信息覆盖造成的依据丢失。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840264A_ABST
    Figure CN122840264A_ABST
Patent Text Reader

Abstract

The application discloses a syndrome knowledge graph driven traditional Chinese medicine intelligent agent construction method and system, belongs to the field of traditional Chinese medicine informatics and artificial intelligence, and is used for solving the problems that multi-source heterogeneous syndrome data is difficult to be uniformly represented, complex syndrome relations and uncertainty are difficult to be reasoned, and the inquiry result lacks a graph basis and a traceable path. Through multi-source syndrome data ontology alignment, heterogeneous syndrome graph construction with time edges and evidence attributes, evidence interval propagation and time sequence hierarchical memory updating, in combination with simulation answer branches and constrained next question solving, and by using an immutable graph event log playback verification and snapshot rollback, syndrome sorting and reasoning paths are generated, integrated processing of syndrome reasoning, dynamic multi-round inquiry and result tracing is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of traditional Chinese medicine informatics and artificial intelligence, and in particular to a method and system for constructing TCM intelligent agents driven by syndrome knowledge graphs. Background Technology

[0002] Existing TCM auxiliary diagnostic systems typically receive medical history, symptoms, tongue appearance, pulse diagnosis, and laboratory records, and perform syndrome analysis using rule bases, statistical models, or knowledge graphs. While these systems can perform structured processing on some of the data, differences exist between data from different sources in terms of entity naming, synonyms, hierarchical relationships, dimensions, and data collection time.

[0003] When multiple sources give inconsistent values ​​for the same symptom element, existing systems usually use single-value coverage, static weighting, or simple averaging to handle the situation. This makes it difficult to retain the direction of support and opposition, the reliability of the sources, and the changes over time, and therefore cannot stably express complex symptom relationships and their uncertainties.

[0004] In addition, existing intelligent consultation agents mostly generate questions according to fixed questionnaires or single-round matching methods, lacking a mechanism to dynamically select the next question based on the posterior of the current candidate syndrome interval; the generated results often only give conclusions and cannot be traced back to specific evidence edges and event versions, making it difficult to reproduce the reasoning process after the doctor's correction.

[0005] Therefore, there is a need for a method and system for constructing TCM intelligent agents driven by syndrome knowledge graphs that can overcome the shortcomings of the existing technologies. Summary of the Invention

[0006] One objective of this invention is to propose a method and system for constructing a TCM intelligent agent driven by a syndrome knowledge graph. Addressing the challenges of unified representation of multi-source heterogeneous syndrome data, uncertain reasoning regarding complex syndrome relationships, dynamic multi-round consultations, and traceable results, the invention employs multi-source records that retain source and temporal information and align them according to the syndrome ontology, forming a set of conflicting evidence with direction and reliability. On the heterogeneous syndrome graph with temporal edges and evidence attributes, relational typological message passing, probability factor updates, evidence interval propagation, and time-series hierarchical memory updates are performed. The next question is solved based on the upper and lower bounds of the interval entropy decrease in the simulated answer branch, discrimination, contraindications, repetition, and patient burden constraints. Answers and doctor corrections are written to an immutable graph event log and updated cyclically. Before generation, the event log is replayed and consistent with a reproducible snapshot; if the check fails, the snapshot is rolled back; if the check passes, only the syndrome ranking, question record, confidence level, and reasoning path are generated based on the evidence subgraph, and the conclusion to be confirmed is marked.

[0007] This invention provides a method for constructing a TCM intelligent agent driven by a syndrome knowledge graph, comprising:

[0008] S1. Receives multi-source medical history, symptoms, tongue appearance, pulse appearance and test records, retains the source identifier and collection time of each record, aligns entities, synonyms, hierarchical relationships and dimensions according to the preset syndrome ontology, and organizes conflicting values ​​of the same syndrome element into a set of evidence with direction identifier and reliability identifier, and outputs a standardized syndrome event set and a set of conflicting evidence.

[0009] S2. Construct a heterogeneous syndrome graph with time edges and evidence attributes based on the standardized syndrome event set and conflict evidence set. Encode each supporting and opposing evidence as an evidence interval with lower and upper bounds and a reliability level. Perform relation-typed message passing, probability factor update, evidence interval propagation and temporal hierarchical memory update on the heterogeneous syndrome graph. Output the interval posterior, conflict marker, contribution edge and corresponding evidence subgraph of the candidate syndrome.

[0010] S3. For the candidate syndrome, generate simulated answer branches for candidate questions, and based on the lower and upper bounds of the interval entropy decrease and the discrimination of each simulated answer branch for the interval posterior, solve the next question in combination with taboo constraints, and output the next question and its branch evaluation results.

[0011] S4. Receive the patient's answer and the doctor's correction for the next question, write the patient's answer and the doctor's correction as timestamped graph events into the immutable graph event log, update the heterogeneous syndrome diagram, evidence interval and temporal hierarchical memory according to the graph events, and repeat S2 to S4 until the preset stop condition is met.

[0012] S5. After the preset stopping condition is met, the immutable graph event log is replayed and a consistency check is performed with the reproducible snapshot. If the check fails, the process reverts to the reproducible snapshot. If the check passes, only the evidence subgraph that has passed the check is used to generate the syndrome ranking, problem record, confidence level and reasoning path, and conclusions that lack sufficient evidence are marked as pending confirmation.

[0013] Optionally, S1 includes:

[0014] The source identifier includes at least the data source category and the identification of the acquisition device or input terminal; the acquisition time is converted to a unified time base; and the unit alignment includes converting similar test records to the same unit of measurement.

[0015] For conflicting values, directed evidence edges are established according to the supporting or opposing direction, and the source reliability level is associated with each evidence edge. The original data pointer is also saved for each record.

[0016] Optionally, S2 includes:

[0017] The lower and upper bounds of the evidence interval represent the conservative and relaxed boundaries of the degree of support for the candidate syndrome corresponding to the evidence, respectively. The reliability level is jointly determined by the reliability of the source, the integrity of the data, and the doctor's correction status.

[0018] Interval messages of the same relation type are weighted according to the aforementioned reliability level, and time decay is applied to historical messages based on the time edge;

[0019] Furthermore, the time-series hierarchical memory includes the current consultation layer, the past medical history layer, and the long-term physical condition layer. During message transmission, evidence is aggregated in each layer and updated through cross-layer connections with time edges.

[0020] When the overlap between the supporting evidence interval and the opposing evidence interval exceeds a preset overlap threshold, the conflict marker is generated, and the contributing edge that caused the conflict is retained.

[0021] Optionally, S3 includes:

[0022] The upper and lower bounds of the interval entropy decrease are calculated based on the interval posterior before and after each simulated response branch update, and the discrimination is determined by the degree of separation of the posterior intervals of different candidate symptoms under each simulated response branch.

[0023] When the difference between the upper and lower bounds of the interval entropy decrease is less than a preset similar threshold, problems that can cover evidence gaps with an interval width not less than a preset gap width threshold are preferentially selected, and problems that trigger taboo constraints are eliminated.

[0024] Furthermore, when solving the next question, repeatability constraints and patient burden constraints are further adopted. The repeatability constraints are determined based on the question text fingerprint and the semantic merging results of the queried questions. The patient burden constraints are determined based on the expected response time, the number of operations required, and the types of inputs available to the patient.

[0025] When the initial candidate question set is empty, stop asking questions and output a "transfer to manual" flag. When there are questions that do not trigger the contraindication constraint, remove questions that violate the repetition constraint or patient burden constraint and select the next question from the remaining questions. When the removed question set is empty or all candidate questions trigger the contraindication constraint, stop asking questions and output a "transfer to manual" flag.

[0026] Optionally, S4 includes:

[0027] The graph events shall at least record the event type, event content summary, source entity, timestamp, graph snapshot identifier before modification, graph snapshot identifier after modification, evidence subgraph reference identifier, and evidence subgraph version identifier;

[0028] Doctor corrections and patient responses are written as different event types into the immutable graph event log, and replayed in the order of event timestamps to update the evidence intervals and candidate symptom posteriors.

[0029] Optionally, S5 includes:

[0030] The consistency check compares at least the order of the event logs, the event summary check value, the graph snapshot identifier, and the evidence subgraph reference identifier. The evidence subgraph reference identifier is associated with the evidence subgraph output by S2 and corresponds to the evidence subgraph version identifier.

[0031] Write the comparison result of the consistency check, the evidence subgraph reference identifier, and the evidence subgraph version identifier into the audit record. When the check fails, the output of the syndrome sorting without playback is prohibited, and the reason for failure and the rollback snapshot identifier are written into the audit record.

[0032] Furthermore, the preset stopping conditions include at least one of the following: the upper and lower bounds of the interval posterior are less than a preset width threshold, the upper bound of the interval entropy decrease in the next question for two consecutive rounds is less than a preset decrease threshold, the maximum number of consultation rounds is reached, the doctor actively terminates the consultation, and a manual transfer marker is received. The evidence subgraph integrity verification includes the consistency verification.

[0033] When the interval width of the interval posterior is not less than the preset width threshold, the maximum number of consultation rounds is reached, the doctor actively terminates the consultation, or a manual transfer flag is received, the corresponding conclusion is marked as pending confirmation.

[0034] When generating the syndrome ranking, the contribution edge identifier and evidence subgraph version identifier corresponding to each ranking position are output simultaneously.

[0035] On the other hand, the present invention also provides a TCM intelligent agent system driven by syndrome knowledge graph, comprising:

[0036] The module for multi-source syndrome access and ontology alignment receives multi-source records and outputs a standardized syndrome event set and a conflict evidence set. The module for heterogeneous syndrome graph construction and interval propagation constructs a heterogeneous syndrome graph with time edges and evidence attributes and outputs interval posteriors, conflict markers, contribution edges, and evidence subgraphs. The module for solving consultation questions outputs the next question based on simulated answer branches, upper and lower bounds of interval entropy decrease, discrimination, contraindication constraints, repetition constraints, and patient burden constraints. The module for event write-back and temporal memory update receives patient answers and doctor corrections and updates the heterogeneous syndrome graph, evidence intervals, and immutable graph event log. The module for replay verification and traceability generation replays the graph event log, performs consistency verification, and generates syndrome ranking, question records, confidence levels, and inference paths based on the verified evidence subgraphs.

[0037] The beneficial effects of this invention are:

[0038] 1. By preserving the source, time, and original pointers, as well as aligning the symptom ontology and set conflicting evidence, we can unify multi-source heterogeneous symptom data and preserve the direction and reliability of evidence, thereby reducing the loss of evidence caused by information overlay.

[0039] 2. By using evidence interval propagation and time-layered memory to update the upper and lower bounds of supporting and opposing evidence, and outputting conflict markers and contribution edges, it can provide interpretable candidate symptom interval posteriors when uncertainty exists.

[0040] 3. By simulating the solution of the constrained next question in the answer branch and verifying the replay of the immutable event log, the consultation process can be dynamically looped, and the final result can be traced back to the evidence subgraph and the reproducible snapshot. Attached Figure Description

[0041] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0042] Figure 1 This is a flowchart of the method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to the present invention.

[0043] Figure 2 This is a flowchart of the present invention S3 for solving the next question based on simulated answer branches and multiple constraints. Detailed Implementation

[0044] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0045] refer to Figures 1-2 A method for constructing TCM intelligent agents driven by syndrome knowledge graphs, including:

[0046] S1. Receives multi-source medical history, symptoms, tongue appearance, pulse appearance and test records, retains the source identifier and collection time of each record, aligns entities, synonyms, hierarchical relationships and dimensions according to the preset syndrome ontology, and organizes conflicting values ​​of the same syndrome element into a set of evidence with direction identifier and reliability identifier, and outputs a standardized syndrome event set and a set of conflicting evidence.

[0047] S2. Construct a heterogeneous syndrome graph with time edges and evidence attributes based on the standardized syndrome event set and conflict evidence set. Encode each supporting and opposing evidence as an evidence interval with lower and upper bounds and a reliability level. Perform relation-typed message passing, probability factor update, evidence interval propagation and temporal hierarchical memory update on the heterogeneous syndrome graph. Output the interval posterior, conflict marker, contribution edge and corresponding evidence subgraph of the candidate syndrome.

[0048] S3. For the candidate syndrome, generate simulated answer branches for candidate questions, and based on the lower and upper bounds of the interval entropy decrease and the discrimination of each simulated answer branch for the interval posterior, solve the next question in combination with taboo constraints, and output the next question and its branch evaluation results.

[0049] S4. Receive the patient's answer and the doctor's correction for the next question, write the patient's answer and the doctor's correction as timestamped graph events into the immutable graph event log, update the heterogeneous syndrome diagram, evidence interval and temporal hierarchical memory according to the graph events, and repeat S2 to S4 until the preset stop condition is met.

[0050] S5. After the preset stopping condition is met, the immutable graph event log is replayed and a consistency check is performed with the reproducible snapshot. If the check fails, the process reverts to the reproducible snapshot. If the check passes, only the evidence subgraph that has passed the check is used to generate the syndrome ranking, problem record, confidence level and reasoning path, and conclusions that lack sufficient evidence are marked as pending confirmation.

[0051] In this specific embodiment, S1 includes:

[0052] In this embodiment, the outpatient TCM intelligent agent executes S1 through the multi-source syndrome access module, receiving medical history and symptom records from the electronic medical record, tongue features output from the tongue image acquisition terminal, pulse waveform summary output from the pulse image acquisition device, and test records output from the testing system; each input is first written into the original record buffer, including record identifier, data source category, acquisition device or input terminal identifier, patient anonymity identifier, original data pointer, and acquisition time, and the record identifier is used as a stable association key between subsequent standardized events and original data;

[0053] The access module converts the timestamps of different devices into a unified Coordinated Universal Time (UTC) reference and stores the source time zone, device clock offset, converted time, and calibration version in the time conversion table. When the clock offset of the pulse device is 180ms, the corresponding offset is subtracted from the device time to obtain the unified time. If the time field is missing or the offset exceeds 500ms, the original time is retained and the time reliability flag is set to pending correction, and the estimated time is not overwritten with the original value.

[0054] The ontology alignment module loads the syndrome ontology, thesaurus, hierarchical relationship table, and dimensional conversion table of version TCM-Onto-3.2. It searches for entity mapping keys according to data source category and field path, merges bitter taste in the mouth and bitter taste in the mouth into the same syndrome element node, and maps tongue appearance, pulse appearance, and test fields to tongue color, pulse rate, and test index entities respectively. Test values ​​of the same type are uniformly converted to standard units of measurement. The conversion table records the input unit, output unit, proportional coefficient, bias, effective range, and version number. Records that exceed the effective range retain their original values ​​and are marked as abnormal and do not participate in automatic conversion.

[0055] The alignment module generates a syndrome event object for each standardized record. The syndrome event object includes at least an event identifier, a syndrome element identifier, a normalized value, a value unit, a collection time, a source identifier, an original data pointer, an alignment version, and a data integrity bitmap. When multiple values ​​for the same patient and the same syndrome element appear in adjacent collection windows, all records are sorted by collection time and all records are retained. The latest value is not used to overwrite the historical value. The source and time fields of these records are used for subsequent conflict handling.

[0056] For opposite values ​​of the same syndrome element, the conflict resolver establishes directed evidence edges based on the direction of the value's effect on the candidate syndrome. Edges supporting the candidate syndrome are denoted as "support," and edges reducing the candidate syndrome are denoted as "oppose." Source reliability is jointly determined by the data source category benchmark, data integrity, and doctor correction status. Reliability is calculated using the formula... ,in Indicates the first The reliability of the evidence is dimensionless. Indicates the reliability of the source category benchmark, is dimensionless, and is limited to 0 to 1. This represents the data integrity percentage and has a value between 0 and 1. This indicates that the doctor's adjusted state coefficient is dimensionless. This represents a cutoff function that restricts the result to the interval between 0 and 1; Read from the reliability baseline field of the source reliability table. After reading, perform a 0 to 1 range check first. If the range is exceeded, fall back to the versioned default baseline of the data source category and record the out-of-range flag. The three parameters are stored in the source reliability table and updated according to the ontology version. Doctor-confirmed records set the doctor correction status coefficient to 1, while unconfirmed automatic collection records set the coefficient to 0.8.

[0057] The conflict evidence set uses evidence set identifiers to aggregate supporting and opposing edges of the same symptom element. Each edge carries direction, reliability level, standardized value, original data pointer, and time reliability bit. The key of the source reliability table is the data source category, device model, and input terminal type, and the value fields are reliability benchmark, missing penalty, and valid time. The table version is written into the batch metadata.

[0058] When the standardized values ​​of the same symptom element come from different sources and are in opposite directions, the module does not perform single-value overwriting, but instead forms an ordered list of evidence edges according to the collection time, and writes the earliest record, the latest record and their differences into the conflict summary; when the time difference between two records is less than the threshold of the same collection window, the two edges are retained and the window identifier is written into the evidence set for S2 to process according to the time edge.

[0059] For records that cannot complete entity mapping, unit conversion, or time correction, the module still generates pending events with exception reasons and isolates them into an exception queue. The exception queue records the failure field, the original data pointer, the number of retries, and the manual processing status. Exception events do not participate in the candidate syndrome ranking, but their references are retained in the audit output of S5 to prevent exception inputs from being silently discarded.

[0060] The original data pointer of each record is composed of an object identifier and byte range stored in an immutable object storage. The pointer check value is saved at the same time as the standardized record. When the source withdraws or re-uploads data, only a replacement record is added and the pointer relationship between the two is established. The written symptom events are not modified, so that S2 and S5 can distinguish the original value, the replacement value and their effective time.

[0061] After alignment is completed, the module writes the standardized syndrome event set into the syndrome event table, writes the conflict evidence set into the conflict evidence table, and generates the ontology version, conversion table version, and batch verification value. The standardized syndrome event set serves as the node and initial evidence input of S2, and the conflict evidence set serves as the source for S2 to establish supporting edges, opposing edges, and contributing edges. Both sets are associated through batch identifiers and patient anonymity identifiers.

[0062] In this specific embodiment, S2 includes:

[0063] The heterogeneous syndrome diagram module reads the standardized syndrome event set and conflict evidence set output by S1, and establishes six types of nodes: patient, syndrome element, candidate syndrome, test index, tongue appearance feature and pulse appearance feature. It also saves the node identifier, entity type, standardized value, unit, source set, first appearance time, last update time and ontology version for each node. Only one event node is retained in the diagram for the same event, and the original data pointer is passed on as the node attribute.

[0064] The module generates directed edges based on the hierarchical, synonymous, supporting, and opposing relationships of the symptom ontology. Edge attributes include relationship type, event identifier, timestamp, evidence direction, reliability level, lower bound of the interval, upper bound of the interval, contribution value, and evidence subgraph version. For each supporting and opposing piece of evidence, its degree of support for the candidate symptom is encoded as an interval. ,in Indicates the edge of the evidence Support range, This indicates a conservative support boundary that is dimensionless. This indicates a loosely supported boundary and is dimensionless. Represent the evidence edge index and satisfy... The interval is determined by the source reliability table, the data integrity bitmap, and the doctor's correction status.

[0065] Messages of the same relation type are first weighted according to their reliability level, and then decayed according to time. Message weights use... ,in This represents the edge message weight, which is dimensionless. This indicates the edge reliability read from the evidence edge reliability field and limited to 0 to 1. This represents the time decay coefficient read from the time decay parameter table and limited to non-negative values, expressed in reciprocals of each day. This represents the non-negative time difference obtained by subtracting the evidence timestamp from the current consultation time, with the unit being days. This represents an exponential function; when the evidence timestamp is later than the current consultation time, the timestamp is missing, or the time difference exceeds the valid range of the parameter table, it will... The time decay coefficient is truncated to 0 or the maximum number of days in the parameter table, and a time anomaly flag is written. The time decay coefficient is obtained from the time decay parameter table according to the relationship type and syndrome level. The parameter table provides a non-negative valid range, version number and update date. When a relationship type record is missing, the default value of the same level is used and written to the parameter default flag.

[0066] In each round of message passing, the interval propagation module calculates the conservative and relaxed posterior of candidate evidence. Supporting edges of the same type are weighted and limited to the range of 0 to 1, while opposing edges are deducted from the support quantity. Each relation type message undergoes feature dimension alignment in a relation-specific transformer. The transformer's input fields are source node type, target node type, relation type, and time difference, and its output fields are the interval message, the set of source edges, and the updated version. When a candidate evidence has no available input edges and a reproducible snapshot exists, the posterior interval uses the previous version from the snapshot and adds a missing evidence flag. When the session executes S2 for the first time and there is no previous version snapshot, an initial zero-support interval is established for the candidate evidence, and a missing evidence status is set. S3 accordingly prohibits it from being considered a sufficient evidence candidate and outputs "forwarded to manual marking" when there are no other questions to ask.

[0067] The temporal hierarchical memory consists of the current consultation layer, the past medical history layer, and the long-term constitution layer. It is stratified according to the non-negative time difference between the current consultation time and the evidence timestamp using mutually exclusive half-open intervals: the current consultation layer stores evidence with a time difference of less than seven days, the past medical history layer stores evidence with a time difference of greater than or equal to seven days and less than two years, and the long-term constitution layer stores stable constitution evidence with a time difference of greater than or equal to two years; events with missing timestamps or in a state of pending correction are used in the abnormal queue of S1 instead of being directly stratified; intra-layer aggregation only merges messages in the same layer and with the same relationship type, and cross-layer updates are completed through cross-layer connections with time edges. The cross-layer connection records the source layer, target layer, time decay coefficient, and update round to prevent long-term constitution evidence from directly overwriting current consultation evidence;

[0068] The collision detector calculates the overlap between the support and opposition intervals separately, and the overlap width is determined using... ,in This represents the overlap width and is dimensionless. This represents the supporting evidence interval obtained from the same round of interval updates. This represents the interval of opposing evidence obtained from the same round of interval updates. , , and All use the same support scale from 0 to 1 and satisfy the following conditions: and The set of source edges and updated versions of the interval endpoints are written into the interval record. and These represent taking the smaller value and taking the larger value, respectively. When any interval is missing or the endpoints are reversed, the current round of overlap calculation is abandoned and the interval from the previous round is used. At the same time, an interval anomaly flag is written. When the overlap width is greater than the overlap threshold queried by syndrome level in the conflict parameter table, a conflict flag is generated, and the supporting edge and opposing edge that caused the overlap are written into the contribution edge table.

[0069] After interval propagation is completed, the module updates the posterior intervals of candidate syndromes according to the probability factor table. The keys of the probability factor table are syndrome elements, relation types, and syndrome levels, and the value fields are supporting factors, opposing factors, truncation ranges, and version numbers. When the supporting factor increases, the lower and upper bounds of the posterior remain unchanged, and when the opposing factor increases, the lower and upper bounds of the posterior remain unchanged. The updated intervals are truncated from 0 to 1, and the source of the factors is recorded.

[0070] The interval posterior of candidate syndromes uses a conservative lower bound as the safe support and a relaxed upper bound as the potential support. When sorting candidates, syndromes with larger safe support values ​​and narrower interval widths are given priority. Candidates with the same interval width are sorted by reliability level and most recent update time. The sorting results are written into the candidate syndrome status table for S3 to generate problem candidates.

[0071] The measurement nodes of the heterogeneous syndrome diagram clearly correspond to the actual measurement objects: the tongue image node stores the tongue color code, tongue coating thickness level and image acquisition time; the pulse image node stores the pulse rate, pulse amplitude and sampling window; and the test node stores the indicator name, value, unit of measurement and reference range. The direction of unit conversion and reference range comparison is recorded in the measurement attributes. Test values ​​that exceed the reference range are only used as evidence with abnormality marks and are not directly used to determine candidate syndromes.

[0072] When both the support and opposition intervals are empty, the measurement node is missing, or the time edge cannot be determined, the module generates a missing evidence flag and stops the interval propagation of that node, while retaining the existing contribution edge; when the relation type message does not change within three rounds of propagation, the relation is marked as having reached a stable state and repeated calculations are skipped, and the stable round is written into the graph state table;

[0073] When the posterior width of the interval reaches below the width threshold specified by the stopping condition and the conflict mark is false, S2 marks the candidate evidence state as sufficient evidence; when the interval width is not less than the threshold, there is a conflict mark or insufficient contribution edge, S2 writes the state to be confirmed in the interval posterior record, and S5 can only generate output conclusions for evidence subgraphs that have passed the verification and whose state is sufficient evidence.

[0074] After the evidence interval propagation is completed, the module generates an interval posterior record for each candidate syndrome. The fields include candidate syndrome identifier, conservative lower bound, relaxed upper bound, reliability level, conflict marker, update time, set of contributing edge identifiers, and temporal memory version. At the same time, an evidence subgraph is generated by expanding outward two hops along the contributing edge with the current candidate syndrome as the root node. The evidence subgraph saves version snapshots of nodes and edges, which serve as the input for the S3 simulated response branch and the reference object for the S5 replay verification.

[0075] In this specific embodiment, S3 includes:

[0076] The question-solving module reads the posterior of the candidate syndrome intervals, conflict markers, contribution edges, and evidence subgraphs of S2, and generates candidate questions from the question template library according to the gaps in syndrome elements. Each question record includes a question identifier, question text, text fingerprint, expected answer type, expected answer duration, number of required operations, available input types, associated evidence gaps, and taboo labels. The question template library stores the applicable syndrome level, version number, and discontinuation time.

[0077] For each candidate question, the module generates an answer branch graph based on binary or multi-valued simulated answer branches, and calls an interval updater on each branch to temporarily add the supporting or opposing evidence corresponding to the branch to the evidence subgraph without writing it into the final graph; the interval entropy of the interval posterior is used. ,in Representing an interval The uncertainty measure is dimensionless. This represents the posterior interval obtained from the propagation result of the S2 interval. and These represent the lower and upper bounds of the interval using the same posterior scale from 0 to 1, respectively, and satisfying... , Represents the natural logarithm; when the interval updater outputs a missing, reversed, or out-of-bounds interval, the branch entropy is taken as the entropy of the interval corresponding to the current reproducible snapshot and written into the branch anomaly flag, and the unverified interval is not used for sorting; for each branch of the candidate problem, the entropy before and after the update are calculated respectively to obtain the lower and lower bounds of the interval entropy decrease and the posterior interval after the branch update is retained;

[0078] The module calculates the discriminative power of the question based on the degree of separation between the intervals of the candidate symptoms. For each candidate symptom pair, the overlap width of the two branch posterior intervals is first calculated, and then the overlap width is subtracted from 1 to obtain a separation score of 0 to 1. Finally, the average score is calculated for all candidate symptom pairs. The larger the separation score, the better the question can distinguish the candidate symptoms. The branch evaluation record saves the upper and lower bounds of the intervals, the overlap width, the separation score, and the corresponding simulated answer for each candidate symptom pair.

[0079] When the difference between the upper and lower bounds of the interval entropy decrease for all problems is less than the similar threshold, the problem solver then calculates the evidence gap coverage. It checks one by one the set of evidence gaps associated with the problem to see if the simulated branch can make the interval width reach the gap width threshold. It prioritizes retaining gap problems that can cover a width not less than the threshold. The coverage judgment uses the evidence gap identifier in the candidate problem record to associate with the S2 contribution edge identifier. Problems that are not associated with a valid contribution edge are placed in low priority.

[0080] In the question filtering phase, questions that trigger taboo constraints are first deleted, and then repetition constraints and patient burden constraints are executed. The repetition constraint uses the question text fingerprint and the semantic merging result of the queried questions as the key. Only one question is retained in the same merging cluster in the current consultation round. The patient burden constraint requires that the expected response time does not exceed the upper limit of the patient burden parameter table, the number of required operations does not exceed the upper limit, and the response type belongs to the patient's available input type. If the constraint parameters are missing, the conservative upper limit in the patient's file is used and the reason for the parameter default is recorded.

[0081] In the filtered question set, the solver sorts the questions lexicographically, prioritizing the upper bound of the interval entropy decrease, followed by the discrimination, and then the gap coverage. Candidates with the same ranking are broken up by the stable lexicographical order of the question identifier. If the initial candidate set is empty, or the set is empty after deleting questions that violate the rules of repetition and patient burden, or all questions trigger the taboo constraints, the questioning stops and the output is transferred to manual labeling. The label carries the triggering reason, the current candidate syndrome version, and the most recent evidence subgraph version.

[0082] The solver writes the first-ranked question into the next question record, and saves the question identifier, text fingerprint, branch evaluation results, upper and lower bounds of interval entropy decrease, discrimination, coverage gap, contraindication filtering results, repetition filtering results, and burden check results. It also binds the question record version with the S2 evidence subgraph version. The next question record is passed to S4 as the content displayed on the patient's end and the doctor's correction entry point. Unselected questions and their filtering reasons are saved in the audit cache to support subsequent playback.

[0083] In this specific embodiment, S4 includes:

[0084] The event write-back module receives the patient's answer and doctor's correction corresponding to the S3 next question record. The patient's answer is formed into a patient answer event after input type validation, timestamp correction and text or numerical field normalization. The doctor's correction is formed into a doctor correction event after doctor identity authentication and correction content summary. The two types of events use different event type codes and are associated with the patient anonymity identifier, question identifier, current atlas snapshot identifier and evidence subgraph version identifier.

[0085] Each graph event is first populated in the uncommitted buffer record with the event identifier, event type, event content summary, source subject, unified timestamp, graph snapshot identifier before modification, graph snapshot identifier after modification, evidence subgraph reference identifier, evidence subgraph version identifier, original data pointer, and previous event identifier; if a field is missing, the missing bitmap is written instead of deleting the event; the event can only be committed after the snapshot identifier, version identifier, and summary check value are all generated.

[0086] The write-back module processes new events in a stable order based on unified timestamps, event type priority, and event identifiers. It first copies the current heterogeneous syndrome diagram, interval posterior, and time-series hierarchical memory to form a snapshot before modification. Then, it applies the event to generate a snapshot after modification, fills the two snapshot identifiers and all version fields into the uncommitted buffer record, and freezes the fields. Patient response events only change the evidence edges associated with their corresponding questions, while doctor correction events can change the evidence direction, reliability level, or pending confirmation status. If snapshot generation or field freezing fails, the uncommitted snapshot is rolled back and a new independent abnormal event is added, without modifying the already committed log records.

[0087] After freezing the fields, the module forms a normalized byte string for the fixed fields by ascending order of field name, UTF-8 encoding, and a four-byte prefix. It first calculates the event content digest, then calculates the hash chain value of the appended log. Chain value of an event ,in Indicates the first The event chain value is stored in 64 lowercase hexadecimal characters. Indicates the value of the previous event chain and uses the same format. This represents a UUID event identifier generated by the event service and unique within the session. This indicates the event type read from the five enumeration categories: patient response, doctor correction, parsing failure, cancellation, and exception. This represents a Coordinated Universal Time (UTC) timestamp generated by the S1 unified clock in milliseconds. This represents the 256-bit content digest obtained by performing SHA-256 on the normalized byte string of the freeze event field. This represents an event sequence index that starts from 1 and increases sequentially. This refers to the SHA-256 function, which takes a normalized byte string as input and outputs a 256-bit digest. This indicates the normalized concatenation of fields; the initial chain value of the first event is generated by the session identifier and log version, and if the index is missing or discontinuous, the commit is rejected and written to a separate exception event; the chain value and the frozen event field are appended to immutable storage in the same transaction, and modification is prohibited after writing;

[0088] For supporting or opposing values ​​in the patient's response, the write-back module generates evidence edges in the supporting or opposing directions respectively and recalculates the evidence intervals for the affected candidate symptoms. When the patient's response is an uncertain value, the module generates a neutral event with an uncertain state, without generating supporting or opposing directions, and without adding supporting or opposing intervals. It only writes missing evidence and a pending confirmation flag into the candidate symptom state. S2 does not include this neutral state in the support / opposition aggregation and conflict detection, but retains its event reference for S5 auditing. Doctor corrections have a higher priority than automatic responses, but the original patient response edges are not deleted. Instead, the source of the correction, the reason for the correction, and the time of the correction are recorded on the new edge, so that S2 can retain both the original evidence and the corrected evidence in the next round of message passing.

[0089] After each write-back, the current consultation layer is updated, and events older than seven days are archived to the past medical history layer according to the event time and hierarchical rules. Events spanning two years and meeting the stability conditions are archived to the long-term constitution layer. The archiving operation only changes the time-series memory index and does not change the immutable event log. The index version, archiving trigger time, and archiving event range are written to the graph status table.

[0090] At the end of each round of writing, the module generates a new version of the evidence subgraph and a reproducible snapshot for the next round, and writes the affected candidate symptom identifiers, interval posterior changes, conflict marker changes, contribution edge changes, question answer status, and log chain tail value into the round status; then it calls S2 again to construct the interval posterior and calls S3 to generate the next question, until the stopping condition specified by S5 is met, or after S3 outputs and switches to manual marking, the session status is set to pending manual processing;

[0091] The content summary of a patient's response event only includes the normalized response value, response type, and response time, and does not include unfiltered free text; the doctor's correction event simultaneously saves the value before correction, the value after correction, the correction reason category, and the doctor's subject identifier. The correction reason category is selected from the correction dictionary and includes a dictionary version, which facilitates the review of correction branches during replay.

[0092] After the event write-back is completed, the module performs differential checks on the node count, edge count, event reference set, and interval posterior version of the graph snapshot before and after the modification. It also forms an affected closure by combining the nodes and edges directly associated with the current event, as well as the affected nodes and edges reachable along the evidence propagation, candidate symptom posteriors, conflict markers, contributing edges, and temporal memory versions. The differential check allows changes to objects within the closure due to S2 propagation, but only judges changes outside the closure as abnormal. When an abnormality occurs, the round state is set to abnormal and the S2 to S4 loop is paused, waiting for the doctor to process it without generating the next question.

[0093] For patient responses and doctor corrections at the same timestamp, the module first sorts them by event type priority and event identifier, writing patient responses first and doctor corrections last, and both events are kept in the log; during replay, the same sorting is strictly used to ensure that the same event log yields the same evidence interval and candidate posterior axiom on different devices;

[0094] When a patient's answer cannot be parsed into the input type of the question record statement, the module generates a parsing failure event and outputs a manual transfer flag, without writing the parsing failure value into the evidence edge; when a doctor corrects or revokes a previous correction, a new revoke event is added pointing to the revoke event identifier, and the replay module restores the original patient answer edge before the revoke according to the event chain.

[0095] The next state simultaneously saves the version identifiers, event log chain tail values, and evidence subgraph versions of the current consultation layer, past medical history layer, and long-term constitution layer. S2 only reads the versioned objects in this state; therefore, the next question generated by S3, the event written by S4, and the input replayed by S5 can all be associated along the same version chain.

[0096] If the stopping condition is not met and no manual intervention is received, the module executes S2 to S4 in a loop until the preset stopping condition is met. In each loop, the number of events in this round, the posterior change of the interval, the next question mark and the stopping condition check result are written to the round status. The next round is only started from the snapshot that passed the version verification in the previous round to avoid reading the temporary state that has not been written to disk across rounds.

[0097] In this specific embodiment, S5 includes:

[0098] After S4 determines that the stop condition is met, the replay verification module freezes the immutable event log tail value and reproducible snapshot identifier of the current session. It reads all events in the same unified timestamp, event type priority, event identifier, and chain value order as online processing, and determinates them in the isolated work area according to event type: it reconstructs evidence edges based on patient response events and doctor correction events, parses failed events and abnormal events as audit events that do not change the evidence but must be added to the chain, and applies doctor correction and reversal events in reverse according to the target event identifier; other stateless events only update the log cursor and do not change the graph; the replay process only uses the graph snapshot, evidence subgraph version, and parameter version recorded in the event, and does not read the unrecorded states in the current online cache;

[0099] The consistency check should at least compare the order of the event logs, the summary check value of each event, the snapshot identifiers of the graph before and after modification, the evidence subgraph reference identifiers and their version identifiers, and verify that the event chain tail value is consistent with the frozen tail value; the evidence subgraph reference identifier must be able to locate the evidence subgraph output by S2, and the referenced version must be the same as the event record version, otherwise the check result will be set to failure and the reason for missing reference or version mismatch will be recorded;

[0100] The verification module writes the comparison results, event log tail value, evidence subgraph reference identifier, evidence subgraph version identifier, playback start and end snapshot identifier, and failure reason to the audit log. The audit log is saved in an append-only manner and associated with the session identifier. When any sequence, summary, snapshot, or subgraph reference comparison fails, the module prohibits the output of the unplayed symptom order, problem record, confidence level, and inference path, restores to the frozen reproducible snapshot, and writes the rollback snapshot identifier to the audit log.

[0101] After successful verification, the module extracts candidate symptoms, contribution edges, and interval posteriors only from the verified evidence subgraph, and calculates the ranking confidence of each candidate symptom. ,in Indicates candidate symptoms The ranking confidence is dimensionless. This indicates that the interval passes the verification and is dimensionless. This indicates that the interval has passed the verification and is dimensionless. This represents the candidate syndrome index; when the interval width is less than the width threshold and there is no conflict marker, the conclusion is marked as outputtable, otherwise it is marked as pending confirmation. The width threshold and conflict status are both read from the same verification version.

[0102] Syndrome ranking is generated from high to low confidence. Candidates with the same confidence are ranked from small to large interval width. Then, the candidate syndrome identifier is used to break the tie. At each ranking position, the candidate syndrome identifier, ranking position, confidence, upper and lower bounds of the interval, set of contributing edge identifiers and evidence subgraph version identifier are output simultaneously. The question record includes the question asked, answer summary, doctor's correction summary and corresponding event identifier. The reasoning path is formed by connecting the contributing edges in chronological order.

[0103] The preset stopping conditions are managed by the stopping condition table, including at least one of the following: the width of the interval posterior upper and lower bounds is less than the width threshold, the upper bound of the interval entropy decrease in the next question after two consecutive rounds is less than the decrease threshold, the maximum number of consultation rounds is reached, the doctor actively terminates the consultation, and the doctor receives a transfer to manual intervention. When the width is not less than the threshold, the maximum number of rounds is reached, the doctor actively terminates the consultation, or the doctor receives a transfer to manual intervention, the relevant candidate conclusions are uniformly marked as pending confirmation, and the triggering conditions and audit record identifiers are carried in the output.

[0104] The final output package is written to a traceable results table, with fields including session identifier, syndrome order, problem record, confidence level, inference path, evidence subgraph version, log tail value, verification result, and pending confirmation status. The output package can only be generated from evidence subgraphs that have passed consistency verification. The version of the results table is bound to the audit record. Subsequent follow-up visits or doctor reviews can be replayed and reproduced based on the log tail value and evidence subgraph version, thus reproducing the same order.

[0105] When the interval width of a candidate symptom is not less than the width threshold, the conflict flag is true, or the number of contributing edges is lower than the minimum of sufficient evidence, the module determines that the conclusion lacks sufficient evidence, marks the conclusion as pending confirmation, and writes the supplementary evidence identifier in the problem record; the pending confirmation status will not be converted into an output status by the sorting module unless subsequent events supplement evidence and pass new replay verification.

[0106] The evidence subgraph integrity check also checks whether the contribution edge identifier at each sorting position exists in the evidence subgraph output by S2, whether the source record of the contribution edge exists in the union of the original data pointer set of S1 and the immutable event identifier and correction record set of S4, and whether the evidence subgraph version is consistent with the interval posterior version; the evidence edge generated by the doctor's correction must carry the corresponding correction event identifier, and parsing failure or abnormal events cannot be used as the source of supporting edges; any examination failure will mark the corresponding candidate syndrome as pending confirmation and write the missing item into the audit record;

[0107] The question records in the sorting results are associated with patient answers and doctor corrections by event timestamps. The reasoning paths are expanded according to the relationship type, direction, and time edge order of the contributing edges. For paths that are actively terminated by doctors or manually marked and truncated, the truncation reason, the most recent event identifier, and the pending confirmation status are output. No simulated answers or reasoning edges that have not occurred are added.

[0108] When the replay verification passes and the evidence subgraph is complete, the module generates a result summary verification value and binds it to the log tail value. The summary verification value covers the syndrome ranking, problem record, confidence level, reasoning path and pending confirmation status. When the result is read, the summary verification value is compared again. If an inconsistency is found, the ranking is prohibited from being displayed and replay is required.

[0109] The final output package simultaneously includes audit record references, evidence subgraph versions, and contribution edge sets, allowing doctors to locate specific evidence on the results page. When new events occur during subsequent follow-up visits, the system adds events using the current output package as the starting point of a reproducible snapshot, without overwriting the already output version, thus maintaining the traceability of the ordering of symptoms and reasoning paths throughout the process.

[0110] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

[0111] This invention organizes syndrome ontology alignment, heterogeneous graph reasoning, evidence interval propagation, and dynamic consultation problem solving into a continuous data processing chain, enabling multi-source inputs to form updatable syndrome events and graph relationships, and making each round of responses and doctor corrections replayable graph events.

[0112] Based on this, time-layered memory retains the influence of evidence at different time levels, and event log replay verification provides a consistency boundary for the generated results; when verification fails, it reverts to a reproducible snapshot, thereby supporting dynamic diagnosis while maintaining the spectral basis and audit traceability of syndrome ranking, confidence, and reasoning path.

Claims

1. A method for constructing a TCM intelligent agent driven by syndrome knowledge graph, characterized in that, include: S1. Receives multi-source medical history, symptoms, tongue appearance, pulse appearance and test records, retains the source identifier and collection time of each record, aligns entities, synonyms, hierarchical relationships and dimensions according to the preset syndrome ontology, and organizes conflicting values ​​of the same syndrome element into a set of evidence with direction identifier and reliability identifier, and outputs a standardized syndrome event set and a set of conflicting evidence. S2. Construct a heterogeneous syndrome graph with time edges and evidence attributes based on the standardized syndrome event set and conflict evidence set. Encode each supporting and opposing evidence as evidence intervals with lower and upper bounds and reliability levels. Perform relation-typed message passing, probability factor update, evidence interval propagation and time-series hierarchical memory update on the heterogeneous syndrome graph. Output the interval posterior, conflict marker, contribution edge and corresponding evidence subgraph of the candidate syndrome. S3. For candidate symptoms, generate simulated answer branches for candidate questions. Based on the lower and upper bounds of the interval entropy reduction and the discrimination of each simulated answer branch for the interval posterior, and combine the taboo constraints, solve the next question and output the evaluation results of the next question and its branches. S4. Receive the patient's answer and the doctor's correction for the next question. Write the patient's answer and the doctor's correction as time-stamped graph events into the immutable graph event log. Update the heterogeneous syndrome diagram, evidence interval and temporal hierarchical memory according to the graph events. Execute S2 to S4 in a loop until the preset stop condition is met. S5. After the preset stopping conditions are met, replay the immutable graph event log and perform consistency verification with the reproducible snapshot. If the verification fails, revert to the reproducible snapshot. If the verification passes, generate the syndrome ranking, problem record, confidence level and reasoning path only based on the evidence subgraph that passed the verification, and mark the conclusions that lack sufficient evidence as pending confirmation.

2. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S1, the source identifier includes at least the data source category and the identifier of the acquisition device or input terminal, the acquisition time is converted to a unified time reference, and the dimension alignment includes converting similar test records to the same unit of measurement. For conflicting values, directed evidence edges are established according to the supporting or opposing direction, and the source reliability level is associated with each evidence edge. The original data pointer is also saved for each record.

3. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S2, the lower and upper bounds of the evidence interval represent the conservative and relaxed boundaries of the degree of support for the candidate syndrome corresponding to the evidence, respectively, and the reliability level is jointly determined by the source reliability, data integrity, and doctor's correction status. Interval messages of the same relation type are weighted according to the reliability level, and time decay is applied to historical messages based on the time edge.

4. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S2, the time-series hierarchical memory includes the current consultation layer, the past medical history layer, and the long-term physical condition layer. When transmitting messages, evidence is aggregated in each layer and updated through cross-layer connections with time edges. When the overlap between the supporting evidence interval and the opposing evidence interval exceeds a preset overlap threshold, the conflict marker is generated, and the contributing edge that caused the conflict is retained.

5. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S3, the lower and upper bounds of the interval entropy decrease are calculated based on the interval posterior before and after each simulated response branch update, and the discrimination is determined by the degree of separation of the posterior intervals of different candidate syndromes under each simulated response branch. When the difference between the upper and lower bounds of the interval entropy decrease is less than a preset similar threshold, problems that can cover evidence gaps with an interval width not less than a preset gap width threshold are preferentially selected, and problems that trigger taboo constraints are eliminated.

6. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S3, when solving the next question, repeatability constraints and patient burden constraints are further adopted. The repeatability constraints are determined based on the question text fingerprint and the semantic merging results of the queried questions. The patient burden constraints are determined based on the expected response time, the number of operations required, and the types of input available to the patient. When the initial candidate question set is empty, stop asking questions and output a "transfer to manual" flag. When there are questions that do not trigger taboo constraints, remove questions that violate repetition constraints or patient burden constraints and select the next question from the remaining questions. When there are no remaining questions after removing questions that violate repetition constraints or patient burden constraints, or when all candidate questions trigger taboo constraints, stop asking questions and output a "transfer to manual" flag.

7. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S4, the graph event at least records the event type, event content summary, source entity, timestamp, graph snapshot identifier before modification, graph snapshot identifier after modification, evidence subgraph reference identifier, and evidence subgraph version identifier; Doctor corrections and patient responses are written as different event types into the immutable graph event log, and replayed in the order of event timestamps to update the evidence intervals and candidate symptom posteriors.

8. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 1, characterized in that, In S5, the consistency check compares at least the order of the event logs, the event summary check value, the graph snapshot identifier, and the evidence subgraph reference identifier. The evidence subgraph reference identifier is associated with the evidence subgraph output in S2 and corresponds to the evidence subgraph version identifier. Write the comparison result of the consistency check, the evidence subgraph reference identifier, and the evidence subgraph version identifier into the audit log. When the check fails, the output of the symptom sort without playback is prohibited, and the reason for failure and the rollback snapshot identifier are written into the audit log.

9. The method for constructing a TCM intelligent agent driven by syndrome knowledge graph according to claim 8, characterized in that, The preset stopping conditions include at least one of the following: the upper and lower bounds of the interval posterior are less than a preset width threshold; the upper bound of the interval entropy decrease in the next question after two consecutive rounds is less than a preset decrease threshold; the maximum number of consultation rounds is reached; the doctor actively terminates the consultation; and the doctor receives a transfer to manual intervention marker. The consistency check includes the evidence subgraph integrity check. When the interval width of the interval posterior is not less than the preset width threshold, the maximum number of consultation rounds is reached, the doctor actively terminates the consultation, or a manual transfer flag is received, the corresponding conclusion is marked as pending confirmation. When generating the syndrome ranking, the contribution edge identifier and evidence subgraph version identifier corresponding to each ranking position are output simultaneously.

10. A TCM intelligent agent system driven by a syndrome knowledge graph, used to execute the method according to any one of claims 1 to 9, characterized in that, include: The multi-source syndrome access and ontology alignment module is used to receive multi-source records and output a standardized syndrome event set and conflict evidence set; The heterogeneous symptom graph construction and interval propagation module is used to construct heterogeneous symptom graphs with time edges and evidence attributes and output interval posteriors, conflict markers, contribution edges and evidence subgraphs. The consultation question-solving module is used to output the next question based on simulated answer branches, upper and lower bounds of interval entropy descent, discrimination, taboo constraints, repetition constraints, and patient burden constraints. The event write-back and temporal memory update module is used to receive patient responses and doctor corrections and update heterogeneous syndrome diagrams, evidence intervals, and immutable atlas event logs; The replay verification and traceability generation module is used to replay the graph event log, perform consistency verification, and generate syndrome ranking, problem records, confidence levels, and inference paths based on the evidence subgraphs that have passed the verification.