Intelligent inquiry method for traditional Chinese medicine based on AI large language model

CN123017455APending Publication Date: 2026-10-30BEIJING SHENZHOU HANFANG PHARMACEUTICAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611385039.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,患者在实际问诊过程中常同时描述当前症状、既往症状以及已经缓解或消失的症状,现有技术对症状时间状态及状态迁移关系的识别能力有限,容易将仅存在于既往阶段的症状错误识别为当前阳性症状,导致当前症状集合失真,进而影响后续问诊问题生成及中医辨证结果

Benefits of technology

本发明区别于现有技术仅依据单轮文本语义或症状关键词判断症状当前状态的方式,通过将患者多轮问诊中同一症状的发生时间、结束时间及状态变化进行关联,构建包含症状事件、时间节点、状态节点及有向关系边的症状时间状态图,并基于终止、持续及终止后再次发生的时间关系形成对应有向路径。由此,可在数据结构层面保留症状由发生、持续、终止至复发的完整时间演化关系,避免已缓解或已消失症状因再次出现在历史描述中而被直接作为当前阳性症状,从而提高当前症状状态表征与患者实际问诊时刻的一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017455A_ABST
    Figure CN123017455A_ABST
Patent Text Reader

Abstract

The application discloses a traditional Chinese medicine intelligent inquiry method based on an AI large language model and concretely relates to the technical field of artificial intelligence and traditional Chinese medicine intelligent inquiry, obtains current round and historical round inquiry content of a patient, extracts symptom entities, time expressions and state expressions, forms a symptom event, constructs a symptom time state graph based on the symptom event, generates time consistency constraints according to a directed path between termination, recurrence and a current inquiry time, determines candidate state scores by using an AI large language model, corrects the candidate states that violate the time consistency constraints by Lagrange constraint inference, and obtains a global time state, determines a current positive symptom set based on the global time state, and generates a traditional Chinese medicine inquiry result, so that the application can reduce the risk of misjudging terminated historical symptoms as current positive symptoms and improve the accuracy of symptom state recognition in the inquiry process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and TCM intelligent consultation technology, specifically to a TCM intelligent consultation method based on an AI large language model. Background Technology

[0002] Existing intelligent TCM consultation systems typically extract symptoms from patient descriptions using natural language processing models or AI large language models, and map the patient's natural language into standardized TCM symptom terms through semantic similarity. However, during actual consultations, patients often describe current symptoms, past symptoms, and symptoms that have subsided or disappeared simultaneously. Current technologies have limited ability to identify the temporal state and state transition relationships of symptoms, easily misidentifying symptoms existing only in past stages as current positive symptoms, leading to a distortion of the current symptom set and consequently affecting the generation of subsequent consultation questions and the results of TCM diagnosis. Therefore, it is necessary to jointly model the symptom occurrence time, duration, and state changes to improve the accuracy of symptom state identification during intelligent consultations. Summary of the Invention

[0003] The purpose of this invention is to provide a TCM intelligent consultation method based on an AI large language model to address the shortcomings of the prior art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a TCM intelligent consultation method based on an AI large language model, comprising: The system obtains the patient's current and historical consultation content, and uses an AI large language model to extract symptom entities, time expressions, and state expressions to identify symptom events that include symptom type, occurrence time, end time, initial symptom state, and state confidence. Based on the symptom events, with the current consultation time as the time anchor, the symptom events corresponding to the same symptom are associated according to the time sequence, and a symptom time state diagram is constructed according to the relationship of occurrence, duration, termination and recurrence. Based on the symptom time state graph, directed paths are extracted between symptom events and termination states, recurrence states, and the current consultation time. Based on the directed paths, time consistency constraints are generated to limit the current state of symptoms. The AI ​​large language model is used to determine the candidate state scores of each symptom event corresponding to the current existence, past existence, disappeared and recurrence states. The candidate state scores and time consistency constraints are input into the Lagrange constraint inference model. The Lagrange multipliers are updated according to the degree to which the candidate states violate the time consistency constraints. The candidate state scores are then corrected using the Lagrange multipliers to obtain the global time state of the symptom event. The current set of positive symptoms is determined based on the global time state, and the results of subsequent TCM consultations are generated using the current set of positive symptoms.

[0005] Preferably, the determination of symptom events includes: The consultation content of the current round and the previous rounds are sorted according to the round number and timestamp to form a multi-round consultation text sequence; the multi-round consultation text sequence and the current consultation time are input into the AI ​​big language model to extract the symptom entities, time expressions and state expressions; the symptom entities are matched with a preset set of TCM symptom terms, and combined with the location, degree and accompanying manifestations in the context, the corresponding standardized symptom type is determined.

[0006] Preferably, the construction of the symptom time-state graph includes: grouping symptom events with the same standardized symptom type into the same event set, and determining the temporal order of each symptom event based on the symptom occurrence time, symptom end time, and current consultation time; constructing a symptom time-state graph G=(V,R) based on the temporal order, where V is a set of nodes and R is a set of directed edges, the set of nodes includes symptom event nodes, time nodes, state nodes, and current consultation time nodes, the state nodes are used to record the state results of symptom events at the corresponding time stage, and the directed edges are used to characterize the temporal orientation relationship and state transition relationship between symptom events, state nodes, and time nodes.

[0007] Preferably, the construction of the symptom time state graph further includes: establishing an occurrence association between symptom events and occurrence time nodes based on the symptom occurrence time; when the initial symptom state of the symptom event is currently existing and the symptom end time is not determined, establishing a continuous relationship between the symptom event and the current consultation time through the corresponding state node; when the symptom end time is determined and the corresponding symptom has ended, establishing a termination relationship between the symptom event and the end time node and the termination state node.

[0008] Preferably, adjacent symptom events belonging to the same standardized symptom type. and The preceding symptomatic event has a definite end time and meets the following conditions: When determining that the subsequent symptomatic event occurs after the termination of the preceding symptomatic event, a recurrence relationship is established from the termination state of the preceding symptomatic event to the recurrence state of the subsequent symptomatic event. Indicates the end time of the previous symptom event. This indicates the time when the subsequent symptom event occurred.

[0009] Preferably, the generation of time consistency constraints includes: extracting directed paths between symptom events and termination states, recurrence states, and current consultation times for the same symptom based on symptom event nodes, state nodes, time nodes, and directed relation edges in the symptom time state graph; determining time state constraints corresponding to symptom events based on node types, path directions, and the sequential relationships between time nodes in the directed paths; and converting the time state constraints into time consistency constraints.

[0010] Preferably, the time consistency constraint includes: restricting the symptom event from being determined as the current state based on the existence of a termination path and the absence of a recurrence path after termination; and retaining the subsequent symptom event as the current state judgment object based on the formation of a recurrence path pointing to a subsequent symptom event after termination.

[0011] Preferably, the step of determining candidate state scores using an AI large language model includes: inputting each symptom event and its associated consultation context into the AI ​​large language model to determine the candidate state scores for each symptom event corresponding to the current existence, past existence, disappeared, and recurrence states; denoting the candidate state set as Z, and classifying the symptom events... The candidate state score corresponding to candidate state z is denoted as ,in .

[0012] Preferably, the candidate state scores and time consistency constraints are input into the Lagrange constraint inference model, including: by Indicates symptomatic events Is it assigned a candidate state? A state selection objective is constructed based on candidate state scores, and the time consistency constraint is expressed as a constraint function. ,in, This represents the candidate state combinations for each symptom event. The corresponding time consistency constraint is represented; a Lagrange objective function is constructed based on the candidate state score and the constraint function; Update the corresponding Lagrange multipliers according to the degree to which the candidate states violate the time consistency constraint: The scores of candidate states that violate the corresponding temporal consistency constraints are corrected using updated Lagrange multipliers to reduce the relative scores of the candidate states in joint state selection and to determine the global temporal state of the symptom event.

[0013] Preferably, determining the current set of positive symptoms includes: based on the global time state of each symptom event, identifying the symptoms with the current global time state and the symptoms that have recurred and persisted until the current consultation time as current positive symptoms, and excluding symptoms that have terminated and have not recurred after termination from the current set of positive symptoms; inputting the current set of positive symptoms into an AI large language model to generate subsequent TCM consultation results.

[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: This invention differs from existing technologies that determine the current symptom state solely based on single-round text semantics or symptom keywords. Instead, it constructs a symptom time-state graph by associating the occurrence time, end time, and state changes of the same symptom across multiple patient consultations. This graph includes symptom events, time nodes, state nodes, and directed relational edges. Corresponding directed paths are formed based on the temporal relationships of termination, duration, and recurrence after termination. Therefore, the complete temporal evolution of symptoms from occurrence, duration, termination to recurrence can be preserved at the data structure level. This prevents relieved or disappeared symptoms from being directly used as current positive symptoms simply because they reappear in historical descriptions, thereby improving the consistency between the current symptom state representation and the actual time of patient consultation.

[0015] Furthermore, this invention differs from the approach of directly using the highest candidate state score of an AI large language model to determine symptom status. Instead, it transforms the directed paths in the symptom time-state graph into temporal consistency constraints and updates the Lagrange multipliers based on the degree to which candidate states violate these constraints, thereby correcting the scores of candidate states with temporal conflicts. This invention constrains the local semantic judgments of the large language model by the global temporal relationship between symptom termination, recurrence, and the current consultation time. This reduces the risk of misjudging "symptoms have occurred before" as "symptoms currently exist," thus forming a more accurate set of current positive symptoms and providing a reliable symptom status basis for subsequent TCM intelligent consultation results. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0017] Figure 1 This is a flowchart of the method of the present invention.

[0018] Figure 2 A flowchart for generating time consistency constraints in this invention is provided.

[0019] Figure 3 This is a flowchart of the Lagrange constraint inference process of the present invention. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Example 1, please refer to Figure 1 , Figure 2 and Figure 3 As shown in this embodiment, the TCM intelligent consultation method based on an AI large language model includes: Step S1: Obtain the patient's current and historical consultation content, and use the AI ​​large language model to extract symptom entities, time expressions, and state expressions to determine symptom events that include symptom type, occurrence time, end time, initial symptom state, and state confidence.

[0022] In this embodiment, the patient's current and previous consultation content is obtained, and a multi-round consultation text sequence with time order is formed according to the round number and timestamp. The multi-round consultation text sequence and the current consultation time are then combined. Input the AI ​​large language model to extract symptom entities, time expressions, and state expressions.

[0023] Specifically, the symptom entities are matched with a preset set of TCM symptom terms, and standardized symptom types are determined by combining the location, severity, and accompanying manifestations in the context. Based on the standardized symptom types, round order, contextual referential relationships, and consistency of symptom attributes, descriptions pointing to the same symptom in different rounds of consultation are associated. Furthermore, based on the current consultation time... Using time anchors, the time representation is normalized, and based on the semantic association between symptom entities, normalized time information, and state representation, the symptom occurrence time, end time, and initial symptom state are determined. The initial symptom state includes at least currently present, disappeared, recurred, and uncertain state. For events with uncertain states, the corresponding state confidence level is recorded. In an optional implementation, the state confidence level can be determined based on symptom state confidence information output by an AI large language model.

[0024] Finally, the information is encapsulated into symptom events. : ;in, Indicates standardized symptom types, Indicates the time of symptom onset. Indicates the end time of symptoms. Indicates the initial symptom state. This represents the state confidence level.

[0025] Step S2: Based on the symptom events, with the current consultation time as the time anchor point, associate the symptom events corresponding to the same symptom according to the time sequence, and construct a symptom time state diagram according to the relationship of occurrence, duration, termination and recurrence.

[0026] In this embodiment, the symptom event obtained in step S1 is used as an example. and the current consultation time As input, a symptom-time state graph is constructed to characterize how the same symptom changes over time. Step S1 has already completed the semantic association of symptom descriptions across rounds and the standardization of symptom types; this step is based on the standardized symptom types. Symptom events belonging to the same symptom are sorted by time and organized by state relationship, and symptom entity matching is no longer performed repeatedly.

[0027] Specifically, those with the same standardized symptom types Symptoms are grouped into the same event set and based on the time of symptom occurrence. Symptom end time and the current consultation time Determine the chronological order of each symptom event, and then construct a symptom time-state diagram based on this. ;in, For a set of nodes, Let be the set of directed edges.

[0028] The node set includes symptom event nodes, time nodes, status nodes, and the current consultation time node; symptom event nodes correspond to symptom events. Time nodes correspond , and State nodes are used to record the state of a symptom event at a corresponding time stage. Directed edges connect these nodes and represent the temporal and state transition relationships between them. In other words, state nodes represent "the state of the symptom at a corresponding time stage," and directed edges represent "the direction of association between the symptom event, state nodes, and time nodes," thus distinguishing the functional boundaries between state information and relational information.

[0029] Furthermore, the relationships are determined based on the temporal information of each symptom event. According to... Establish a correlation between symptom events and their occurrence time points; when the initial symptom state of a symptom event... For currently existing and If the status is not yet determined, the symptom event is linked to the current consultation time via the corresponding status node. The persistence of the relationship, to characterize the persistence of the symptoms up to the current consultation time; when Once the symptoms have been identified and the corresponding symptoms have ceased, establish a termination relationship between the symptom event, the end time node, and the termination status node.

[0030] Adjacent symptom events for the same symptom and The recurrence relationship is primarily determined based on the temporal relationship between the end time of the preceding symptomatic event and the occurrence time of the subsequent symptomatic event. Specifically, when both events have the same standardized symptom type, the preceding symptomatic event has a definite end time, and the following conditions are met: That is, when a subsequent symptom event occurs after the termination of a preceding symptom event, the two are identified as two independent stages of the same symptom, and a recurrence relationship is established in the symptom time-state diagram, pointing from the termination state of the preceding symptom event to the subsequent symptom event. Therefore, the determination of the recurrence relationship mainly relies on the temporal sequence between symptom termination and recurrence, while the initial symptom state in step S1... Used to provide status information corresponding to each symptom event.

[0031] It is understandable that symptom events formed by the same symptom at different time stages can be organized in a unified graph structure. In this graph structure, state nodes record the state results of each symptom event at the corresponding time stage, directed edges record the pointing relationships between symptom events, states, and times, and can distinguish different time state processes such as symptom termination, continuation to the present, and recurrence after termination on the graph structure.

[0032] Step S3: Based on the symptom time state graph, extract the directed path between the symptom event and the termination state, recurrence state and the current consultation time, and generate a time consistency constraint to limit the current state of the symptom according to the directed path.

[0033] In this embodiment, the symptom time-state graph G obtained in step S2 is used as input. Based on the symptom event nodes, state nodes, time nodes and their corresponding directed relation edges in the graph, the graph is used to extract the path from the symptom event node through the termination state node or recurrence state node to the current consultation time. The directed path is used to obtain the temporal state relationship that reflects the termination, recurrence, and continuation of symptoms up to the current moment.

[0034] Specifically, based on the node types, path directions, and the sequential relationships between corresponding time nodes in the directed path, the temporal state constraints corresponding to the symptom event at the current consultation time are determined, and these constraints are converted into temporal consistency constraints. For symptoms with a terminating path that does not form a recurrence path after termination, the temporal consistency constraints restrict their determination as the current state; for symptoms that form a recurrence path pointing to subsequent symptom events after termination, the subsequent symptom events are retained as the objects for current state determination. Thus, a set of temporal consistency constraints corresponding to each symptom event is obtained.

[0035] In this way, the explicit temporal sequence and state transition relationships recorded in the symptom time-state diagram can be converted into constraint information that can be used for subsequent state correction, reducing the possibility of terminated symptoms being judged as currently existing states due to historical descriptions. The temporal consistency constraints and the candidate state scores corresponding to each symptom event serve as inputs for the next step of Lagrange constraint inference.

[0036] Step S4: Use the AI ​​large language model to determine the candidate state scores for each symptom event corresponding to the current existence, past existence, disappeared and recurrence states. Input the candidate state scores and time consistency constraints into the Lagrange constraint inference model. Update the Lagrange multipliers according to the degree to which the candidate states violate the time consistency constraints. Use the Lagrange multipliers to correct the candidate state scores to obtain the global time state of the symptom event.

[0037] Specifically, each symptom event and its associated consultation context are input into the AI ​​large language model to determine the candidate state scores for the symptom event corresponding to the current existence, past existence, disappeared, and recurrence states. For symptom events... Let the set of candidate states be denoted as The corresponding candidate state score is denoted as ,in The candidate state score is used to characterize the likelihood that a symptom event belongs to the corresponding time state based solely on the symptom event and the semantic information of the consultation. At this stage, the highest candidate state score is not directly used as the final state.

[0038] Furthermore, the candidate state scores of all symptom events are input together with the temporal consistency constraints generated in step S3 into the Lagrange constraint inference model. Indicates symptomatic events Is it assigned a candidate state? A state selection objective is constructed based on candidate state scores, and the time consistency constraint is expressed as a constraint function. ,in, This represents the candidate state combinations for each symptom event. This represents the symptom time-state diagram obtained in step S2. This represents the corresponding time consistency constraint. The constraint is satisfied when the combination of candidate states conforms to the corresponding time relationship; when the candidate state conflicts with the time relationship between symptom termination, recurrence, and the current consultation time, a corresponding constraint violation occurs.

[0039] Construct a Lagrangian objective function based on the candidate state scores and constraint violation amounts: ; in, In order to be with the first The Lagrange multipliers corresponding to each time consistency constraint are updated based on the degree to which the candidate states violate the corresponding time consistency constraints. ; in, Indicates the number of iterations for inference. The step size η represents the multiplier update step, which can be determined based on the iterative stability of the Lagrange objective function. In one optional implementation, η can be a fixed step size or a step size that decreases with the number of iterations. The Lagrange multiplier update and candidate state score correction are repeatedly performed until the state combination obtained from two adjacent iterations remains unchanged, the change in the objective function is less than a preset convergence threshold, or a preset maximum number of iterations is reached. The greater the degree to which a candidate state violates the temporal consistency constraint, the more significant the corrective effect of the Lagrange multiplier of its corresponding constraint on that candidate state, thereby reducing the relative score of candidate states that violate temporal relationships in joint state selection. Thus, while retaining the semantic judgment results of the AI ​​large language model, the global temporal relationship reflected by the symptom-time-state graph is introduced.

[0040] For example, for the "naïve" symptom event, the AI ​​large language model may simultaneously provide candidate state scores of "currently existing" and "disappeared" based on historical consultation text. When the temporal consistency constraint generated in step S3 indicates that the symptom has formed a termination path and there is no recurrence path after termination, the "currently existing" candidate state will generate a temporal consistency constraint violation. After updating the corresponding Lagrange multipliers and correcting the candidate state scores based on this violation, the "disappeared" state, which conforms to the termination time relationship, is given priority in global inference.

[0041] Step S5: Determine the current set of positive symptoms based on the global time state, and use the current set of positive symptoms to generate subsequent TCM consultation results.

[0042] Specifically, based on the global time state of each symptom event, the corresponding symptom events are filtered by state. Symptoms with a global time state indicating current existence, as well as symptoms that have recurred and persisted until the current consultation time, are identified as current positive symptoms. Symptoms whose global time state indicates termination and no recurrence after termination are excluded from the current positive symptom set. Thus, the symptom event-level time states obtained in step S4 are converted into a current positive symptom set for subsequent TCM consultation and treatment.

[0043] Furthermore, the current set of positive symptoms is input into the AI ​​large language model, which generates subsequent TCM consultation results based on the currently valid symptom information. This ensures that the symptom criteria used in subsequent consultations correspond to the patient's current actual symptom state. This avoids historical symptoms that have disappeared from the medical record from continuing to be considered as current positive symptoms in subsequent consultations, thus ensuring that the global time state obtained in step S4 is implemented in the generation process of the TCM intelligent consultation results. Therefore, the consultation result corresponding to this TCM intelligent consultation is obtained, completing the intelligent consultation processing flow based on symptom time state correction.

[0044] This invention utilizes an AI large language model to extract symptoms and their time and state information from multiple rounds of patient consultations. It constructs a symptom-time-state graph by showing the occurrence, duration, termination, and recurrence of the same symptom at different time stages. Then, based on the directed time path in the graph, it generates time consistency constraints. Through Lagrange constraint inference, it globally corrects the candidate symptom states obtained by the large language model, thereby reducing the risk of historical symptoms that have been relieved or disappeared being misjudged as current positive symptoms. Based on this, it forms a set of positive symptoms that better reflects the patient's current actual state, which is used to generate subsequent TCM intelligent consultation results.

[0045] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A TCM intelligent consultation method based on an AI large language model, characterized in that, include: The system obtains the patient's current and historical consultation content, and uses an AI large language model to extract symptom entities, time expressions, and state expressions to identify symptom events that include symptom type, occurrence time, end time, initial symptom state, and state confidence. Based on the symptom events, with the current consultation time as the time anchor, the symptom events corresponding to the same symptom are associated according to the time sequence, and a symptom time state diagram is constructed according to the relationship of occurrence, duration, termination and recurrence. Based on the symptom time state graph, directed paths are extracted between symptom events and termination states, recurrence states, and the current consultation time. Based on the directed paths, time consistency constraints are generated to limit the current state of symptoms. The AI ​​large language model is used to determine the candidate state scores of each symptom event corresponding to the current existence, past existence, disappeared and recurrence states. The candidate state scores and time consistency constraints are input into the Lagrange constraint inference model. The Lagrange multipliers are updated according to the degree to which the candidate states violate the time consistency constraints. The candidate state scores are then corrected using the Lagrange multipliers to obtain the global time state of the symptom event. The current set of positive symptoms is determined based on the global time state, and the results of subsequent TCM consultations are generated using the current set of positive symptoms.

2. The TCM intelligent consultation method based on an AI large language model according to claim 1, characterized in that, The identified symptom events include: The consultation content of the current round and the previous rounds are sorted according to the round number and timestamp to form a multi-round consultation text sequence; the multi-round consultation text sequence and the current consultation time are input into the AI ​​big language model to extract the symptom entities, time expressions and state expressions; the symptom entities are matched with a preset set of TCM symptom terms, and combined with the location, degree and accompanying manifestations in the context, the corresponding standardized symptom type is determined.

3. The method according to claim 1, characterized in that, The construction of the symptom time-state graph includes: grouping symptom events with the same standardized symptom type into the same event set, and determining the temporal order of each symptom event based on the symptom occurrence time, symptom end time, and current consultation time; constructing a symptom time-state graph G=(V,R) based on the temporal order, where V is a set of nodes and R is a set of directed edges. The set of nodes includes symptom event nodes, time nodes, state nodes, and the current consultation time node. The state nodes are used to record the state results of symptom events at the corresponding time stage, and the directed edges are used to represent the temporal orientation relationship and state transition relationship between symptom events, state nodes, and time nodes.

4. The method according to claim 3, characterized in that, The construction of the symptom time state graph further includes: establishing an occurrence association between symptom events and occurrence time nodes based on the symptom occurrence time; when the initial symptom state of the symptom event is currently existing and the symptom end time is not determined, establishing a continuous relationship between the symptom event and the current consultation time through the corresponding state node; when the symptom end time is determined and the corresponding symptom has ended, establishing a termination relationship between the symptom event and the end time node and the termination state node.

5. The method according to claim 1, characterized in that, Adjacent symptom events belonging to the same standardized symptom type and The preceding symptomatic event has a definite end time and meets the following conditions: When determining that the subsequent symptomatic event occurs after the termination of the preceding symptomatic event, a recurrence relationship is established from the termination state of the preceding symptomatic event to the recurrence state of the subsequent symptomatic event. Indicates the end time of the previous symptom event. This indicates the time when the subsequent symptom event occurred.

6. The method according to claim 5, characterized in that, The generation of time consistency constraints includes: extracting directed paths between symptom events and termination states, recurrence states, and current consultation times for the same symptom based on symptom event nodes, state nodes, time nodes, and directed relation edges in the symptom time state graph; determining time state constraints corresponding to symptom events based on node types, path directions, and the sequential relationships between time nodes in the directed paths; and converting the time state constraints into time consistency constraints.

7. The method according to claim 6, characterized in that, The time consistency constraint includes: restricting the symptom event from being determined as the current state based on the existence of a termination path and the absence of a recurrence path after termination; and retaining the subsequent symptom event as the current state judgment object based on the formation of a recurrence path pointing to a subsequent symptom event after termination.

8. The method according to claim 7, characterized in that, The process of determining candidate state scores using an AI large language model includes: inputting each symptom event and its associated consultation context into the AI ​​large language model to determine the candidate state scores for each symptom event corresponding to the current, previously existing, disappeared, and recurring states; denoting the candidate state set as Z, and classifying the symptom events... The candidate state score corresponding to candidate state z is denoted as ,in .

9. The method according to claim 8, characterized in that, The candidate state scores and time consistency constraints are input into the Lagrange constraint inference model, including: by Indicates symptomatic events Is it assigned a candidate state? A state selection objective is constructed based on candidate state scores, and the time consistency constraint is expressed as a constraint function. ,in, This represents the candidate state combinations for each symptom event. The corresponding time consistency constraint is represented; a Lagrange objective function is constructed based on the candidate state score and the constraint function; Update the corresponding Lagrange multipliers according to the degree to which the candidate states violate the time consistency constraint: The scores of candidate states that violate the corresponding temporal consistency constraints are corrected using updated Lagrange multipliers to reduce the relative scores of the candidate states in joint state selection and to determine the global temporal state of the symptom event.

10. The method according to claim 9, characterized in that, The process of determining the current set of positive symptoms includes: based on the global time state of each symptom event, identifying the symptoms that currently exist in the global time state and the symptoms that have recurred and continue to the current consultation time as current positive symptoms, and excluding symptoms that have terminated and have not recurred after termination from the current set of positive symptoms; inputting the current set of positive symptoms into an AI large language model to generate subsequent TCM consultation results.