Structured report generation method and system for clinical conversation data

By constructing a dynamic temporal dependency graph and a temporal-aware graph attention mechanism, the problem of temporal logic confusion and unstructured nature in the generation of clinical medical records by large language models is solved, and efficient and accurate structured medical record generation is achieved, meeting the standardization requirements of medical data.

CN121938547BActive Publication Date: 2026-06-19CENT SOUTH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CENT SOUTH UNIV
Filing Date
2026-03-25
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing large language models suffer from problems such as disordered temporal logic, factual illusions, and generation of unstructured text when processing clinical medical record generation, making it difficult to meet the standardization requirements of medical data.

Method used

By constructing a dynamic temporal dependency graph (TDG) and a temporal-aware graph attention mechanism, combined with controlled decoding technology, the event-time network of clinical dialogue is reconstructed, and structured constraints are introduced during the generation process to ensure temporal logic consistency and that the generated text conforms to medical standards.

Benefits of technology

It significantly improves the logical accuracy of medical record generation, reduces factual errors, and achieves end-to-end conversion from unstructured spoken language to structured medical data, thereby improving the efficiency of medical record writing and the accuracy of data entry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121938547B_ABST
    Figure CN121938547B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for generating structured reports from clinical dialogue data. The method first preprocesses the clinical dialogue data and reconstructs the relative timeline to obtain an initial sequence matrix with role labels and a normalized relative time set. Then, it jointly extracts time-series-medical entities to obtain a set of medical events and time anchor nodes, thereby constructing a directed heterogeneous dynamic temporal dependency graph containing co-occurrence associations, temporal sequence, and semantic causal edges. Subsequently, it encodes the graph using a graph attention network to extract graph encoding features. Finally, it fuses the graph encoding and text encoding features, and decodes them under controlled conditions under structured constraints to generate a structured medical report. This method can improve the logical accuracy and generation efficiency of medical reports.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the interdisciplinary field of artificial intelligence and natural language processing, specifically involving a clinical dialogue understanding and report generation method based on the deep integration of large language models (LMs) and temporal knowledge graphs. Background Technology

[0002] In recent years, with the rapid development of deep learning technology, Large Language Models (LLMs) have achieved significant breakthroughs in natural language understanding and generation tasks. In the medical field, using natural language processing (NLP) technology to automatically analyze doctor-patient dialogue recordings for automatic generation of electronic medical records (EMRs), intelligent triage and follow-up management has become an important research direction in smart healthcare.

[0003] However, while general-purpose large language models perform excellently in processing everyday dialogue summaries, existing technologies still have the following significant drawbacks when applied to clinical medical record generation scenarios with complex temporal logic and extremely high accuracy requirements:

[0004] (1) Lack of temporal logic modeling ability, making it difficult to handle complex medical histories with non-linear narratives:

[0005] Most existing dialogue summarization models adopt a sequence-to-sequence (Seq2Seq) linear modeling paradigm, meaning the model tends to organize information according to the narrative order of the dialogue. When dealing with patients' non-linear narratives (e.g., a patient first describes today's symptoms, then mentions surgery three years ago, and then jumps back to yesterday's medication), existing models often fail to reconstruct the actual sequence of events, leading to confusion between present illness (HPI) and past medical history (PMH) in the generated medical record.

[0006] From an algorithmic perspective, this is because general-purpose large models are prone to positional encoding dependency when dealing with long contexts. The model tends to assume that later statements describe recent events, ignoring the semantic time defined by implicit time adverbs (such as "three years ago" or "last week") within the statements. Current technology lacks an explicit temporal dependency graph mechanism to force the model to decouple the "narrative order" from the "event order" before generating a report.

[0007] Without introducing a dedicated temporal reasoning module, relying solely on the Transformer's self-attention mechanism is insufficient to teach the model to navigate intricate causal timelines. The model remains based on "shallow aggregation" of text positions rather than "spatiotemporal reconstruction" based on event logic. This results in logically confused medical records, or even reversed causal relationships, when faced with complex cases involving chronic disease relapses or multiple disease courses.

[0008] (2) There is a serious "factual illusion" and omission of key information, and the ability to resist noise is weak:

[0009] Existing models frequently exhibit hallucinations when processing lengthy, conversational doctor-patient dialogues. For example, a patient might simply ask, "Is it possible I have diabetes?", but the model might directly record in the generated medical record that "the patient has a history of diabetes." Furthermore, the model is highly susceptible to misunderstandings of negative words (such as "no" or "not") and ambiguous expressions in spoken language.

[0010] The root of this problem lies in the attention dilution and excessive smoothing of language generation probabilities within long contexts. Clinical dialogues contain a large amount of noise information such as small talk, repetition, and pauses that are irrelevant to the patient's condition. General-purpose large models often struggle to maintain sensitivity to low-frequency key entities (such as specific drug dosages and negative physical signs) while filtering out noise. Existing fine-tuning methods have failed to effectively establish fine-grained evidence alignment between the "original dialogue data fragments" and the "generated summary".

[0011] In the context of rigorous medical documentation, such falsification of information is fatal. If the model cannot accurately identify negative intentions or hypothetical tones in a patient's spoken language, doctors cannot determine the authenticity of medical records. Such "fluent summaries" containing factual errors pose significant medical legal and safety risks.

[0012] (3) The lack of a structured constraint mechanism makes it impossible to meet the requirements for standardized electronic medical records to be stored in the database:

[0013] Existing intelligent summarization systems typically generate free-text paragraph summaries, which can only serve as simple reading references. Although some technologies attempt to require models to output in a specific format through prompt engineering, the models often suffer from field drift or formatting corruption due to the lack of strong constraints, failing to strictly adhere to the Subjective, Objective, Assessment, Plan (SOAP) standards or the database schema requirements of Hospital Information Systems (HIS).

[0014] Existing end-to-end generation architectures lack a controlled decoding module. General models cannot understand medical terminology standards, such as International Classification of Diseases 10th Revision (ICD-10) coding or the Systematic Nomenclature of Medicine - Clinical Terminology (SNOMED CT) terminology set, resulting in generated text filled with patients' colloquial descriptions (such as "stomach ache") rather than standard medical terms (such as "upper abdominal pain").

[0015] The core value of medical big data lies in standardization and structuring. If the model cannot directly generate structured fields that can be parsed by the database, doctors still need to perform a large amount of manual secondary structured data entry. This makes it difficult for existing AI medical record systems to truly integrate into the automated workflow of hospitals and achieve genuine cost reduction and efficiency improvement. Summary of the Invention

[0016] To address the shortcomings of the existing technology, this application aims to provide a method and system for generating structured reports based on clinical dialogue data, in order to solve at least one of the following technical problems:

[0017] 1) This application addresses the problem of logical inconsistencies in the temporal sequence of medical records caused by the misalignment of semantic time and narrative order when processing long-term clinical dialogues using existing summarization models. Existing models primarily rely on linear absolute position encoding to process text, which cannot effectively handle non-linear expressions frequently used by patients during consultations, such as digressions and flashbacks (e.g., describing current symptoms before recalling medical history from several years ago). This application solves the problem of how to reconstruct linear dialogue flows into a topologically structured event-time network by constructing a dynamic temporal dependency graph, thereby accurately reconstructing the true timeline of disease development without relying on the narrative order.

[0018] 2) This application addresses the issues of key information omission and factual illusion arising from attention diffusion in general-purpose large-scale models when dealing with highly conversational and noisy doctor-patient dialogues. Existing models struggle to filter out ineffective noise such as greetings, repetitions, and pauses while maintaining sensitivity to low-frequency medical event entities (e.g., specific drug dosages, negative physical signs), often leading to recording distortion. This application addresses how to utilize Temporal-aware Graph Attention (GAT) and multi-granularity information aggregation strategies to accurately identify and associate key medical features within complex dialogue flows, establishing strong evidence alignment between generated content and original dialogue data fragments, thereby eliminating factual errors.

[0019] 3) This application addresses the problem that existing technologies generate abstracts that are mostly unstructured free text, failing to meet the requirements of Hospital Information Systems (HIS) for standardized data storage and secondary utilization. Existing end-to-end generation models lack explicit control mechanisms, resulting in text with arbitrary formats that struggle to strictly adhere to clinical guidelines such as SOAP (Chief Complaint – Present Illness – Objective Examinations – Treatment Plan) or ICD / SNOMED standard terminology sets. This application addresses how to introduce structured constraints and controlled text generation strategies into the decoding and generation process, achieving end-to-end mapping from unstructured natural language spoken streams to standardized, directly storeable structured medical data.

[0020] Firstly, this application provides a method for generating structured reports based on clinical dialogue data, comprising the following steps:

[0021] S1. Preprocess the clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set;

[0022] S2. Based on the results of step S1, perform joint extraction of time-series and medical entities to obtain a set of medical event nodes and a set of time anchor nodes.

[0023] S3. Construct a dynamic temporal dependency graph to obtain a topological network that characterizes the timeline and causal logic of disease occurrence and development; the dynamic temporal dependency graph is a directed heterogeneous graph, including a node set and an edge set, wherein the node set consists of a medical event node set and a time anchor node set, and the edge set includes co-occurrence association edges, temporal sequence edges, and semantic causal edges.

[0024] S4. Encode dynamic temporal dependency graphs based on graph attention networks and extract graph encoding features;

[0025] S5. The graph coding features and the text coding features of the clinical dialogue data are fused in a dual-stream manner, and controlled decoding is performed under structured constraints to obtain a structured medical report.

[0026] In one possible implementation, S1 specifically includes:

[0027] S1.1 For the clinical dialogue text sequence, construct a role-aware input vector for each word. The role-aware input vector is fused with word embedding vector, position encoding vector and role embedding vector to obtain an initial sequence matrix with role labels.

[0028] S1.2. Set a reference zero point time, extract the time entities in the dialogue and convert them into normalized relative time through a mapping function to obtain a normalized relative time set; wherein the normalized relative time includes the relative time offset or relative time interval relative to the reference zero point time.

[0029] In one possible implementation, in S2, for the initial sequence matrix, the ClinicalBERT-BiLSTM-CRF architecture is used to jointly extract medical event entities and time entities to obtain a medical event node set and a time anchor node set. Each node in the medical event node set represents a medical event entity, and each time anchor node in the time anchor node set represents an element in the normalized relative time set corresponding to a time entity.

[0030] In one possible implementation, the construction rules for various types of edges in S3 are as follows:

[0031] Co-occurrence association edges: If a medical event node and a time anchor node appear in the same round of dialogue or adjacent context windows, an undirected edge is established; Temporal sequence edges: Only established between time anchor nodes, the time anchor nodes are sorted according to normalized relative time, and a unidirectional chain connection is established; Semantic causal edges: An external medical knowledge graph is introduced to calculate the prior causal probability of any two medical event nodes. If the prior causal probability is greater than a preset threshold and the occurrence time of the preceding medical event node is earlier than that of the following medical event node, a directed edge is established.

[0032] In one possible implementation, S4 specifically includes:

[0033] S4.1. Using a continuous-time coding function, the relative time difference between nodes in the dynamic temporal dependency graph is mapped to a sine-cosine coding vector.

[0034] S4.2 Integrate the sine-cosine encoding vector obtained in step S4.1 into the attention coefficient calculation of the graph attention network, and combine the attention coefficient to complete the node feature iterative update to obtain the graph encoding features.

[0035] In one possible implementation, the attention coefficient is calculated using the following formula in S4.2:

[0036] ;

[0037] ;

[0038] in, Indicates the first Layer nodes right Attention score Indicates the first Layer nodes right Attention coefficient This represents the activation function of a linear rectified circuit with leakage. For attention vectors, Indicates the first Layer-learnable weight matrix, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, For nodes With nodes Time difference between The mapping vector, This represents a vector concatenation operation; Represents a node The set of all neighboring nodes, Indicates the first Layer nodes right Attention score;

[0039] The feature update formula is:

[0040] ;

[0041] In the formula, Indicates the first Layer nodes eigenvectors, It is a non-linear activation function;

[0042] pass Layer iteration yields nodes The final feature vector ,Will As a node The graph coding features.

[0043] In one possible implementation, S5 specifically includes:

[0044] S5.1. A cross-attention fusion mechanism is adopted to fuse graph encoding features and text encoding features to obtain a context fusion feature matrix. The formula is:

[0045] ;

[0046] ;

[0047] in, Represents the query feature matrix. This indicates the self-attention mechanism. This is the decoder feature matrix; For the final context fusion feature matrix, This indicates a multi-head attention mechanism. For querying the matrix, The key matrix, For value matrices, This is a graph coding feature matrix composed of the graph coding features of the nodes; The text encoding feature matrix;

[0048] S5.2 Construct a structured prompt template based on the clinical SOAP standard, and fuse the feature matrix from the context. Extract the relevant features and fill them into the preset slots of the structured prompt template to generate a structured report.

[0049] In one possible implementation, in step S5.2, the generation process is optimized using a multi-task loss function; the multi-task loss function is:

[0050] ;

[0051] in, Indicates the total loss; This represents the generation loss, which constrains the content of the slots filled by the model to maintain semantic consistency with the original dialogue semantics and medical entity information, ensuring the semantic accuracy and fluency of the generated text. Weights are applied to time-series consistency loss. For any two medical event entities appearing in the generated report, the loss is due to temporal consistency. In TDG, The occurrence time was earlier than Then force the generation of text in The position index is less than ,Right now Must appear Previously; if it occurred Prior to If a timing inversion error occurs, the model is penalized through timing consistency loss; Weights for entity loss; This is for entity loss, used to ensure that the medical event entities in the generated report remain consistent with the original dialogue data and dynamic temporal dependency graph.

[0052] In one possible implementation, the method further includes the steps of performing logical consistency verification and feedback correction on the generated structured medical report: extracting the time-event chain in the report and comparing it with the time causal logic of the dynamic temporal dependency graph; if a logical conflict is detected, a correction prompt is generated and fed back to step S5 for regeneration until the verification passes.

[0053] Secondly, this application provides a structured report generation system for clinical dialogue data, including:

[0054] The preprocessing module is used to preprocess clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set.

[0055] The entity extraction module is used to perform joint extraction of time-series and medical entities based on the results of the preprocessing module, to obtain a set of medical event nodes and a set of time anchor nodes.

[0056] The dynamic temporal dependency graph construction module is used to construct a dynamic temporal dependency graph, which is a directed heterogeneous graph including a node set and an edge set. The node set consists of a medical event node set and a time anchor node set. The edge set includes co-occurrence association edges, temporal sequence edges, and semantic causal edges.

[0057] The temporal-aware reasoning coding module is used to encode dynamic temporal-dependent graphs based on graph attention networks and extract graph coding features;

[0058] The dual-stream feature fusion and controlled generation module is used to fuse graph coding features with text coding features from clinical dialogue data, and perform controlled decoding under structured constraints to obtain a structured medical report.

[0059] In some possible implementations, the system further includes a logic verification feedback module, which extracts the time-event chain from the report, compares it with the time causal logic of the dynamic temporal dependency graph, and generates a correction prompt if a logical conflict is detected. This prompt is then fed back to the dual-stream feature fusion and controlled generation module for regeneration until the verification passes.

[0060] Thirdly, this application provides an electronic device, including: a memory and a processor;

[0061] The memory is used to store computer programs;

[0062] The processor is used to invoke the computer program to execute the method described above.

[0063] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed on an electronic device, causes the electronic device to perform the method described above.

[0064] Fifthly, this application provides a computer program product, including a computer program that, when run on an electronic device, causes the electronic device to perform the method described above.

[0065] The specific implementation methods of the second to fifth aspects of this application can refer to the implementation methods of the first aspect, and will not be elaborated here.

[0066] This application proposes a system and method for generating disease summaries and reports from clinical dialogue data. By introducing a temporal dependency graph (TDG) and a controlled generation architecture, it has the following significant advantages compared to existing end-to-end summarization models or general large language models:

[0067] (1) It fundamentally solves the problem of "time sequence reversal" in clinical narratives and significantly improves the accuracy of medical record logic:

[0068] Technical Features and Principles: This application maps a linear dialogue flow into an event network with topological logic by constructing a Dynamic Temporal Dependency Graph (TDG). It utilizes a continuous-time encoding function to explicitly encode relative time offsets, breaking the dependence of traditional models on narrative order.

[0069] Beneficial effects: Existing products are prone to logical confusion when handling patients' "flashback" or "reverse chronological" expressions (such as first stating the current situation and then recalling medical history from several years ago). This application can accurately restore the true timeline of disease occurrence and development, effectively avoiding the serious error of mistakenly inserting "past history" into "present illness history." When handling complex multi-stage disease dialogues, the temporal logic accuracy of this method is improved by more than 45% compared to traditional linear models.

[0070] (2) A rigorous logical consistency verification closed loop was constructed to curb "medical illusion" at the algorithm level:

[0071] Technical features and principles: This application introduces a timing consistency loss function at the output end. With a fact-checking and verification mechanism.

[0072] Beneficial Effects: General-purpose large models often suffer from the illusion of "misattribution" due to attentional diffusion (such as misrecording a patient's inquiry as a previous diagnosis). This application compares the generated report fragments back to the original time-series graph by reverse mapping, and automatically corrects any logical conflicts detected (such as medication use occurring before the onset of illness). This closed-loop verification greatly enhances the system's security, ensuring that every generated summary is supported by genuine clinical evidence.

[0073] (3) It has achieved end-to-end conversion from "fragmented spoken language" to "standardized data", which has greatly optimized the clinical workflow:

[0074] Technical features and principles: This application adopts controlled decoding technology under structured constraints, which directly fills the feature vector into the preset SOAP template slot.

[0075] Beneficial effects: Existing technologies generate abstracts that are mostly unstructured paragraphs, making them unsuitable for direct entry into the HIS system database. The content output by this application strictly adheres to clinical treatment guidelines and standard medical terminology (such as standardized terminology mapping), achieving "dialogue as data." This eliminates the burden of secondary manual data entry for doctors, improving medical record writing efficiency by over 80%, and allowing medical staff to dedicate more energy to patient care.

[0076] (4) It possesses strong noise resistance and medical context awareness, improving the accuracy of capturing key information:

[0077] Technical features and principles: This application introduces role-aware embedding and semantic causal edges. .

[0078] Beneficial effects: Clinical conversations are often filled with noise, such as small talk, pauses, and vague expressions. This application, by distinguishing the identities of doctors (facilitators) and patients (narrators) and combining the causal logic of a medical knowledge base (such as the association between "getting caught in the rain" and "catching a cold"), can accurately locate low-frequency but crucial medical entities (such as specific drug dosages and negative signs) in noisy conversations, significantly reducing the omission rate of key information.

[0079] (5) It provides a highly flexible "human-machine collaboration" correction mechanism, which balances automation and professional rigor:

[0080] Technical features and principles: Based on the incremental update characteristics of dynamic graph structure, the system supports logical corrections during multi-turn dialogue processes.

[0081] Beneficial effects: When a patient corrects their earlier statement about a time later in the conversation (e.g., "I misremembered, it was three days ago"), the system does not need to reprocess the entire text. It only needs to dynamically update the node attributes and edge connections in the TDG graph to automatically and synchronously correct the generated report content. This flexible feedback mechanism makes the system more consistent with the real dynamic clinical consultation process, ensuring the authority of the final report.

[0082] In summary, this application is not only a text summarization technology, but also a clinical cognitive tool with temporal reasoning capabilities and structured generation constraints, which can significantly improve the output quality, logical accuracy, and recording efficiency of medical documents. Attached Figure Description

[0083] Figure 1 This is a flowchart of a method in one embodiment of this application. Detailed Implementation

[0084] To enable those skilled in the art to better understand the present application, the technical solution of the present application will be further described in detail below with reference to the embodiments and accompanying drawings.

[0085] It should be noted that the terms "comprising" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0086] In this embodiment of the disclosure, the character "" indicates that the preceding and following objects are in an "OR" relationship. For example, A / B means: A or B.

[0087] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.

[0088] This application relates to the use of temporal-dependent graph neural networks (TD-GNN), specifically graph attention networks (GAT), to dynamically model and reconstruct the non-linear, fragmented temporal logic in doctor-patient dialogues. By introducing temporal-aware attention and controlled structured decoding mechanisms, it achieves deep temporal logic analysis, causal relationship extraction, and automatic generation of SOAP (Subjective, Objective, Assessment, Plan) reports from long-term clinical spoken data. This addresses the problems of temporal disorder, illusion generation, and unstructured data inability to be stored in existing technologies when handling complex medical histories. This technical solution is widely applicable to applications such as automatic archiving of intelligent electronic medical records (EMR), online consultation summaries in internet hospitals, full-cycle follow-up management of chronic diseases, and intelligent assisted triage in emergency departments.

[0089] The specific embodiments of this application will now be described with reference to the accompanying drawings.

[0090] Example 1:

[0091] This embodiment provides a method for generating structured reports from clinical dialogue data. To achieve the generation of structured reports (including disease summaries) from clinical dialogue data, this application uses dual-stream encoding based on Temporal Dependency Graph Enhanced. This method does not rely on a single linear text encoding, but instead constructs a heterogeneous graph network to map the nonlinear dialogue stream into an event logic network with a topological structure, and uses a controlled decoder to generate standardized medical reports.

[0092] The detailed working mechanism of the method flow in this embodiment is as follows:

[0093] S1. Preprocess the clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set.

[0094] In some implementations, this step specifically includes:

[0095] S1.1 For the clinical dialogue text sequence, construct a role-aware input vector for each word. The role-aware input vector is fused with word embedding vector, position encoding vector and role embedding vector to obtain an initial sequence matrix with role labels.

[0096] Clinical dialogue data can include multimodal dialogue data, such as voice dialogue data and text dialogue data. Voice dialogue data can be transcribed into text dialogue data using automatic speech recognition (ASR). The final result is a sequence of dialogue text. ,in Indicates the first Round of dialogue, This represents the total number of dialogue rounds. To differentiate the information weights for doctors and patients, a role-aware input representation is first constructed. For each token... Define the initial input vector as follows:

[0097] ;

[0098] in, For the t-th word element The initial input vector; for The corresponding embedding vector; for The corresponding positional encoding vector; Speaker Embedding. Indicates the speaker's role (doctor / patient), when the speaker is a doctor. When taking for the patient ,in Embed vectors for the doctor role. Embed vectors for the patient role. This allows the model to automatically focus on the doctor's questions (guidance information) and the patient's answers (symptom information).

[0099] Thus, the standardized dialogue text sequence matrix, i.e., the initial sequence matrix, is obtained. , The number of lexical units.

[0100] S1.2. Set a reference zero point time, extract the time entities in the dialogue and convert them into normalized relative time through a mapping function to obtain a normalized relative time set; wherein the normalized relative time includes the relative time offset or relative time interval relative to the reference zero point time.

[0101] To address ambiguous time expressions in spoken language (such as "the day before yesterday" or "last week"), a baseline time anchoring algorithm is introduced. The current consultation time is set as the reference midnight time. The time entities are extracted using regular expressions and a time parser, and then mapped using a mapping function. Transform it into the corresponding offset (Unit: hours). For fuzzy time periods (such as "these few days"), map them to time intervals. , Indicates the start time. It uses the end time, rather than a single point in time, to preserve the uncertainty of time.

[0102] This step implements relative time normalization.

[0103] S2. Based on the results of step S1, perform joint extraction of time-series and medical entities to obtain a set of medical event nodes and a set of time anchor nodes.

[0104] In some embodiments, for the initial sequence matrix, a pre-trained language encoder (such as the medical domain-specific BERT model ClinicalBERT)-BiLSTM-CRF architecture is used to perform medical named entity recognition (NER), jointly extracting medical event entities and time entities to obtain a medical event node set and a time anchor node set. Each node in the medical event node set represents a medical event entity, and each time anchor node in the time anchor node set represents a normalized relative time set element corresponding to a time entity.

[0105] For example, using Sequence labeling is performed using the BiLSTM-CRF architecture. The tag set is defined as follows: ,in These represent the start position of symptom entities, the middle position of symptom entities, the start position of drug entities, and the start position of time entities, respectively. The label set covers all medical events and time types. The dialogue text is labeled word-by-word with its corresponding entity type, and finally aggregated into two types of node sets. The model outputs these two types of node sets to initialize the graph.

[0106] Medical Event Node Set This includes physical aspects such as symptoms, examinations, medications, and surgeries; among which... Indicates the first A medical event node, , This represents the total number of medical event nodes.

[0107] Time anchor node set Each node corresponds to an element in the normalized relative time set (relative to...). offset (or time interval); where For the first Each time anchor node , This represents the total number of time anchor nodes.

[0108] In some embodiments, this step may also include node feature initialization, including:

[0109] The initial sequence matrix with role tags obtained from step S1 The input is fed into a pre-trained language encoder (such as ClinicalBERT) to perform deep contextual feature extraction, resulting in the encoded hidden layer representation sequence. :

[0110] ;

[0111] For any medical event node identified through the CRF layer (For example, by the first) To the The entity "aspirin" (composed of 12 lexical units) is subjected to mean pooling of its corresponding context features to obtain the initial feature representation of the entity. :

[0112] ;

[0113] This feature That is, it serves as the input to the layer 0 node of the Temporal-GAT network in the subsequent step S4. .

[0114] S3. Construct a dynamic temporal dependency graph (TDG) to obtain a topological network that characterizes the timeline of disease occurrence and development and causal logic. The dynamic temporal dependency graph is a directed heterogeneous graph, including a node set and an edge set. The node set consists of a medical event node set and a time anchor node set. The edge set includes co-occurrence association edges, temporal sequence edges, and semantic causal edges.

[0115] This step is the core conceptual part of this application. To capture nonlinear logic, a dynamic temporal dependency graph is constructed. This dynamic temporal dependency graph is a directed heterogeneous graph, which can be represented as follows: ,in For a set of nodes; This application defines three types of heterogeneous edges to explicitly model clinical logic:

[0116] (1) Co-occurrence Edge ):

[0117] Connection rules: If medical event node With time anchor node If they appear in the same round of dialogue or in adjacent context windows (such as Window Size=3), then an undirected edge is created.

[0118] Function: To capture local "time-event" binding relationships (such as "yesterday" and "fever" in the same sentence).

[0119] (2) Sequential Edge ):

[0120] Connection rule: Established only between time anchor nodes. Based on normalized... The values ​​are sorted across all time anchor nodes, and a unidirectional chain connection is established: , This indicates the number after being sorted chronologically by physical time. Each time anchor node .

[0121] Function: To construct the physical timeline of the illness, force the model to understand the sequential flow of time, and solve the problem of reverse chronology.

[0122] (3) Semantic causal edge (Causal Dependency Edge) ):

[0123] Connection rules: Introduce an external medical knowledge graph (such as CMeKG) to calculate any two medical event nodes. Prior causal probability between .like (Threshold) and in the figure Then a directed edge is established. ;in This is a time mapping function. The input is a medical event node, and the output is the normalized time anchor node that the node is bound to in the time dependency graph (TDG).

[0124] Function: To infuse prior medical knowledge (such as "a cold" usually leads to "coughing") and enhance logical reasoning ability.

[0125] The dynamic temporal dependency graph explicitly depicts the topological structure of the disease's evolution over time, solving the problem of temporal logic confusion caused by "interludes and flashbacks" in spoken narratives.

[0126] S4. Encode dynamic temporal dependency graphs based on graph attention networks and extract graph encoding features.

[0127] To address long-distance dependencies, this application proposes an improved graph attention mechanism, Temporal-GAT, which explicitly encodes consecutive temporal distances into attention weights.

[0128] S4.1. Using a continuous-time coding function, the relative time difference between nodes in the dynamic temporal dependency graph is mapped to a sine-cosine coded vector.

[0129] Specifically, a continuous-time coding function is defined to map the time difference between nodes into a high-dimensional vector, as shown in the formula:

[0130] ;

[0131] in, For nodes With nodes Time difference between The mapping vector, For the first Group frequency scaling parameters, , The encoding vector is half a dimension, and the final output vector has a total dimension of 2d (each sin / cos occupies 2 dimensions).

[0132] This step enables relative temporal encoding.

[0133] S4.2 Integrate the sine-cosine coding vector into the attention coefficient calculation of the graph attention network, and combine the attention coefficient to complete the node feature iterative update to obtain the graph coding features.

[0134] In some embodiments, in the graph neural network's... The formula for calculating the attention coefficient of a node to its neighboring nodes in a layer is as follows:

[0135] ;

[0136] ;

[0137] in, Indicates the first Layer nodes right Attention score Indicates the first Layer nodes right Attention coefficient This represents the activation function of a linear rectified circuit with leakage. For attention vectors, Indicates the first Layer-learnable weight matrix, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, This represents a vector concatenation operation; Represents a node All neighboring nodes (in TDG) A set of nodes connected by edges. Indicates the first Layer nodes right Attention score.

[0138] The feature update formula is:

[0139] ;

[0140] In the formula, Indicates the first Layer nodes eigenvectors, It is a non-linear activation function (such as Sigmoid or ReLU).

[0141] pass Layer iteration (e.g.) ), to obtain nodes The final feature vector Each medical event node eigenvectors It not only aggregates semantic information, but also aggregates the temporal logical information of the entire graph (for example, the "fever" node will be aggregated with the information of the previous "rain" node).

[0142] This step enables time-aware message passing.

[0143] Step S5: Perform dual-stream fusion of graph coding features and text coding features from clinical dialogue data, and perform controlled decoding under structured constraints (pattern constraints) to obtain a structured medical report.

[0144] In some embodiments, this step specifically includes:

[0145] S5.1. A cross-attention fusion mechanism is adopted to fuse graph encoding features and text encoding features to obtain a context fusion feature matrix. .

[0146] To balance the fluency of the text (Text Encoder) and the rigor of the logic (Graph Encoder), a cross-attention fusion mechanism is adopted.

[0147] In some embodiments, each layer of the decoder fuses information using the following formula:

[0148] ;

[0149] ;

[0150] in, Represents the query feature matrix; This represents the self-attention mechanism; The feature matrix of the decoder. The initial value can be initialized by the embedding vector of the structured prompt template, which consists of the word embeddings and positional encodings of the structured prompt. This is used during the word-by-word / segment-by-segment report generation process. It iterates dynamically as the generated content is updated. Each time a word or slot content is generated, the decoder updates itself based on the features of the generated sequence through a self-attention mechanism. The value of is determined to ensure that it can represent the context information of the current generated state; For the final context fusion feature matrix, This indicates a multi-head attention mechanism. For querying the matrix, The key matrix, For value matrices, Encode the feature matrix for the graph. It is the final feature vector of all nodes. We obtain it by performing global pooling (such as average pooling / summing pooling / self-attention pooling), i.e. ; The text encoding feature matrix is ​​the feature matrix obtained after encoding the original clinical dialogue text sequence.

[0151] This allows the generative model to refer to both the original dialogue data and the temporal logical features derived through reasoning when writing reports.

[0152] S5.2 Construct a structured prompt template based on the clinical SOAP standard, and fuse the feature matrix from the context. Extract the relevant features and fill them into the preset slots of the structured prompt template to generate a structured report.

[0153] To output a structured report, a schema prompt template is introduced during the decoding phase. This enables targeted and constrained text generation.

[0154] For example, a structured cue template is constructed based on the clinical SOAP criteria (subjective symptoms, objective examinations, disease assessment, and treatment plan). The template format is as follows: Construct cue template: ;in , , , , , , These represent the start marker for the SOAP report, the start marker for the subjective data module (S), the slot for the history of present illness, the end marker for the subjective data module (S), the start marker for the objective data module (O), the slot for vital signs, and the end marker for the objective data module (O), respectively.

[0155] The final context fusion feature matrix Input decoder, decoder from Targeted extraction of each slot (i.e.) The location of the marker, where The corresponding feature information, such as from Extract temporal features with small time offsets and fill in symptom semantic features. Extract and inspect relevant entity features to fill in .

[0156] The model is trained to fill content only within the preset slots in the template, avoiding field drift and formatting issues, and ensuring that the structure of the generated content strictly matches clinical guidelines.

[0157] In some embodiments, based on During the report generation process using structured prompt templates, in order to enforce model compliance... To avoid temporal inversion errors during the generation process, the model incorporates inherent temporal causal logic. A multi-task hybrid loss function is designed to perform end-to-end optimization. The specific definition and execution logic are as follows:

[0158] ;

[0159] in, Indicates the total loss; This represents the generation loss (standard Seq2Seq cross-entropy loss), in order to For reference, the content of the slots filled by the constraint model is semantically consistent with the original dialogue semantics and medical entity information to ensure the semantic accuracy and fluency of the generated text, which is the basic loss term for natural language generation tasks. The weights for time-series consistency loss are adjustable hyperparameters. For any two medical event entities appearing in the generated report, the loss is due to temporal consistency. In TDG, The occurrence time was earlier than ,Right now Then force the generation of text in The position index is less than ,Right now Must appear Previously; if it occurred Prior to If a temporal inversion error occurs, the model is penalized through temporal consistency loss; the temporal consistency loss is constructed based on contrastive learning loss. The entity loss weights are adjustable hyperparameters. This is for entity loss, used to ensure that medical event entities (symptoms, drugs, examinations, surgeries, etc.) in the generated report are not omitted, tampered with, or hallucinated, and remain consistent with the original dialogue data and dynamic temporal dependency graph.

[0160] In some embodiments, the method further includes a step of performing logical consistency verification and feedback correction on the generated structured medical report: extracting the time-event chain from the report, comparing it with the time causal logic of the dynamic temporal dependency graph, generating a correction prompt if a logical conflict is detected, and feeding it back to step S5 for regeneration, until the verification passes. For example, if a causal inversion error such as "medication was administered before the onset of illness" is found in the generated report, it is determined to be a "logical illusion".

[0161] Correction of closed loop: If it is determined to be a hallucination, the system automatically generates a correction prompt and feeds it back to the generation step, requiring it to regenerate based on the temporal edge constraints until it passes the verification.

[0162] The following simulated application examples illustrate the solution proposed in this application.

[0163] This simulation case details the core logical architecture and data flow process proposed in this application. This process does not rely on specific hardware devices, but rather runs as a computer program in a computing environment with natural language processing capabilities.

[0164] This simulated case uses a nonlinear doctor-patient dialogue with a virtual patient with acute gastritis as input to fully demonstrate the end-to-end generation process of the proposed method from the original spoken dialogue to the structured medical report, and to verify the effectiveness of the solution in solving problems such as temporal disorder, noise filtering, and structured generation.

[0165] Scene description:

[0166] The patient sought medical attention for stomach pain. During the doctor-patient dialogue, the patient used a non-linear narrative style (first describing the symptoms of the day, then recounting the triggers from the day before and the medication taken the previous day). The dialogue contained colloquial expressions, no redundant noise, and no explicit medical terminology. The specific doctor-patient dialogue flow (after ASR transcription) is as follows:

[0167] Patient: "Doctor, I feel better today."

[0168] Doctor: "When did the pain start?"

[0169] Patient: "It started the night before last after I ate seafood, and the pain was very severe."

[0170] Patient: "I bought some stomach medicine at the pharmacy yesterday, but it didn't seem to help much after taking it."

[0171] This case strictly followed steps S1-S5 of this application plus logical consistency verification, ultimately outputting a SOAP standard medical report with a structured medical condition summary at its core. The execution results and technical effects of each step are as follows:

[0172] The first stage includes preprocessing (S1-S3), entity extraction, and TDG map construction:

[0173] Multimodal dialogue preprocessing and relative time axis reconstruction: setting the current diagnosis and treatment time as the reference zero point. By decoupling the roles in the dialogue (distinguishing between patient / doctor speech) and normalizing the time expressions, we obtain: (The night before last) (yesterday), (Today); Filter out doctor's questions, small talk, and other information that is not related to the patient's condition, and retain the standardized text sequence of the patient's core symptom description.

[0174] The joint extraction of time-series and medical entities and the initialization of heterogeneous graphs employ the ClinicalBERT-BiLSTM-CRF architecture to extract medical event entities and time anchor entities, resulting in: a medical event node set Vevent: {eating seafood, severe stomach pain, self-medicating with a certain stomach medicine, symptoms not improved, stomach pain lessened}; and a time anchor node set. Assign initial features of ClinicalBERT context embedding to all nodes to complete the heterogeneous graph initialization.

[0175] The construction of a Dynamic Temporal Dependency Graph (TDG) is based on initializing nodes, and constructs a directed heterogeneous graph G=(V,E) containing three types of heterogeneous edges. The core construction result is as follows:

[0176] Co-occurrence related edges: linking "eating seafood / severe stomach pain" with... The phrase "self-medication with no improvement in symptoms" is linked to... "Stomach pain relief" Binding;

[0177] Sequential edges: Establishing a unidirectional time chain → → Build a physical time framework;

[0178] Semantic causal edges: By introducing the CMeKG Chinese medical knowledge graph, it was calculated that stomach pain is caused by eating seafood (preset threshold), and that eating seafood causes stomach pain. A directed causal edge was established: eating seafood → severe stomach pain. Finally, a TDG topology network was obtained that describes the temporal-causal logic of the patient's condition development, solving the problem of temporal disorder in the patient's nonlinear narrative.

[0179] The second phase includes graph reasoning coding for S4-S5, two-stream fusion, and controlled report generation:

[0180] Temporal-Aware Graph Attention Network (Temporal-GAT) inference encoding encodes the relative temporal position of the TDG graph. It aggregates node features through three layers of temporal-aware message passing and extracts graph encoding features. This feature integrates the complete temporal causal logic of "eating seafood → stomach pain → ineffective medication → relief today", providing core logical support for the generation of disease summary.

[0181] Two-stream fusion: encoding graph features Text encoding feature matrix of the original dialogue The fusion yields a fusion feature matrix that combines logical rigor with textual fluency;

[0182] Controlled generation: Load the SOAP standard structured prompt template, fill the template slots with the fusion feature matrix, generate a structured medical condition summary in the chief complaint (S) slot, and supplement the content of objective examination, assessment, planning and other modules to form a complete report;

[0183] Loss function optimization: through multi-task loss function Constrain the generation process to ensure consistency of temporal logic and that no medical entities are omitted or hallucinated.

[0184] Result generated:

[0185] Structured summary of patient's condition: The patient experienced severe stomach pain 48 hours after consuming seafood. 24 hours prior, the patient took a stomach medication on their own, but the symptoms did not improve. On the day of consultation, the patient felt that the stomach pain was less severe than before, with no other discomfort. Body temperature and bowel movements were normal.

[0186] A preliminary SOAP medical report based on this summary:

[0187] S (Subjective Data): The patient experienced severe, intermittent stomach pain 48 hours prior to presentation after consuming seafood. 24 hours prior, the patient self-medicated with a stomach medication, but the symptoms did not improve significantly. On the day of presentation, the patient reported a reduction in stomach pain compared to the previous episode. O (Objective Data): No relevant physical or auxiliary examinations have been performed. Vital signs were not measured. The patient is conscious and in good spirits. A (Assessment): Based on the patient's history and symptoms, acute gastritis is highly probable. P (Treatment Plan): 1. Complete blood count, abdominal palpation, and other relevant examinations; 2. Administer acid-suppressing and gastric-protective symptomatic treatment; 3. Instruct the patient to maintain a bland diet, avoiding raw, cold, spicy, and irritating foods; 4. Observe changes in symptoms and follow up if any discomfort occurs.

[0188] Phase 3: Logical Consistency Verification and Final Output (Quality Control, Standardized Report Implementation):

[0189] A second verification is performed on the initially generated SOAP medical report containing a structured summary of the patient's condition.

[0190] Extract the time-event chain from the report: eating seafood (-48h) → stomach pain (-48h) → taking a certain stomach medicine (-24h) → no improvement in symptoms (-24h) → pain relief (0h);

[0191] Perform a back-consistency check: compare the chain with the temporal-causal logic of the original TDG graph. There is no temporal inversion, no factual illusion, and no omission of key entities. The similarity score is 0.98 (high confidence).

[0192] After verification, the colloquial expressions in the report are standardized and mapped to medical terms (e.g., "stomach pain" is mapped to "paroxysmal pain in the upper abdomen"), generating a final standardized report that can be directly stored in the database, and marking "Temporal logic verified" on the interface.

[0193] This case study demonstrates how end-to-end processing directly generates SOAP standard medical reports containing structured medical condition summaries from non-linear, conversational doctor-patient dialogues. This verifies the core advantages of the proposed solution: it resolves the temporal disarray issues inherent in non-linear narratives, accurately reconstructs the true timeline of disease progression, and improves the temporal logic accuracy of the medical condition summary. It effectively filters dialogue noise, accurately captures key medical entities, and eliminates factual illusions and omissions of crucial information. It directly generates standardized, structured SOAP medical reports, with the medical condition summary embedded as core content, eliminating the need for manual secondary structured data entry and significantly improving the efficiency of clinical medical record writing. The generated reports strictly adhere to medical terminology standards and HIS system data entry requirements, achieving the clinical implementation goal of "dialogue as data."

[0194] Example 2:

[0195] This embodiment provides a structured report generation system for clinical dialogue data, including:

[0196] The preprocessing module is used to preprocess clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set.

[0197] The entity extraction module is used to perform joint extraction of time-series and medical entities based on the results of the preprocessing module, to obtain a set of medical event nodes and a set of time anchor nodes.

[0198] The dynamic temporal dependency graph construction module is used to construct a dynamic temporal dependency graph, which is a directed heterogeneous graph including a node set and an edge set. The node set consists of a medical event node set and a time anchor node set. The edge set includes co-occurrence association edges, temporal sequence edges, and semantic causal edges.

[0199] The temporal-aware reasoning coding module is used to encode dynamic temporal-dependent graphs based on graph attention networks and extract graph coding features;

[0200] The dual-stream feature fusion and controlled generation module is used to fuse graph coding features with text coding features from clinical dialogue data, and perform controlled decoding under structured constraints to obtain a structured medical report.

[0201] Example 3:

[0202] This embodiment provides an electronic device, including: a memory and a processor;

[0203] The memory is used to store computer programs;

[0204] The processor is configured to invoke the computer program to execute the method as described in Embodiment 1.

[0205] Example 4:

[0206] This embodiment provides a computer-readable storage medium storing a computer program. When the computer program is run on an electronic device, it causes the electronic device to perform the method described in Embodiment 1.

[0207] Example 5:

[0208] This embodiment provides a computer program product, including a computer program that, when run on an electronic device, causes the electronic device to perform the method described in Embodiment 1.

[0209] The specific implementation of the system, electronic device, computer-readable storage medium, and computer program product provided in this application can be referred to the specific embodiments of the above methods, and will not be repeated here.

[0210] Obviously, those skilled in the art should understand that the various units or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps into a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0211] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for generating structured reports based on clinical dialogue data, characterized in that, Includes the following steps: S1. Preprocess the clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set; S2. Based on the results of step S1, perform joint extraction of time-series and medical entities to obtain a set of medical event nodes and a set of time anchor nodes. S3. Construct a dynamic temporal dependency graph to obtain a topological network depicting the timeline and causal logic of disease occurrence and development; the dynamic temporal dependency graph is a directed heterogeneous graph, including a node set and an edge set, wherein the node set consists of a medical event node set and a time anchor node set, and the edge set includes co-occurrence association edges, temporal sequence edges, and semantic causal edges; the construction rules for each type of edge are as follows: Co-occurrence association edges: If a medical event node and a time anchor node appear in the same round of dialogue or adjacent context windows, an undirected edge is established; Temporal sequence edges: Only established between time anchor nodes, with time anchor nodes sorted according to normalized relative time to establish a unidirectional chain connection; Semantic causal edges: An external medical knowledge graph is introduced to calculate the prior causal probability of any two medical event nodes. If the prior causal probability is greater than a preset threshold and the occurrence time of the preceding medical event node is earlier than that of the following medical event node, a directed edge is established; S4. Encode dynamic temporal dependency graphs based on graph attention networks and extract graph encoding features; S5. The graph coding features and the text coding features of the clinical dialogue data are fused using a dual-stream feature fusion method, and controlled decoding is performed under structured constraints to obtain a structured medical report.

2. The method according to claim 1, characterized in that, S1 specifically includes: S1.1 For the clinical dialogue text sequence, construct a role-aware input vector for each word. The role-aware input vector is fused with word embedding vector, position encoding vector and role embedding vector to obtain an initial sequence matrix with role labels. S1.

2. Set a reference zero point time, extract the time entities in the dialogue and convert them into normalized relative time through a mapping function to obtain a normalized relative time set; wherein the normalized relative time includes the relative time offset or relative time interval relative to the reference zero point time.

3. The method according to claim 1, characterized in that, In S2, for the initial sequence matrix, the ClinicalBERT-BiLSTM-CRF architecture is used to jointly extract medical event entities and time entities, resulting in a medical event node set and a time anchor node set. Each node in the medical event node set represents a medical event entity, and each time anchor node in the time anchor node set represents an element in the normalized relative time set corresponding to a time entity.

4. The method according to claim 1, characterized in that, S4 specifically includes: S4.

1. Using a continuous-time coding function, the relative time difference between nodes in the dynamic temporal dependency graph is mapped to a sine-cosine coding vector. S4.2 Integrate the sine-cosine coding vector into the attention coefficient calculation of the graph attention network, and combine the attention coefficient to complete the node feature iterative update to obtain the graph coding features.

5. The method according to claim 4, characterized in that, In S4.2, the formula for calculating the attention coefficient is as follows: ; ; in, Indicates the first Layer nodes right Attention score Indicates the first Layer nodes right Attention coefficient This represents the activation function of a linear rectified circuit with leakage. For attention vectors, Indicates the first Layer-learnable weight matrix, For the first Layer nodes eigenvectors, For the first Layer nodes eigenvectors, For nodes With nodes Time difference between The mapping vector, This represents a vector concatenation operation; Represents a node The set of all neighboring nodes, Indicates the first Layer nodes right Attention score; The feature update formula is: ; In the formula, Indicates the first Layer nodes eigenvectors, It is a non-linear activation function; pass Layer iteration yields nodes The final feature vector ,Will As a node The graph coding features.

6. The method according to claim 1, characterized in that, S5 specifically includes: S5.

1. A cross-attention fusion mechanism is adopted to fuse graph encoding features and text encoding features to obtain a context fusion feature matrix. The formula is: ; ; in, Represents the query feature matrix. This indicates the self-attention mechanism. This is the decoder feature matrix; For the final context fusion feature matrix, This indicates a multi-head attention mechanism. For querying the matrix, The key matrix, For value matrices, This is a graph coding feature matrix composed of the graph coding features of the nodes; This is the text encoding feature matrix; S5.2 Construct a structured prompt template based on the clinical SOAP standard, and fuse the feature matrix from the context. Extract the relevant features and fill them into the preset slots of the structured prompt template to generate a structured report.

7. The method according to claim 6, characterized in that, In step S5.2, the generation process is optimized using a multi-task loss function; the multi-task loss function is: ; in, Indicates the total loss; This represents the generation loss, which constrains the content of the slots filled by the model to maintain semantic consistency with the original dialogue semantics and medical entity information, ensuring the semantic accuracy and fluency of the generated text. Weights are applied to time-series consistency loss. For any two medical event entities appearing in the generated report, the loss is due to temporal consistency. In TDG, The occurrence time was earlier than Then force the generation of text in The position index is less than ,Right now Must appear Previously; if it occurred Prior to If a timing inversion error occurs, the model is penalized through timing consistency loss; Weights for entity loss; This is for entity loss, used to ensure that the medical event entities in the generated report remain consistent with the original dialogue data and dynamic temporal dependency graph.

8. The method according to any one of claims 1-7, characterized in that, The method also includes the steps of performing logical consistency verification and feedback correction on the generated structured medical report: extracting the time-event chain in the report and comparing it with the time causal logic of the dynamic time sequence dependency graph; if a logical conflict is detected, a correction prompt is generated and fed back to step S5 for regeneration until the verification passes.

9. A structured report generation system for clinical dialogue data, characterized in that, include: The preprocessing module is used to preprocess clinical dialogue data and reconstruct the relative time axis to obtain an initial sequence matrix with role labels and a normalized relative time set. The entity extraction module is used to perform joint extraction of time-series and medical entities based on the results of the preprocessing module, to obtain a set of medical event nodes and a set of time anchor nodes. A dynamic temporal dependency graph construction module is used to construct a dynamic temporal dependency graph, which is a directed heterogeneous graph including a node set and an edge set. The node set consists of a medical event node set and a time anchor node set. The edge types in the edge set include co-occurrence association edges, temporal sequence edges, and semantic causal edges. The construction rules for each type of edge are as follows: Co-occurrence association edges: If a medical event node and a time anchor node appear in the same round of dialogue or adjacent context windows, an undirected edge is established; Temporal sequence edges: Only established between time anchor nodes, with time anchor nodes sorted according to normalized relative time to establish a unidirectional chain connection; Semantic causal edges: An external medical knowledge graph is introduced to calculate the prior causal probability of any two medical event nodes. If the prior causal probability is greater than a preset threshold and the occurrence time of the preceding medical event node is earlier than that of the following medical event node, a directed edge is established; The temporal-aware reasoning coding module is used to encode dynamic temporal-dependent graphs based on graph attention networks and extract graph coding features; The dual-stream feature fusion and controlled generation module is used to fuse graph coding features with text coding features from clinical dialogue data, and perform controlled decoding under structured constraints to obtain a structured medical report.