Method and system for generating medical examination report with image based on deep learning
By structurally integrating medical test records and image sequences and processing them with a deep generative model, a text-based medical report that conforms to clinical logic is generated, solving the problem of insufficient correlation between test data and image features and improving the quality and efficiency of the report.
Patent Information
- Application Number
- CN202511705111.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-20
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-11-20
AI Technical Summary
In existing methods for generating medical test reports, the correlation between test data and image features is weak, resulting in inconsistent report content and unclear correspondence between text and images, making it difficult to meet the requirements of accuracy and convenience in clinical diagnosis.
By structurally integrating the original test records and medical image sequences generated during the medical testing process, a feature mapping rule base is constructed. A deep generation model is then invoked to generate medical descriptive text that conforms to the logic of clinical narrative. Furthermore, a bidirectional referencing relationship between text and images is established to generate standardized graphic medical test reports.
It achieves deep integration of medical text and images, enhancing the diagnostic reference value and ease of use of the report, generating high-quality graphic medical test reports, and supporting clinical diagnosis.
Smart Images

Figure CN121171460B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning, and more specifically, to a method and system for generating graphic medical test reports based on deep learning. Background Technology
[0002] With the deepening development of healthcare informatization, standardized report documents that can be obtained for clinicians' reference can be generated by processing various data generated during medical testing. Currently, the generation of medical test reports largely relies on manual integration of test data and image materials, or the splicing of test values with preset text fragments using simple templates to generate test reports containing text descriptions and static images. However, the correlation between test data and image features is weak, and the text descriptions are prone to problems such as incoherent clinical logic and unclear correspondence between text and images. These issues make it difficult to meet the requirements of clinical diagnosis for the accuracy, logic, and ease of reference of the report content. Consequently, the value of medical test reports in assisting clinical diagnostic decision-making is not fully realized. Therefore, optimizing the generation process of medical test reports to improve report quality has become an urgent technical problem to be solved. Summary of the Invention
[0003] This invention provides a method and system for generating graphic medical test reports based on deep learning.
[0004] In a first aspect, embodiments of the present invention provide a method for generating graphic medical test reports based on deep learning. The method includes: structurally integrating original test records and medical image sequences generated during medical testing to obtain a set of test data units containing temporal correlations, wherein each test data unit in the set contains a unique test event identifier and a corresponding multi-source data reference pointer; constructing a feature mapping rule base based on clinical diagnostic decision logic, and converting quantitative indicators and qualitative descriptions in the test data unit set into standardized clinical feature representations through rule matching; calling a deep generation model to perform adaptation generation processing on the standardized clinical feature representations, adjusting the text generation strategy according to the diagnostic correlation strength between features, and generating medical description text that conforms to clinical narrative logic; and performing diagnostic focus association layout between the medical description text and the corresponding medical image sequence, establishing a bidirectional reference relationship between the text description and the image feature region through semantic anchoring, and generating a standardized graphic medical test report containing dynamic diagnostic reference lines.
[0005] Secondly, embodiments of the present invention provide a computer system, including: a memory storing a computer program; and a processor for loading the computer program to implement the deep learning-based graphic medical test report generation method described above.
[0006] This invention provides a deep learning-based method for generating graphic medical test reports. By structurally integrating raw test records and medical image sequences generated during medical testing, a set of test data units containing temporal correlations is obtained. This organically organizes multimodal medical data into structured units with temporal relationships. A feature mapping rule base is constructed based on clinical diagnostic decision-making logic. Through rule matching, quantitative indicators and qualitative descriptions in the test data unit set are converted into standardized clinical feature representations, achieving accurate conversion of medical test data to clinical features and ensuring that the feature representations conform to clinical diagnostic thinking logic. A deep generative model is invoked to adapt and generate standardized clinical feature representations. The text generation strategy is adjusted according to the diagnostic correlation strength between features, generating medical descriptive text that conforms to clinical narrative logic, making the report content more aligned with clinical diagnostic thinking habits. The medical descriptive text and corresponding medical image sequences are linked for diagnostic focus layout. Through semantic anchoring, a bidirectional referencing relationship is established between the text description and image feature regions, generating a standardized graphic medical test report containing dynamic diagnostic reference lines. This achieves deep integration of medical text and images, enhancing the diagnostic reference value and ease of use of the report. By combining the above steps, this method can automatically generate high-quality graphic medical test reports, improving report generation efficiency and quality, and providing strong support for clinical diagnosis. Attached Figure Description
[0007] Figure 1 This is a flowchart of a method for generating graphic medical test reports based on deep learning, provided in an embodiment of the present invention.
[0008] Figure 2 This is a schematic diagram of the composition of a computer system provided in an embodiment of the present invention. Detailed Implementation
[0009] Please see Figure 1 The flowchart below illustrates a method for generating graphic medical test reports based on deep learning, as provided in an embodiment of the present invention. This method can be executed by a computer system and includes the following steps:
[0010] Step S100: The original test records and medical image sequences generated during the medical test process are structurally integrated to obtain a set of test data units containing temporal correlations. Each test data unit in the set of test data units contains a unique test event identifier and a corresponding multi-source data reference pointer.
[0011] Raw laboratory records are various records directly generated during medical testing, encompassing basic patient information, specific test values, and textual descriptions. This information exists in different formats and structures, exhibiting diversity and complexity. Structured integration involves processing raw laboratory records and medical image sequences to achieve a unified structure and format. Temporal correlation refers to the chronological order and degree of association between data. Establishing temporal correlations allows for a better understanding of the inherent connections between different data points during medical testing. A set of laboratory data units is a group of data units obtained after structured integration. Each data unit contains multi-source data related to a specific testing event. A unique testing event identifier is a unique identifier assigned to each laboratory data unit to distinguish different testing events, while multi-source data reference pointers point to the storage path of the raw data, facilitating retrieval of relevant raw data when needed.
[0012] In one implementation, step S100 may specifically include the following steps S110 to S150:
[0013] Step S110: Perform multimodal field parsing on the original inspection records, extract numerical indicators, textual descriptions and inspection timestamp information according to the inspection items, and generate structured record entries through regular expression matching and domain dictionary verification. The structured record entries contain data type tags and time dimension markers.
[0014] Multimodal field parsing involves analyzing and processing different types of fields in raw test records to extract useful information. Raw test records typically contain various types of information, such as numerical indicators (e.g., values of various biochemical indicators in blood), textual descriptions (e.g., doctors' written explanations of test results), and test timestamp information (recording the time of the test event). Test item classification groups the extracted information according to different test items; for example, blood tests are categorized into complete blood count and biochemical indicators. Numerical indicators are test results represented by specific numbers, such as blood glucose levels and white blood cell counts. Textual descriptions are textual explanations of the test results, such as whether abnormalities exist and the manifestations of abnormalities. Test timestamp information is used to determine the specific time of the test event, providing a basis for subsequent time-series analysis. Regular expression matching uses regular expression rules to find and match specific patterns in text. Through predefined regular expressions, the required information can be accurately extracted from raw test records. Domain dictionary verification verifies and corrects the extracted information against a professional medical dictionary, ensuring the accuracy and professionalism of the information. Structured record entries are records with a uniform structure obtained after processing, which include data type labels (such as numeric and text types) and time dimension markers (indicating the verification time corresponding to the record).
[0015] Step S120: Perform temporal attribute extraction processing on the medical image sequence. Based on the image file header information, parse the time interval parameters of continuous acquisition and the sequence frame index relationship to generate an image temporal sequence with timestamp encoding. The timestamp encoding and the verification timestamp of the structured record entries adopt a unified time reference.
[0016] Temporal attribute extraction processing involves extracting time-related attribute information from medical image sequences to establish the temporal order and relationships of the image data. Medical image sequences are typically acquired consecutively in a specific chronological order, with each image frame having a corresponding acquisition time. The image file header information contains metadata within the image file, which may include important information such as the consecutive acquisition time interval parameter and the sequence frame index relationship. The consecutive acquisition time interval parameter indicates the time interval between the acquisition of two adjacent image frames; parsing this parameter reveals the temporal pattern of image acquisition. The sequence frame index relationship is used to determine the position and order of each image frame in the sequence. Timestamp encoding is a code assigned to each image frame to represent its acquisition time. By using a unified time base, the temporal information of the image frame can be associated with the verification timestamp of the structured record entry.
[0017] Step S130: Input the structured record entries and image time sequence into the time association module, calculate the time offset between the verification timestamp and the image acquisition time interval, and generate a multi-source data time alignment mapping table through a dynamic time warping algorithm. Each record in the time alignment mapping table contains the correspondence between the record entry index and the image frame index.
[0018] The time correlation module is specifically designed to handle the time correlation between structured record entries and image time series. It receives both structured record entries and image time series as input and establishes the time correlation between them through a series of algorithms and processing steps. The time offset between the verification timestamp and the image acquisition time interval is the time difference between the verification timestamp of the structured record entry and the image acquisition time interval. Calculating the time offset reveals temporal asynchrony in multi-source data. The dynamic time warping algorithm is used for aligning time series data. It can non-linearly align time series of different lengths and speeds on the time axis to find the optimal matching path. The multi-source data time alignment mapping table is a mapping table obtained after processing by the dynamic time warping algorithm. It records the time alignment relationship between structured record entries and image frames. Each record contains the correspondence between the record entry index and the image frame index.
[0019] In one implementation, step S130 may specifically include the following steps S131 to S135:
[0020] Step S131: Extract the inspection timestamps and image time series timestamp codes from the structured record entries, and convert them into a timestamp numerical sequence based on a unified time reference. The timestamp numerical sequence is represented in Unix timestamp format. The inspection timestamps in the structured record entries record the time of occurrence of the inspection event corresponding to each record entry, while the timestamp codes of the image time series represent the acquisition time of each image frame. A unified time reference is used to ensure that time information from different sources can be compared and processed at the same scale, for example, using Beijing time. The timestamp numerical sequence is a sequence in which the inspection timestamps and timestamp codes are converted into numerical form according to a unified time reference.
[0021] Step S132: Calculate the time offset between the test timestamp numerical sequence and the image acquisition time interval, generate the offset distribution curve, and identify the offset mutation points through sliding window statistics. The mutation points correspond to possible multi-source data time asynchronous regions.
[0022] The verification timestamp sequence is a numerical sequence representing the verification time obtained through step S131. The image acquisition time interval is the time interval between the acquisition of two adjacent image frames. The time offset is the difference between the verification timestamp sequence and the image acquisition time interval. Calculating the time offset reveals the temporal differences between the multi-source data. The offset distribution curve is a curve plotted with time on the horizontal axis and time offset on the vertical axis, visually demonstrating how the time offset changes over time. Sliding window statistics are a method for performing local statistical analysis on time series data. By setting a fixed-size window and sliding it across the time series, the data characteristics within the window are statistically analyzed. Offset abrupt change points are points on the offset distribution curve where a sudden and significant change occurs. These points may correspond to areas where the multi-source data are out of sync in time.
[0023] Step S133: Input the timestamp value sequence and offset distribution curve into the dynamic time warping algorithm, set the time tolerance threshold of clinical diagnostic events as the warping constraint, perform nonlinear time alignment processing on the timestamp value sequence, and generate a preliminary alignment path.
[0024] Dynamic time warping (VTW) is a classic algorithm for aligning time series data. It non-linearly aligns time series of different lengths and speeds along the time axis to find the optimal matching path. The timestamp sequence is a sequence of values representing time obtained after transformation in step S131. The offset distribution curve reflects the change in time offset between the test timestamp and the image acquisition time interval over time. The time tolerance threshold for clinical diagnostic events is a time range set according to the actual needs of clinical diagnosis; time deviations within this range are considered acceptable. Warping constraints are limitations set in the VTW algorithm to ensure that the alignment results meet the requirements of clinical diagnosis. Non-linear time alignment processing involves processing the timestamp sequence non-linearly along the time axis to achieve better alignment. The preliminary alignment path is a preliminary alignment scheme generated by the VTW algorithm during execution, representing the correspondence between the timestamp sequences.
[0025] Step S134: Calculate the alignment error between each structured record entry and the image frame based on the preliminary alignment path. When the error exceeds the time tolerance threshold, call the local path optimization algorithm to adjust the alignment path so that the time deviation of multi-source data for the same diagnostic event is within the clinically acceptable range.
[0026] Alignment error is the degree of temporal deviation between each structured record entry and its corresponding image frame. Calculating the alignment error allows for the assessment of the accuracy of the initial alignment path. The time tolerance threshold is a time range set based on the actual needs of clinical diagnosis; within this range, temporal deviations are considered acceptable. The local path optimization algorithm is used to locally adjust the initial alignment path. When the alignment error exceeds the time tolerance threshold, this algorithm can be invoked to optimize the alignment path and reduce temporal deviations.
[0027] Step S135: Convert the optimized alignment path into a multi-source data time alignment mapping table containing record entry index, image frame index and time deviation value. The time deviation value is used for time correlation weight calculation during subsequent data unit aggregation.
[0028] The record entry index is a unique identifier for a structured record entry, used to locate a specific entry within the structured record entries. The image frame index is the position index of an image frame in the image time series, used to locate a specific image frame within the image time series. The time deviation value is the degree of temporal deviation between each structured record entry and its corresponding image frame, reflecting the temporal differences between the multi-source data. The multi-source data time alignment mapping table is a table containing record entry indices, image frame indices, and time deviation values, which clearly shows the temporal correspondence between structured record entries and image frames.
[0029] Step S140: Based on the time alignment mapping table, perform data unit aggregation processing on the structured record entries and image time series. According to the temporal continuity of the test events and the correlation with clinical diagnosis, integrate the related record entries and image frames in the same diagnostic stage into preliminary data units. The preliminary data units contain the correlation reference index of multi-source data.
[0030] Data unit aggregation combines related structured record entries and image frames to form a data unit with complete information. Verifying the temporal continuity of events examines the chronological order and coherence of events; considering temporal continuity allows for the integration of related data within the same time period. Clinical diagnostic correlation assesses the degree of association between structured record entries, image frames, and clinical diagnoses; integrating data related to the same diagnostic event better supports clinical diagnosis. Related record entries are structured record entries associated with a specific diagnostic event, while image frames are frames from an image sequence related to that diagnostic event. The preliminary data unit is an intermediate result obtained after data unit aggregation, containing multi-source data related to a specific diagnostic event. The multi-source data association reference index is an index within the preliminary data unit used to reference the original multi-source data, facilitating easy retrieval of related original data.
[0031] Step S150: Assign a unique test event identifier to each preliminary data unit, which is generated by combining the test event occurrence time code and the test type identifier. Establish a multi-source data reference pointer to point to the storage path of the original data, and obtain a set of test data units containing temporal correlation. The temporal correlation is realized by the time code in the test event identifier to achieve the sequential arrangement of units.
[0032] The test event occurrence time code is an coded representation of the occurrence time of a test event, accurately recording the specific time it occurred. The test type identifier distinguishes different test types, such as blood tests and image tests. The unique test event identifier is a unique identifier assigned to each preliminary data unit; combining the test event occurrence time code with the test type identifier ensures the uniqueness of each identifier. The multi-source data reference pointer is a pointer to the original data storage path, allowing easy retrieval of the original data related to the preliminary data unit. The test data unit set is a group of processed test data units, each containing multi-source data related to a specific test event. Temporal correlation refers to the chronological order and degree of association between data units; the time code in the test event identifier allows for the sequential arrangement of units within the test data unit set, better reflecting the temporal relationships between data.
[0033] Step S200: Construct a feature mapping rule base based on clinical diagnostic decision-making logic, and convert the quantitative indicators and qualitative descriptions in the test data unit set into standardized clinical feature representations through rule matching.
[0034] In one implementation, step S200 may specifically include the following steps S210 to S250:
[0035] Step S210: Collect diagnostic reasoning text from clinical practice guidelines, extract diagnostic decision elements containing preconditions, judgment criteria, and feature association logic through entity relation extraction technology, and generate a structured decision logic chain. Each node in the structured decision logic chain represents a diagnostic judgment step, and the edges represent the conditional dependencies between steps.
[0036] Clinical practice guidelines are authoritative guidance documents in the medical field. They can be understood as a pre-compiled reference library containing a large amount of diagnostic reasoning texts that describe the reasoning process and decision-making basis of doctors when making clinical diagnoses. Preconditions are the necessary conditions for making a diagnostic judgment, such as the patient's symptoms and medical history. Judgment criteria are the standards used to determine the existence or severity of a disease, such as thresholds for various test indicators. Feature association logic refers to the inherent connections and mutual influences between different clinical features, such as the association between a certain symptom and a certain disease. Diagnostic decision elements are the key information constituting a diagnostic decision, including preconditions, judgment criteria, and feature association logic. A structured decision logic chain is a chain that organizes diagnostic decision elements according to a certain logical order. Each node represents a diagnostic judgment step, and the edges represent the conditional dependencies between steps.
[0037] In practice, relevant clinical guidelines are first collected, and the diagnostic reasoning texts within these guidelines are preprocessed to remove noise and irrelevant information. Then, a deep learning-based entity relation extraction model (such as the BiLSTM-CRF model) is used to analyze the diagnostic reasoning texts. This model first performs word segmentation and part-of-speech tagging on the text, then learns the contextual information of the text through a Bidirectional Long Short-Term Memory (BiLSTM) network, and finally uses a Conditional Random Field (CRF) to label entities and relations. Through this model, diagnostic decision elements such as preconditions, judgment criteria, and feature association logic are extracted from the diagnostic reasoning texts. For example, for the diagnosis of pneumonia, preconditions might include symptoms such as fever and cough, judgment criteria might be a white blood cell count exceeding a certain threshold, and feature association logic might be the association between fever and lung infection. These diagnostic decision elements are organized into a structured decision logic chain, where each node corresponds to a diagnostic judgment step, such as determining whether the patient has fever symptoms or whether the white blood cell count exceeds a threshold. Edges represent the conditional dependencies between steps; for example, only when the patient has fever symptoms will the further judgment of whether the white blood cell count exceeds the threshold be made.
[0038] Step S220: Define a standardized clinical feature description model based on the structured decision logic chain. The description model includes feature name, data type, clinical value range and feature association strength parameter. The feature association strength parameter is used to quantify the degree of mutual influence of different features in diagnostic reasoning.
[0039] A standardized clinical feature description model is a model that defines and describes standardized clinical features, providing a unified framework for the representation and analysis of clinical features. Feature names are the specific names of the standardized clinical features, such as "fever," "cough," and "hypertension," with clear medical meanings. Data types represent the data format of the features, such as numerical (e.g., body temperature, blood pressure values) and textual (e.g., symptom descriptions). Clinical value ranges are the range of possible values for the feature in clinical practice. Feature association strength parameters are parameters used to measure the degree of mutual influence between different clinical features in diagnostic reasoning. For example, in the diagnosis of pneumonia, the association strength between fever and cough may be high, while the association strength between fever and the patient's age may be low.
[0040] Step S230: Construct feature mapping rule entries based on the description model and structured decision logic chain. Each rule entry is associated with the source data pattern and feature transformation logic through a dynamic matching algorithm. The dynamic matching algorithm automatically selects the matching strategy based on the data type in the test data unit set.
[0041] Feature mapping rule entries are rules used to map source data (quantitative indicators and qualitative descriptions in the test data unit set) to standardized clinical features. Each rule entry contains a source data pattern and feature transformation logic. The source data pattern refers to the format and characteristics of the source data, such as the value range of numerical indicators or keywords for textual descriptions. The feature transformation logic is the specific logic and method for converting source data into standardized clinical features, such as mapping numerical indicators to different feature states based on their value range. Dynamic matching algorithms are algorithms that can automatically select matching strategies based on data type, improving the efficiency and accuracy of rule matching.
[0042] Step S240: Organize all feature mapping rule entries according to clinical department classification and diagnostic stage hierarchy, add rule version identifiers and clinical evidence level labels, and build a feature mapping rule library that supports dynamic updates. Dynamic updates are achieved by periodically collecting the latest clinical guideline texts to iterate the rule entries.
[0043] Clinical department classification categorizes rule entries based on different medical departments, such as internal medicine, surgery, and obstetrics and gynecology. Diagnostic stage hierarchy divides rule entries into different stages according to the disease diagnosis process, such as the initial diagnosis stage, the confirmed diagnosis stage, and the post-treatment follow-up stage. Rule version identifiers are unique identifiers assigned to each rule version, used to record the rule base's update history and version information. Clinical evidence level labels label rules based on the reliability and authority of the clinical evidence upon which they are based; for example, level A indicates evidence based on high-quality clinical research, level B indicates evidence based on moderate-quality evidence, etc. A dynamically updated feature mapping rule base allows for real-time updates based on the latest clinical knowledge and research findings. By regularly collecting the latest clinical guideline texts and iteratively updating rule entries, the timeliness and accuracy of the rule base can be guaranteed.
[0044] Step S250: Load the feature mapping rule base through rule matching processing, perform threshold interval matching processing on the quantitative indicators in the test data unit set, perform semantic similarity matching processing on the qualitative description, and generate a standardized clinical feature representation that conforms to the definition of the description model.
[0045] In one implementation, step S250 may specifically include the following steps S251 to S255:
[0046] Step S251: The quantitative index field in the test data unit set is parsed through rule matching, the numerical content and unit description are extracted, and the unit conversion rules in the feature mapping rule base are used to perform unit unification processing to generate a standardized numerical sequence with consistent units.
[0047] Rule matching is the process of matching and transforming data in the test data unit set according to rules in the feature mapping rule base. The test data unit set is a collection of multi-source data obtained after step S100. The quantitative indicator field is the clinical indicator field represented by specific numbers, such as blood pressure, blood glucose, and body temperature. The numerical content is the specific numerical value in the quantitative indicator field, and the unit description is the unit used, such as mmHg (millimeters of mercury) or mg / dL (milligrams per deciliter). The feature mapping rule base is a dynamically updated rule base built in step S240, containing unit conversion rules to convert quantitative indicators with different units to a unified unit. Dimensional unification is the process of converting quantitative indicators with different units to the same unit, ensuring comparability of quantitative indicators in subsequent analysis and comparison. The standardized numerical sequence is a set of numerical sequences with consistent units obtained after dimensional unification.
[0048] Step S252: Based on the threshold interval rules in the feature mapping rule base, the standardized numerical sequence is divided into intervals, and continuous numerical values are mapped to discrete clinical judgment levels. Each level corresponds to the feature state code defined in the description model. The interval division adopts a hybrid strategy that combines clinically significant threshold points and equal interval division.
[0049] Interval partitioning divides a continuous numerical sequence into different intervals, each corresponding to a discrete clinical judgment level. Clinical judgment levels are classifications of values based on clinical diagnostic needs, such as normal blood pressure, borderline hypertension, and hypertension. Clinically significant thresholds are numerical points of significant clinical importance, such as blood pressure thresholds of 120 mmHg and 140 mmHg, determined based on extensive clinical research and practical experience. Equal interval partitioning divides the numerical range into equal intervals. A hybrid strategy combines clinically significant thresholds and equal interval partitioning, considering both clinical significance and ensuring the uniformity of interval partitioning.
[0050] Step S253: Perform word segmentation and semantic encoding on the qualitative description text in the test data unit set, and convert the text description into a combined feature representation containing domain term vectors and context semantic vectors. The domain term vectors are generated through a medical term embedding model, and the context semantic vectors are generated through a bidirectional long short-term memory network.
[0051] The test data unit set is a collection of multi-source data obtained after step S100. Qualitative descriptive text is a textual description of clinical situations, such as patient symptom descriptions and disease diagnoses. Word segmentation is the process of dividing the qualitative descriptive text into words, breaking it down into individual word units for easier subsequent processing and analysis. Semantic encoding converts the segmented words into vector representations, converting semantic information in the text into a numerical form that a computer can process. Domain term vectors represent medical terms and contain their semantic information. Medical term embedding models, such as the BioWordVec model, are used to convert medical terms into vector representations. These models learn semantic relationships between medical terms through training on a large amount of medical literature. Contextual semantic vectors represent the contextual information of the text, considering the word order and context. Bidirectional Long Short-Term Memory (BiLSTM) networks are deep learning models capable of processing sequential data and learning textual contextual information. BiLSTM can generate contextual semantic vectors. Combined feature representation is a feature representation that combines domain term vectors and contextual semantic vectors, which includes both the semantic information of medical terms and the contextual information of the text.
[0052] Step S254: Calculate the semantic similarity between the combined feature representation and the standard term description in the feature mapping rule base, select the standard term with the highest similarity as the matching result, and generate the standardized term code corresponding to the qualitative description.
[0053] The combined feature representation is the feature representation obtained in step S253, which converts the qualitative description text into a feature representation containing domain terminology vectors and context semantic vectors. The feature mapping rule base is a dynamically updated rule base constructed in step S240, containing standard terminology descriptions, which are textual expressions of standardized clinical features. Semantic similarity is the degree of semantic similarity between two texts or feature representations; calculating semantic similarity measures the degree of matching between the qualitative description and the standard terminology description. The matching result is the standard terminology selected from the feature mapping rule base that is most similar to the qualitative description. In practice, all standard terminology descriptions are first obtained from the feature mapping rule base and converted into feature representations. Using the same method as in step S253, the standard terminology descriptions are segmented and semantically encoded to obtain a combined feature representation containing domain terminology vectors and context semantic vectors. Then, for each combined feature representation of a qualitative description, its semantic similarity to the combined feature representations of all standard terminology descriptions is calculated. The cosine similarity algorithm can be used to calculate semantic similarity. Cosine similarity measures the degree of similarity between two vectors by calculating the cosine of the angle between them. The closer the value is to 1, the more similar they are.
[0054] Step S255: Based on the feature association strength parameter in the description model, perform weighted fusion processing on the feature state code corresponding to the quantitative indicator and the standardized term code corresponding to the qualitative description to generate a standardized clinical feature representation containing the relationship between features. The weight value of the weighted fusion is positively correlated with the feature association strength parameter.
[0055] The descriptive model is the standardized clinical feature description model defined in step S220, which includes a feature association strength parameter to measure the degree of mutual influence between different clinical features. The feature state codes corresponding to the quantitative indicators are obtained through interval partitioning in step S252, with each feature state code representing a discrete clinical judgment level. The standardized term codes corresponding to the qualitative descriptions are obtained through semantic similarity matching in step S254, with each standardized term code representing a standardized clinical feature. The weighted fusion process is the fusion of the feature state codes corresponding to the quantitative indicators and the standardized term codes corresponding to the qualitative descriptions, considering the association strength between different features through weighting. The weight value is a numerical value assigned to each feature in the weighted fusion process, which is positively correlated with the feature association strength parameter; that is, the greater the feature association strength, the larger the weight value. The standardized clinical feature representation is a comprehensive feature representation obtained after weighted fusion processing, containing the association relationships between features and more comprehensively reflecting the clinical situation.
[0056] Step S300: Invoke the deep generative model to adapt and generate standardized clinical feature representations, adjust the text generation strategy according to the diagnostic correlation strength between features, and generate medical description text that conforms to clinical narrative logic.
[0057] As one implementation method, step S300 involves calling a deep generative model to adapt and generate standardized clinical feature representations, adjusting the text generation strategy based on the diagnostic correlation strength between features, and generating medical descriptive text that conforms to clinical narrative logic. Specifically, this may include the following steps S310-S350:
[0058] Step S310: Input the standardized clinical feature representation into the feature encoding layer of the deep generative model, and perform nonlinear mapping processing on the diagnostic correlation strength parameters between features through a multilayer perceptron network to generate a feature correlation matrix. The element values in the feature correlation matrix represent the degree of diagnostic dependence between corresponding feature pairs.
[0059] The standardized clinical feature representation, obtained in step S200, is a representation of the standardized clinical features after processing, including quantitative indicators and qualitative descriptions. It contains information such as the name of the clinical feature, state encoding, and the relationships between features. The feature encoding layer of the deep generative model is a component of the model, responsible for encoding the input standardized clinical feature representation and converting it into a feature vector that the model can process. The multilayer perceptron (MLP) network is a neural network composed of multiple neuron layers, capable of learning the nonlinear features of the input data. The diagnostic association strength parameter between features describes the degree of mutual influence between different clinical features during the diagnostic process, reflecting the closeness and importance between features. Nonlinear mapping processing is the process performed by the MLP network on the diagnostic association strength parameter between features, transforming it from the original linear relationship into a nonlinear relationship to better capture the complex relationships between features. The feature association matrix is a two-dimensional matrix where each element represents the diagnostic dependence between corresponding feature pairs; a larger element value indicates a higher diagnostic dependence between the two features.
[0060] Step S320: Construct a feature attention mechanism module based on the feature association matrix, calculate the attention weight value of each standardized clinical feature in the text generation process, and associate the attention weight value with the corresponding element value in the feature association matrix and the position weight of the feature in the diagnostic decision logic chain.
[0061] The feature correlation matrix, generated in step S310, represents the diagnostic dependence between different clinical features, reflecting the closeness and importance of the features. The feature attention mechanism module is used to focus on and weight different features during text generation, adjusting the level of attention given to each feature based on its importance and correlation. The attention weight value is a numerical value assigned to each standardized clinical feature, representing the degree of attention that feature should receive during text generation. The feature position weight in the diagnostic decision logic chain is assigned based on the feature's position and role in the chain; for example, features that play a crucial role in early diagnosis have relatively higher position weights.
[0062] When constructing the feature attention mechanism module, the feature association matrix is first used as input. For each standardized clinical feature, its correlation with other features is obtained through the feature association matrix. Simultaneously, the positional weight of each feature is determined according to the diagnostic decision logic chain. For example, in a typical pneumonia diagnostic decision logic chain, symptoms such as fever and cough may be key features for early judgment, and their positional weights are relatively high; while some secondary indicators of blood tests have relatively low positional weights. Then, the corresponding element values in the feature association matrix and the positional weights of the features are comprehensively considered. A weighted summation method can be used to calculate a comprehensive score for each feature. Next, the comprehensive score of each feature is normalized to obtain the attention weight value. The normalization process can use the softmax function to convert the comprehensive score into a probability distribution, so that the sum of the attention weight values of all features is 1. Through this process, each standardized clinical feature has a corresponding attention weight value, which reflects the importance of the feature in the text generation process and the degree of attention it should receive.
[0063] Step S330: The standardized clinical feature representation and attention weight values are weighted and aggregated through the feature encoding layer to generate a weighted feature vector containing the ranking of feature importance. The dimension of the weighted feature vector is consistent with the number of features in the standardized clinical feature representation.
[0064] The feature encoding layer encodes and processes the input features. The standardized clinical feature representation is a representation of standardized clinical features obtained after the previous steps, including quantitative indicators and qualitative descriptions, and contains information from multiple clinical features. The attention weight value, calculated in step S320, represents the importance of each standardized clinical feature in the text generation process. The weighted aggregation process combines the standardized clinical feature representation with the attention weight value, weights each feature according to the attention weight value, and then aggregates the weighted features to obtain a comprehensive feature vector. Feature importance ranking sorts the standardized clinical features according to the attention weight value; features with higher weight values rank higher in the ranking, indicating their greater importance in text generation. The weighted feature vector is the vector obtained after weighted aggregation, with dimensions consistent with the number of features in the standardized clinical feature representation. Each dimension corresponds to one standardized clinical feature, and the vector value reflects the importance of that feature after comprehensive consideration.
[0065] Step S340: Input the weighted feature vector into the sequence generation layer of the deep generative model, initialize the text generation strategy to the default clinical narrative template, and adjust the order of feature descriptions in the template according to the feature importance ranking in the weighted feature vector.
[0066] The sequence generation layer of the deep generative model is responsible for generating text sequences. It receives a weighted feature vector as input and generates corresponding medical descriptive text based on the input feature information. The weighted feature vector, generated in step S330, contains a ranking of feature importance, reflecting the importance of each standardized clinical feature in text generation. The default clinical narrative template is a pre-defined text generation framework that specifies the basic structure and general content of the medical descriptive text. For example, it typically describes the patient's main symptoms first, followed by relevant examination results and diagnostic opinions. The text generation strategy refers to the methods and rules used when generating text. Adjusting the text generation strategy according to the feature importance ranking in the weighted feature vector can make the generated text more consistent with clinical reality and highlight the description of important features.
[0067] In practice, the weighted feature vectors are first input into the sequence generation layer of the deep generative model. Upon receiving the weighted feature vectors, the sequence generation layer begins preparing the text for generation based on a default clinical narrative template. This default template may contain placeholders for later filling in specific feature descriptions. Then, the order of feature descriptions in the default clinical narrative template is adjusted according to the importance ranking of features in the weighted feature vectors. For example, in the default template, the feature descriptions might be arranged in the order of common symptoms. However, if the weighted feature vector ranking reveals that a particular symptom is more important in the diagnosis, then that feature's description is moved to a more prominent position.
[0068] The specific adjustment process can be implemented as follows: The feature description section in the default clinical narrative template is split into independent units for each feature description. Then, these feature description units are rearranged according to the importance ranking of features in the weighted feature vector. For example, if feature A is more important than feature B, the description unit of feature A is placed before the description unit of feature B. Finally, the rearranged feature description units are combined back into the default clinical narrative template to form the adjusted text generation strategy. This adjustment allows the generated medical description text to better highlight important features, aligning with the diagnostic logic and focus of clinical practice.
[0069] Step S350: Autoregressive text generation is performed by the sequence generation layer based on the adjusted text generation strategy to generate preliminary medical description text. During the autoregressive generation process, the coherence of feature description is controlled by the feature association matrix so that features with high correlation are described adjacently in the text.
[0070] The sequence generation layer is the core part of the deep generative model responsible for generating text sequences. It progressively generates medical descriptive text based on the input information and the text generation strategy. The adjusted text generation strategy, obtained in step S340 by adjusting the default clinical narrative template according to the feature importance ranking of the weighted feature vectors, defines the structure of the generated text and the order of feature descriptions. Autoregressive text generation is a word-by-word approach. When generating each word, the model predicts based on previously generated words and input feature information, progressively generating complete text. The feature association matrix, generated in step S310, represents the diagnostic dependence between different clinical features. The feature association matrix controls the coherence of feature descriptions, ensuring that features with high correlation are described adjacently in the text, thus making the generated text more consistent with clinical logic and readability.
[0071] In the autoregressive text generation process, the sequence generation layer first determines the starting part of the text based on the adjusted text generation strategy. For example, according to the adjusted strategy, the most important features are described first. Then, when generating each word, the model considers the previously generated words and the input feature information. For the feature description part, based on the information in the feature association matrix, features with a high correlation strength with the currently described feature are prioritized for subsequent description. For example, if the current feature being described is "fever," and the feature association matrix shows that "cough" has a high correlation strength with "fever," then the "cough" feature will be prioritized for description in subsequent text generation.
[0072] During text generation, the model continuously predicts and selects words. For each prediction step, the model calculates the generation probability of different words and selects the word with the highest probability as the current generated word. Simultaneously, it adjusts the order and coherence of feature descriptions based on the feature association matrix. If a feature has a strong association with the currently described feature but is positioned relatively late in the adjusted text generation strategy, the model will adjust its position appropriately based on the association matrix information, placing it adjacent to features with strong association in the text.
[0073] As another implementation, in step S300, the text generation strategy is adjusted according to the strength of the diagnostic correlation between features to generate medical descriptive text that conforms to the logic of clinical narrative. Specifically, this may include the following steps S301~S305:
[0074] Step S301: Analyze the clinical narrative structure of the preliminary medical description text, extract the feature description order and feature association statements in the text, and generate a text structure analysis report. The analysis report includes feature description location index and association statement frequency statistics.
[0075] The preliminary medical description text, generated in step S350, contains descriptions of the patient's clinical characteristics and related diagnostic information. The clinical narrative structure refers to the logical order and expression method followed in the medical description text, such as describing symptoms in the order of appearance or the progression of the disease. The feature description order is the sequential order in which the standardized clinical features are described in the preliminary medical description text, reflecting how the text presents different features. Feature association statements describe the relationships between different features in the text, such as expressions like "accompanied by" or "related to." The text structure analysis report is a report generated after analyzing the preliminary medical description text, containing information such as feature description location indexes and frequency statistics of association statements, used to assess whether the narrative structure of the text is reasonable and consistent with clinical logic. The feature description location index is the specific location of each standardized clinical feature in the text, allowing for accurate location of the feature description within the text. The frequency statistics of association statements count the number of times various feature association statements appear in the text, revealing the degree of emphasis the text places on feature associations.
[0076] When analyzing the clinical narrative structure of preliminary medical description texts, the text is first segmented and tagged with parts of speech to better identify feature descriptions and relational expressions. Then, standardized clinical feature descriptions are extracted from the text using a predefined medical terminology dictionary and keyword matching methods. The start and end positions of each feature description in the text are recorded to form a feature description position index. For example, for the text "The patient presented with fever symptoms, a persistently elevated body temperature, and a cough," by matching keywords such as "fever" and "cough," the position index of "fever" is determined to be from the Xth to the Yth character of the text, and the position index of "cough" is from the Zth to the Wth character.
[0077] Simultaneously, the feature relationships expressed in the text are identified and statistically analyzed. For example, expressions such as "simultaneously accompanied by" and "related to..." are searched and counted using regular expression matching. The frequency of each relationship expression is counted to form a relationship expression frequency statistic. Finally, the information, including the feature description location index and relationship expression frequency statistics, is compiled into a text structure analysis report. This report provides a clear understanding of the clinical narrative structure of the preliminary medical description text, offering a basis for subsequent text adjustments.
[0078] Step S302: Compare the text structure analysis report with the feature association matrix to identify abnormal paragraphs in the preliminary medical description text where the feature description order and feature association strength do not match. Abnormal paragraphs are those where features with high feature association strength are not described adjacently in the text.
[0079] In one implementation, step S302 may specifically include the following steps S3021 to S3025:
[0080] Step S3021: Extract the association strength parameter from the feature association matrix, sort it by value to generate a feature association priority list, and adjacent features in the list represent feature pairs that need to be prioritized for association in clinical diagnosis.
[0081] The feature association matrix, generated in step S310, represents the diagnostic dependence between different clinical features. The association strength parameter reflects the closeness and importance of each feature pair. A higher association strength parameter value indicates a stronger diagnostic dependence between the two features, and therefore requires priority consideration in clinical diagnosis. The feature association priority list is obtained by sorting the association strength parameters in the feature association matrix by value. Each element in the list is a feature pair, and adjacent feature pairs represent the feature combinations that should be prioritized for association in clinical diagnosis.
[0082] When extracting the association strength parameter from the feature association matrix, we first iterate through each element of the feature association matrix. For an n×n feature association matrix (where n is the number of standardized clinical features), the element a in the matrix... ij This represents the correlation strength between feature i and feature j. All off-diagonal elements (since diagonal elements represent correlations within the feature itself and have no practical meaning) are extracted, and their corresponding feature pairs are recorded. Then, the extracted correlation strength parameters and their corresponding feature pairs are sorted according to the numerical value of the correlation strength parameter. A sorting algorithm (such as quicksort) can be used to sort the correlation strength parameters in descending order. After sorting, a list of feature pairs arranged from highest to lowest correlation strength is obtained, i.e., the feature correlation priority list. In this list, adjacent feature pairs represent feature combinations that should be prioritized for description in clinical diagnosis. For example, the first feature pair in the list (feature A, feature B) indicates that the correlation strength between features A and B is the highest, and they should be prioritized for description in clinical diagnosis. Through this process, the feature correlation priority list is generated, providing an important reference for subsequent abnormal segment identification.
[0083] Step S3022: Perform paragraph segmentation on the preliminary medical description text, dividing the text into multiple semantic paragraphs according to punctuation marks and semantic pauses, and generating a feature sequence containing the order of feature descriptions for each paragraph.
[0084] The preliminary medical description text, generated in step S350, contains descriptions of the patient's clinical characteristics and related diagnostic information. Paragraph segmentation is the process of dividing the preliminary medical description text into multiple semantic paragraphs according to certain rules. Punctuation marks are symbols used in text to separate sentences and indicate pauses, such as periods, commas, and semicolons; semantic pauses are pauses that naturally occur in the text based on semantic content, such as pauses between descriptions of different symptoms or examination results. A semantic paragraph is a text segment with relatively complete semantics; each paragraph typically describes a theme or a set of related content. The feature sequence is a standardized list of clinical features arranged in the order of feature description within each semantic paragraph, reflecting the order in which features are described in that paragraph.
[0085] When performing paragraph segmentation, the first step is to define rules for recognizing punctuation and semantic pauses. For punctuation, regular expression matching can be used for identification, such as recognizing periods ".", commas ",", and semicolons ";". For semantic pauses, they can be determined by analyzing the semantic content of the text, combined with knowledge of the medical field and language conventions. For example, there are usually obvious semantic pauses when describing different symptoms.
[0086] Then, the preliminary medical description text is segmented according to defined rules. Starting from the beginning of the text, characters are scanned sequentially. When a punctuation mark or semantic pause is encountered, the preceding text is treated as a semantic segment. Each segmented semantic segment is then organized and labeled. For each semantic segment, standardized clinical feature descriptions are extracted using a predefined medical terminology dictionary and keyword matching method, and arranged in the order of description to form a feature sequence. Through this segmentation process, the preliminary medical description text is divided into multiple semantic segments, and a feature sequence containing the order of feature descriptions is generated for each segment.
[0087] Step S3023: Perform sequence alignment between the feature sequence and the feature association priority list, and calculate the sequence edit distance as the matching degree index. The smaller the edit distance, the higher the matching degree between the feature description order and the association priority.
[0088] The feature sequence, generated in step S3022 for each semantic segment, contains a list of feature descriptions in order, reflecting the order in which standardized clinical features are described within each semantic segment. The feature association priority list, generated in step S3021, is a list of feature pairs arranged from highest to lowest association strength, representing the feature combinations that require priority association description in clinical diagnosis. Sequence alignment compares the feature sequence with the feature association priority list to identify their similarities and differences. Sequence edit distance is a metric used to measure the degree of difference between two sequences, representing the minimum number of editing operations (such as insertion, deletion, and replacement) required to transform one sequence into another. In this scenario, sequence edit distance measures the degree of match between the feature description order in the feature sequence and the feature association order in the feature association priority list; a smaller edit distance indicates a higher degree of match.
[0089] During sequence alignment, for each semantic segment's feature sequence, it is compared with a feature association priority list. A dynamic programming algorithm can be used to calculate the sequence edit distance. Specifically, a two-dimensional matrix is created, where the rows and columns correspond to elements in the feature sequence and the feature association priority list, respectively. Each element in the matrix represents the minimum number of edit operations required to transform the first i elements of the feature sequence into the first j elements of the feature association priority list. The first row and first column of the matrix are initialized, representing the number of edit operations required to transform an empty sequence into another sequence. Then, the remaining elements of the matrix are filled using a state transition equation. The state transition equation is determined based on whether the current elements are equal. If they are equal, the edit distance is equal to the value of the top-left element; otherwise, the minimum value among the top-left, top, and left elements is incremented by 1. Finally, the bottom-right element of the matrix represents the sequence edit distance between the feature sequence and the feature association priority list.
[0090] Step S3024: Obtain the preset matching threshold. When the edit distance of a semantic paragraph is greater than the matching threshold, mark the paragraph as a candidate abnormal paragraph.
[0091] The preset matching threshold is a pre-defined standard for judging whether the matching degree between the feature description order and the association priority is acceptable. It is determined based on the actual needs and experience of clinical diagnosis. When the sequence edit distance of a semantic segment is greater than this threshold, the matching degree between the feature description order and the association priority of the segment is considered to be low, and there may be a problem of mismatch between the feature description order and the feature association strength. Candidate abnormal segments are semantic segments that are initially marked as potentially abnormal. These segments need to be further examined and analyzed to determine whether they are truly abnormal segments.
[0092] In practice, a preset matching threshold is first obtained from the system configuration or predefined rules. For example, based on a large number of clinical diagnostic cases and experience analysis, the matching threshold is determined to be 2. Then, for each semantic segment, the sequence edit distance calculated in step S3023 is obtained. This edit distance is compared with the preset matching threshold.
[0093] If the edit distance of a semantic paragraph is greater than the matching threshold, for example, if the edit distance of a semantic paragraph is 3, which is greater than the preset matching threshold of 2, then the paragraph is marked as a candidate abnormal paragraph. The purpose of marking candidate abnormal paragraphs is to filter out paragraphs that may have problems, so as to carry out more detailed analysis and processing later. Through this filtering process, the range of paragraphs that need further inspection is narrowed, and the efficiency of abnormal paragraph identification is improved.
[0094] Step S3025: Perform feature co-occurrence analysis on candidate abnormal paragraphs, count the co-occurrence frequency of highly correlated feature pairs in the feature association priority list of the paragraph, and when the co-occurrence frequency is lower than the preset co-occurrence threshold, the candidate abnormal paragraph is determined as an abnormal paragraph where the feature description order and feature association strength do not match.
[0095] Candidate anomalous paragraphs are semantic paragraphs marked in step S3024 that may have a low match between the feature description order and the association priority. Feature co-occurrence analysis statistically analyzes the occurrence of highly correlated feature pairs in the feature association priority list within the candidate anomalous paragraphs to further determine whether the paragraph is truly anomalous. Highly correlated feature pairs are feature pairs with high association strength in the feature association priority list, which should be prioritized for description in clinical diagnosis. Co-occurrence frequency is the ratio of the number of times highly correlated feature pairs appear simultaneously in the candidate anomalous paragraph to the total number of feature descriptions in that paragraph. The preset co-occurrence threshold is a pre-set standard for judging whether the feature co-occurrence frequency is qualified. When the co-occurrence frequency is lower than this threshold, the feature description order and feature association strength in the paragraph are considered mismatched, and it is identified as an anomalous paragraph.
[0096] When performing feature co-occurrence analysis, highly correlated feature pairs are first selected from a feature association priority list. For example, an association strength threshold is set; when the association strength of a feature pair exceeds this threshold, it is considered a highly correlated feature pair. Then, for each candidate anomalous paragraph, the co-occurrence frequency of highly correlated feature pairs is counted. Specifically, the feature sequence of the candidate anomalous paragraph is traversed, and each feature pair is checked to see if it is a highly correlated feature pair. If so, its co-occurrence frequency is recorded. Simultaneously, the total number of times the feature descriptions in that paragraph are counted.
[0097] Calculate the co-occurrence frequency of highly correlated feature pairs, which is the number of co-occurrences divided by the total number of feature descriptions. For example, if the total number of feature descriptions in a candidate anomalous paragraph is 10, and the highly correlated feature pair co-occurs 2 times, then the co-occurrence frequency is 0.2. Compare the calculated co-occurrence frequency with a preset co-occurrence threshold. If the co-occurrence frequency is lower than the preset threshold, for example, if the preset threshold is 0.3, and the calculated co-occurrence frequency is 0.2, then the candidate anomalous paragraph is identified as an anomalous paragraph where the feature description order and feature correlation strength do not match.
[0098] Step S303: Based on the location index of the abnormal paragraph and the association strength parameter in the feature association matrix, dynamically adjust the sentence structure and conjunction selection in the text generation strategy to regenerate the abnormal paragraph, so as to enhance the text coherence between the associated features.
[0099] The location index of the abnormal paragraph is the specific location information of the abnormal paragraphs identified in step S302 where the feature description order and feature association strength do not match. The location index allows for accurate positioning of the abnormal paragraphs within the preliminary medical description text. The feature association matrix, generated in step S310, represents the diagnostic dependence between different clinical features. The association strength parameter reflects the closeness and importance between each feature pair. The text generation strategy refers to the methods and rules used when generating the medical description text, including the selection of sentence structure and the use of conjunctions. Dynamic adjustment involves modifying and optimizing the text generation strategy in real time based on the abnormal paragraphs and the information in the feature association matrix. Sentence structure refers to the organizational form and grammatical structure of sentences; different sentence structures can express different semantics and emphasize different points. Conjunctions are words used to connect sentences or sentence components, such as "simultaneously," "and," and "however." Appropriate conjunctions can enhance the coherence and logic of the text. Regeneration involves regenerating the abnormal paragraphs according to the adjusted text generation strategy to improve the coherence and logic of the feature descriptions within the paragraphs.
[0100] Step S304: Perform text splicing on the regenerated paragraphs and the non-abnormal paragraphs of the preliminary medical description text to generate intermediate medical description text. The splicing process uses smooth transition connectors to ensure the overall narrative fluency of the text.
[0101] The regenerated paragraphs are those obtained by regenerating the abnormal paragraphs in step S303 according to the adjusted text generation strategy. This improves the mismatch between the feature description order and the feature association strength, and enhances the textual coherence between associated features. The non-abnormal paragraphs of the preliminary medical description text are those not identified as abnormal in step S302. The feature description order and association relationships of these paragraphs are relatively consistent with clinical logic. Text splicing is the process of combining the regenerated paragraphs with the non-abnormal paragraphs to form a complete medical description text. Smooth transition conjunctions are used to make the text transition naturally and the narrative flow smoothly when splicing different paragraphs, such as "in addition," "next," and "then." The intermediate medical description text is the text generated after text splicing. It is an intermediate result of the optimized preliminary medical description text, with a smoother overall narrative and more reasonable feature descriptions.
[0102] When performing text concatenation, the first step is to determine the insertion position of the regenerated paragraph based on the position index of the aberrant paragraph. For example, if the aberrant paragraph is located at character positions X to Y of the initial medical description text, the regenerated paragraph will be inserted at that position. During the insertion process, smooth transition conjunctions are used to ensure the overall narrative flow of the text.
[0103] Step S305: Calculate the coverage of feature descriptions and the accuracy of relational statements in the intermediate medical description text. When both coverage and accuracy meet the preset thresholds, the intermediate medical description text is determined as a medical description text that conforms to the clinical narrative logic.
[0104] In one implementation, step S305 may specifically include the following steps S3051~S3055:
[0105] Step S3051: Extract all feature names from the standardized clinical feature representation, match them with the feature description content in the intermediate medical description text, and calculate the proportion of the number of described features to the total number of features as the feature description coverage rate.
[0106] The standardized clinical feature representation is the standardized clinical feature representation obtained in step S200 after processing, which includes quantitative indicators and qualitative descriptions. It contains all the clinical feature information that needs to be reflected in the medical description text. The feature name is the specific name of each clinical feature in the standardized clinical feature representation, such as "fever," "cough," and "hypertension." The intermediate medical description text is the optimized text generated in step S304. The feature description content is the specific description of various clinical features in the intermediate medical description text. The feature description coverage rate is the ratio of the number of features actually described in the intermediate medical description text to the total number of features in the standardized clinical feature representation, reflecting the degree to which the text covers the clinical features.
[0107] Step S3052: Parse the relational statements in the intermediate medical description text, extract the relational direction and relational strength descriptions between feature pairs, compare them with the feature relational strength parameters in the feature relational matrix, calculate the accuracy score of the statement, and obtain the score by calculating the similarity between the statement description vector and the matrix element vector using the cosine similarity algorithm.
[0108] The intermediate medical description text is the optimized text generated in step S304, which includes statements describing the relationships between features. These statements describe the relationships between different features, such as "The patient presented with fever symptoms, accompanied by a cough," where "accompanied by" indicates the relationship between "fever" and "cough." The direction of association refers to the orientation of the relationship between feature pairs, such as whether it is a unidirectional or bidirectional association. The strength of association is a description of the degree of association between feature pairs, such as "relatively strong" or "relatively weak." The feature association matrix, generated in step S310, represents the degree of diagnostic dependence between different clinical features, with elements representing the association strength parameters between feature pairs. The accuracy score is an indicator used to measure the degree of conformity between the relationship descriptions in the intermediate medical description text and the actual association strength in the feature association matrix; a higher score indicates a more accurate description.
[0109] Step S3053: Determine whether the feature description coverage rate reaches the preset coverage threshold and whether the description accuracy score reaches the preset accuracy threshold. When both conditions are met, the intermediate medical description text is determined as a medical description text that conforms to the clinical narrative logic.
[0110] Feature description coverage is the ratio of the number of features actually described in the intermediate medical description text calculated in step S3051 to the total number of features in the standardized clinical feature representation, reflecting the degree to which the text covers clinical features. The preset coverage threshold is a pre-set standard for judging whether the feature description coverage is satisfactory. When the feature description coverage reaches or exceeds this threshold, the text is considered to have a sufficiently comprehensive description of clinical features. The accuracy score is an index calculated in step S3052 that measures the degree of conformity between the expressed relationship in the intermediate medical description text and the actual relationship strength in the feature association matrix. The preset accuracy threshold is a pre-set standard for judging whether the accuracy score is satisfactory. When the accuracy score reaches or exceeds this threshold, the expression of relationships in the text is considered accurate.
[0111] Step S3054: When the feature description coverage does not reach the preset coverage threshold, identify the undescribed features, adjust the attention weight value of the corresponding feature in the text generation strategy, and re-perform the autoregressive text generation process.
[0112] Feature description coverage is the ratio of the number of features actually described in the intermediate medical description text calculated in step S3051 to the total number of features in the standardized clinical feature representation. The preset coverage threshold is a pre-set standard used to judge whether the feature description coverage is acceptable. When the feature description coverage does not reach the preset coverage threshold, it indicates that the intermediate medical description text does not comprehensively cover all the clinical features that need to be described. Undescribed features are those present in the standardized clinical feature representation but not mentioned in the intermediate medical description text. The text generation strategy refers to the methods and rules used when generating medical description text, including the allocation of attention weights. An attention weight is a numerical value assigned to each standardized clinical feature, representing the degree of attention that feature should receive during text generation. Adjusting attention weights involves increasing the attention weights of undescribed features to give them more attention in subsequent text generation. Re-performing autoregressive text generation involves using the deep generation model again to generate text according to the adjusted text generation strategy to improve the feature description coverage.
[0113] Step S3055: When the accuracy score of the description does not reach the preset accuracy threshold, locate the incorrect related statements, correct the description of the association strength in the statements based on the parameters in the feature association matrix, and regenerate the corrected intermediate medical description text.
[0114] The accuracy score, calculated in step S3052, is an indicator used to measure the degree of conformity between the description of relationships in the intermediate medical description text and the actual relationship strength in the feature association matrix. The preset accuracy threshold is a pre-set standard for judging whether the accuracy score is satisfactory. When the accuracy score fails to reach the preset accuracy threshold, it indicates that there is an inaccurate description of relationships in the intermediate medical description text. Incorrectly described relationships are statements in the intermediate medical description text where the description of the feature relationship does not match the actual relationship strength in the feature association matrix. The feature association matrix, generated in step S310, represents the diagnostic dependence between different clinical features, and its elements represent the relationship strength parameters between feature pairs. Correcting the relationship strength description involves modifying and adjusting the relationship strength descriptions in the incorrectly described relationships based on the parameters in the feature association matrix. Regenerating the corrected intermediate medical description text involves replacing the original incorrect statements with the corrected relationship statements and regenerating the intermediate medical description text to improve the accuracy of the relationship descriptions in the text.
[0115] Step S400: Associate the medical description text with the corresponding medical image sequence for diagnostic focus layout, establish a bidirectional referencing relationship between the text description and the image feature region through semantic anchoring, and generate a standardized graphic medical test report containing dynamic diagnostic reference lines.
[0116] In one implementation, step S400 may specifically include the following steps S410 to S460:
[0117] Step S410: Parse the medical description text, locate the sentence fragments containing key diagnostic information through the clinical entity recognition model, and generate diagnostic focus text units. The diagnostic focus text units contain text content and position coordinates in the medical description text.
[0118] The medical description text, generated in step S300, conforms to the logic of a clinical narrative and includes information such as the patient's clinical symptoms, examination results, and diagnostic opinions. The clinical entity recognition model, based on natural language processing technology, can identify clinical entities in the medical description text, such as disease names, symptoms, and examination items. Key diagnostic information refers to information in the medical description text that is significant for disease diagnosis, such as specific symptom descriptions and lesion locations. Sentence fragments are continuous text sections in the medical description text that contain key diagnostic information. Diagnostic focus text units are units obtained by organizing and marking sentence fragments containing key diagnostic information; they include text content and positional coordinates within the medical description text. These coordinates are used to accurately locate the text unit within the text.
[0119] When parsing medical descriptive text, the text is first input into a clinical entity recognition model. This model can employ a deep learning-based named entity recognition model, such as the BiLSTM-CRF model. This model first performs word segmentation and part-of-speech tagging on the text, then learns the contextual information of the text through a bidirectional long short-term memory network (BiLSTM), and finally uses a conditional random field (CRF) to label the entities.
[0120] The clinical entity recognition model locates sentence fragments containing key diagnostic information in medical descriptive text. For example, for the text "The patient presents with fever symptoms, with a body temperature as high as 38.5℃, and is preliminarily diagnosed with an upper respiratory tract infection," the model identifies key diagnostic information such as "fever," "body temperature as high as 38.5℃," and "upper respiratory tract infection," and extracts sentence fragments containing this information.
[0121] A diagnostic focus text unit is generated for each sentence fragment, recording its text content and position coordinates within the medical description text. Position coordinates can be represented by recording the start and end character positions of the sentence fragment.
[0122] Step S420: Perform feature region detection on the medical image sequence. Identify clinically relevant regions in the image using a pre-trained medical image segmentation network. Generate a set of image feature regions containing region boundary coordinates and feature type labels. The feature type labels are generated through clinical terminology standardization.
[0123] A medical image sequence is a series of medical images corresponding to medical descriptive text. These images contain information about the internal structures and lesions of the patient's body. Feature region detection identifies clinically diagnostic regions from the medical image sequence, such as tumors and areas of inflammation. Pre-trained medical image segmentation networks are neural network models trained on a large amount of medical image data, capable of automatically segmenting different tissues and lesion areas in images. Regions of clinical interest are image areas that require focused attention in medical diagnosis; these areas are often closely related to the diagnosis and treatment of diseases. Region boundary coordinates are the location information of the boundaries of image feature regions within the image. By recording boundary coordinates, image feature regions can be accurately located. Feature type labels are labels assigned to each image feature region to represent its feature type, such as "tumor," "cyst," or "inflammation." Feature type labels are generated through clinical terminology standardization to ensure the accuracy and consistency of the labels.
[0124] When performing feature region detection on medical image sequences, the first step is to select a suitable pre-trained medical image segmentation network, such as the U-Net network.
[0125] For each segmented image feature region, its boundary coordinates are calculated. These coordinates can be obtained by performing edge detection and contour extraction on the segmentation results. Simultaneously, clinical terminology standardization is performed on each image feature region to generate feature type labels. This can be achieved by matching the segmentation results with a medical terminology dictionary. For example, if the segmentation results indicate that a region has tumor-like features, the feature type label "tumor" is assigned to that region by matching it with a medical terminology dictionary.
[0126] The boundary coordinates and feature type labels of each image feature region are organized into an image feature region set. For example, an image feature region set may contain multiple elements, each element representing an image feature region, including the boundary coordinates and feature type label of that region.
[0127] Step S430: Calculate the semantic correlation between the diagnostic focus text unit and the set of image feature regions. The correlation is determined by combining the semantic similarity between the text content and the feature type label and the clinical diagnostic relevance.
[0128] The diagnostic focus text unit is a text unit generated in step S410 that contains key diagnostic information, including important diagnostic information from the medical description text. The image feature region set is a set of information generated in step S420 that contains clinically relevant regions in the image; each region includes region boundary coordinates and feature type labels. Semantic relevance is the degree of semantic association between the diagnostic focus text unit and the image feature regions, reflecting the degree of matching and clinical relevance between the text description and image features. Semantic similarity between text content and feature type labels is the degree of semantic similarity between the text content in the diagnostic focus text unit and the feature type labels in the image feature regions; calculating semantic similarity measures the degree of matching at the semantic level. Clinical diagnostic relevance is the degree of association between the content described in the diagnostic focus text unit and the image feature regions in clinical diagnosis; for example, whether the symptoms described in the text and the lesions shown in the image are likely caused by the same disease.
[0129] In one implementation, step S430 may specifically include the following steps S431-S435:
[0130] Step S431: Encode the text content of the diagnostic focus text unit with word vectors to generate text semantic vectors. The word vector encoding is implemented using a pre-trained medical domain language model.
[0131] Diagnostic focus text units are text units containing key diagnostic information from medical descriptive texts, including important information such as symptom descriptions and disease diagnoses. Word vector encoding is the process of converting each word in the text into a vector representation, transforming textual information into a numerical form that computers can process. Text semantic vectors are vectors representing the overall semantic information of the text after word vector encoding. Pre-trained medical domain language models, such as the BioBERT model, are language models pre-trained on large amounts of medical text data. They can learn specialized medical vocabulary and semantic information, thus enabling more accurate word vector encoding of medical texts.
[0132] When encoding word vectors into the text content of diagnostic focus text units, the text content is first input into a pre-trained medical domain language model. Taking the BioBERT model as an example, this model is based on the Transformer architecture and has powerful language understanding capabilities. The model performs word segmentation on the input text, breaking it down into individual words. Then, for each word, the model maps it into a high-dimensional vector space based on its semantic information in the medical domain, obtaining a word vector representation for each word.
[0133] Next, the word vectors of all words in the text are processed to generate a text semantic vector. Average pooling can be used to average the word vectors of all words, resulting in a vector representing the semantic information of the entire text. For example, for a diagnostic focus text unit containing the words "fever" and "cough," the model generates word vectors for "fever" and "cough" respectively, and then averages these two word vectors to obtain the text semantic vector for that text unit. Through this processing, the word vector encoding of the text content of the diagnostic focus text unit is completed, generating a text semantic vector, which provides the foundation for subsequent semantic similarity calculations.
[0134] Step S432: Perform the same word vector encoding on the feature type labels in the image feature region set to generate feature semantic vectors so that they are in the same vector space as the text semantic vectors.
[0135] The image feature region set is the set of clinically relevant regions in the image generated in step S420. The feature type labels are tags describing the feature type of each image feature region, such as "tumor" or "inflammation." The same word vector encoding method and model are used to process the feature type labels in the image feature region set, as in step S431 when encoding the text content of the diagnostic focus text unit. The feature semantic vector is a vector representing the semantic information of the feature type labels after word vector encoding. Placing the feature semantic vector and the text semantic vector in the same vector space allows for accurate comparison of their semantic similarity in subsequent calculations.
[0136] In practice, each feature type label from the image feature region set is sequentially input into a pre-trained medical domain language model (such as the BioBERT model). The model performs word segmentation on the feature type labels, breaking them down into words. For each word, the model maps it to a high-dimensional vector space based on its semantic information in the medical domain, obtaining the word vector representation.
[0137] Then, the word vectors of all words in the feature type label are processed together to generate a feature semantic vector. Similarly, average pooling can be used to average the word vectors of all words to obtain a vector representing the semantic information of the entire feature type label. For example, for the feature type label "lung tumor," the model generates word vectors for "lung" and "tumor" separately, and then averages these two word vectors to obtain the feature semantic vector for that feature type label. Through this processing, the feature type labels in the image feature region set also have corresponding feature semantic vectors, and these feature semantic vectors are in the same vector space as the text semantic vector generated in step S431, laying the foundation for subsequent calculation of the semantic similarity between the text semantic vector and the feature semantic vector.
[0138] Step S433: Calculate the cosine similarity between the text semantic vector and the feature semantic vector as the basic semantic similarity.
[0139] The text semantic vector is a vector representing the overall semantic information of the text, generated in step S431 by encoding the text content of the diagnostic focus text unit using word vectors. The feature semantic vector is a vector representing the semantic information of the feature type labels, generated in step S432 by encoding the feature type labels in the image feature region set using word vectors. Cosine similarity is an index used to measure the degree of similarity between two vectors. It is determined by calculating the cosine value of the angle between the two vectors. The closer the value is to 1, the more similar the two vectors are, meaning that the text content represented by the text semantic vector and the feature type label represented by the feature semantic vector are semantically closer. The basic semantic similarity is the similarity value obtained by calculating the cosine similarity between the text semantic vector and the feature semantic vector.
[0140] Step S434: Query the clinical diagnosis association knowledge base to obtain the diagnostic correlation coefficient between the clinical diagnosis scene corresponding to the diagnostic focus text unit and the anatomical location corresponding to the image feature region. The diagnostic correlation coefficient is pre-calculated based on clinical case statistics.
[0141] The Clinical Diagnostic Association Knowledge Base is a database storing a vast amount of clinical diagnostic knowledge and experience, recording the relationships between different symptoms, diseases, and anatomical locations. The clinical diagnostic scenario corresponding to a diagnostic focus text unit is the clinical diagnostic situation based on the symptom description, disease diagnosis, and other information within that unit. For example, a diagnostic focus text unit describing "chest pain and shortness of breath" might correspond to a diagnosis of cardiovascular or pulmonary disease. The anatomical location corresponding to an image feature region is the anatomical location of that region, such as the lungs or heart. The diagnostic correlation coefficient is a numerical value representing the degree of correlation between the clinical diagnostic scenario corresponding to a diagnostic focus text unit and the anatomical location corresponding to an image feature region. This coefficient is pre-calculated based on a large amount of clinical case statistics and reflects the correlation between the two in actual clinical diagnosis.
[0142] Step S435: The basic semantic similarity and diagnostic relevance coefficient are weighted and summed to generate a comprehensive semantic correlation. The weighting of the summation is dynamically adjusted according to the clinical diagnostic decision-making logic.
[0143] The basic semantic similarity is the cosine similarity between the text semantic vector and the feature semantic vector calculated in step S433, reflecting the semantic similarity between the text content of the diagnostic focus text unit and the feature type label of the image feature region. The diagnostic relevance coefficient is the numerical value representing the degree of association between the clinical diagnostic scenario corresponding to the diagnostic focus text unit and the anatomical location corresponding to the image feature region, obtained from the clinical diagnostic association knowledge base in step S434. The comprehensive semantic relevance is a numerical value representing the degree of semantic association between the diagnostic focus text unit and the image feature region, obtained by comprehensively considering the basic semantic similarity and the diagnostic relevance coefficient, providing a more comprehensive reflection of their semantic and clinical diagnostic relationship. Weighted summation is a calculation method that multiplies the basic semantic similarity and the diagnostic relevance coefficient by their respective weights and then sums them. Weight allocation refers to the weight values assigned to the basic semantic similarity and the diagnostic relevance coefficient, which are dynamically adjusted according to the clinical diagnostic decision-making logic to adapt to different clinical diagnostic scenarios and needs.
[0144] Step S440: Based on semantic correlation, perform bidirectional binding processing on the diagnostic focus text unit and the image feature region to generate a correlation mapping table containing text location coordinates and image region coordinates.
[0145] Semantic relevance is a numerical value calculated in step S430, representing the degree of semantic association between the diagnostic focus text unit and the image feature region, reflecting their relationship at the semantic and clinical diagnostic levels. Two-way binding processing establishes a bidirectional referencing relationship between the diagnostic focus text unit and the image feature region; that is, the corresponding image feature region can be located through the text, and the corresponding text description can be found through the image feature region. The association mapping table is a table used to record the association relationship between the diagnostic focus text unit and the image feature region, containing text location coordinates and image region coordinates. This table facilitates bidirectional localization between text and image.
[0146] During the two-way binding process, for each diagnostic focus text unit, the image feature region with the highest semantic relevance is selected for binding based on its semantic relevance to the image feature region. For example, for a diagnostic focus text unit describing "lung inflammation," its semantic relevance to each image feature region is calculated. If the highest semantic relevance is found to be with an image feature region located in the lungs and labeled "inflammation," then the diagnostic focus text unit is bound to that image feature region.
[0147] Simultaneously, for each image feature region, the diagnostic focus text unit with the highest semantic relevance is selected and bound. This establishes a bidirectional binding relationship between the diagnostic focus text unit and the image feature region. Then, the text position coordinates of the bound diagnostic focus text unit and the image region coordinates of the corresponding image feature region are recorded in the association mapping table. The text position coordinates are the position of the diagnostic focus text unit in the medical description text recorded in step S410, and the image region coordinates are the boundary coordinates of the image feature region generated in step S420.
[0148] Step S450: Establish semantic anchoring markers between medical description text and medical image sequence according to the association mapping table, and generate dynamic diagnostic reference lines connecting text description and corresponding image feature regions through dynamic reference line algorithm. The dynamic reference lines maintain a real-time connection state as the text scrolls or the image is zoomed during report reading.
[0149] Semantic anchoring tags are used to establish bidirectional references between medical descriptive text and medical image sequences, enabling rapid localization of text descriptions and image feature regions. Dynamic reference line algorithms are algorithms that update the position of reference lines in real time based on user actions. They generate dynamic diagnostic reference lines connecting text descriptions with corresponding image feature regions, ensuring that the reference lines always accurately connect the corresponding text and image areas. Dynamic diagnostic reference lines are lines used in graphic medical test reports to connect text descriptions with image feature regions. Their position updates in real time as the user scrolls, zooms, etc., maintaining a clear and visible relationship between text and images.
[0150] When establishing semantic anchor tags, firstly, invisible semantic anchor tags are inserted at corresponding positions in the medical description text based on the text position coordinates in the association mapping table. Each semantic anchor tag contains a unique association identifier and a corresponding image feature region index. The unique association identifier ensures the uniqueness of the tag, while the image feature region index allows for quick location of the corresponding image feature region. Simultaneously, in the display area of the medical image sequence, highlighted boxes are drawn based on the boundary coordinates of the image feature regions. The highlighted boxes embed the same unique association identifier as the semantic anchor tags to ensure correspondence with the semantic anchor tags in the text.
[0151] When a user interaction triggers a semantic anchor mark, such as clicking a semantic anchor mark in text, the coordinates of the corresponding image feature region in the association mapping table are retrieved. Then, the screen coordinate transformation relationship between the text display area and the image display area is calculated. This can be done by obtaining the position and size information of the text display area and the image display area, as well as data such as the current screen resolution, to perform the coordinate transformation calculation.
[0152] Based on screen coordinate transformation, a smooth reference line is generated using a Bézier curve algorithm to connect text semantic anchor marks with highlighted bounding boxes of image feature regions. The Bézier curve algorithm generates smooth curves, making the reference lines more aesthetically pleasing and easier to observe. The thickness and color of the reference line are dynamically adjusted based on the correlation score; the higher the correlation score, the thicker and darker the reference line, highlighting text and image areas with a high degree of correlation.
[0153] The system monitors user scrolling, zooming, and panning actions on the report in real time, dynamically updating the start and end coordinates of the reference lines using a coordinate transformation algorithm. Based on the user's actions, the algorithm adjusts the start and end coordinates of the reference lines accordingly, ensuring that the reference lines accurately connect the corresponding text descriptions and image feature regions. For example, when a user scrolls the report, the start and end coordinates of the reference lines update in real time as the text and images move.
[0154] Step S460: Process the layout of medical descriptive text and medical image sequences containing semantic anchoring markers and dynamic diagnostic reference lines according to clinical reporting standards to generate a standardized graphic medical test report that conforms to clinical reading habits.
[0155] Clinical reporting standards define the format and content requirements for graphic medical laboratory reports in the medical field. These standards include specifications for font, font size, layout, and content structure. Adhering to these standards makes reports more professional, clear, and easy to read. Semantic anchoring markers, established in step S450, are used for bidirectional referencing between medical descriptive text and medical image sequences. Dynamic diagnostic reference lines connect text descriptions with image feature areas, enhancing the correlation and interactivity between text and images. Layout processing involves the reasonable arrangement and typesetting of the medical descriptive text and medical image sequences, including semantic anchoring markers and dynamic diagnostic reference lines, to conform to clinical reporting standards. Standardized graphic medical laboratory reports, after layout processing, conform to clinical reading habits and provide doctors and other medical personnel with accurate and clear patient clinical information.
[0156] It is understood that the various algorithms involved in the above descriptions of the embodiments of the present invention can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of the present invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solutions of the present invention. For example, they can use normalization to eliminate dimensional conflicts before feature fusion, use interpolation to eliminate dimensional differences, reasonably set thresholds based on historical data, experience or business scenario requirements, train the model based on a general model training method, set the number of layers in the model structure based on actual needs, select activation functions, etc. The present invention will not provide redundant descriptions of overly detailed implementation processes here.
[0157] Please see Figure 2 , Figure 2This is a schematic diagram of a computer system provided in an embodiment of the present invention. The computer system includes at least a processor 101, a communication interface 102, and a memory 103. The processor 101, communication interface 102, and memory 103 can be connected via a bus or other means. The processor 101 (or Central Processing Unit, CPU) is the computing and control core of the computer system, capable of parsing various instructions and processing various data within the computer system. The communication interface 102 may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.), and can be used to send and receive data under the control of the processor 101; the communication interface 102 can also be used for data transmission and interaction within the computer system. The memory 103 is a storage device in the computer system used to store programs and data. It is understood that the memory 103 here can include the computer system's built-in memory, or it can include extended memory supported by the computer system. The memory 103 provides storage space, which stores the computer system's operating system; this invention does not limit this storage space.
[0158] In one embodiment, the processor 101 executes the deep learning-based image and text medical test report generation method provided above in the embodiments of the present invention by running a computer program in the memory 103.
Claims
1. A method for generating a medical examination report with pictures based on deep learning, characterized in that, The method comprises: Structurally integrating original test records generated in a medical test process with a medical image sequence to obtain a test data unit set containing a time sequence correlation, each test data unit in the test data unit set containing a unique test event identifier and a corresponding multi-source data reference pointer; Building a feature mapping rule library based on a clinical diagnosis decision logic, and converting quantitative indicators and qualitative descriptions in the test data unit set into standardized clinical feature representations through rule matching; Calling a deep generation model to perform adaptive generation processing on the standardized clinical feature representations, adjusting a text generation strategy according to the diagnostic correlation strength between features, and generating medical description text conforming to clinical narrative logic, specifically including: inputting the standardized clinical feature representations into a feature encoding layer of the deep generation model, performing nonlinear mapping processing on the diagnostic correlation strength parameters between features through a multilayer perception network to generate a feature correlation matrix, the element values in the feature correlation matrix representing the diagnostic dependence degree between corresponding feature pairs; building a feature attention mechanism module based on the feature correlation matrix to calculate the attention weight values of each standardized clinical feature in the text generation process, the attention weight values being associated with corresponding element values in the feature correlation matrix and the position weight of the feature in the diagnostic decision logic chain; performing weighted aggregation processing on the standardized clinical feature representations and the attention weight values through the feature encoding layer to generate a weighted feature vector containing feature importance sorting, the dimension of the weighted feature vector being consistent with the number of features in the standardized clinical feature representation; inputting the weighted feature vector into a sequence generation layer of the deep generation model, initializing the text generation strategy as a default clinical narrative template, and adjusting the feature description order in the template according to the feature importance sorting in the weighted feature vector; performing autoregressive text generation processing based on the adjusted text generation strategy through the sequence generation layer to generate preliminary medical description text; Diagnostically focusing on correlating and typesetting the medical description text with the corresponding medical image sequence, establishing a bidirectional reference relationship between the text description and the image feature region through semantic anchoring, and generating a standardized graphic medical test report containing a dynamic diagnostic reference line.
2. The method of claim 1, wherein, The method comprises: Performing multi-modal field analysis processing on the original test records, extracting numerical indicators, textual descriptions and test time stamp information according to test items, and generating structured record entries through regular expression matching and domain dictionary verification, the structured record entries containing data type labels and time dimension markers; Performing time sequence attribute extraction processing on the medical image sequence, based on image file header information to analyze the time interval parameters and sequence frame index relationship of continuous acquisition, and generating an image time sequence with timestamp encoding, the timestamp encoding and the test time stamp of the structured record entry using a unified time reference; The structured record entry is input into a time correlation module of the image time sequence, the time offset between the test timestamp and the image acquisition time interval is calculated, a multi-source data time alignment mapping table is generated by a dynamic time warping algorithm, and each record in the time alignment mapping table contains the corresponding relationship between the record entry index and the image frame index; Based on the time alignment mapping table, the structured record entry and the image time sequence are subjected to data unit aggregation processing, and according to the time continuity of the test event and the clinical diagnosis correlation, the associated record entries and image frames in the same diagnosis stage are integrated into preliminary data units, and the preliminary data units contain associated reference indexes of multi-source data; A unique test event identifier is assigned to each preliminary data unit, which is generated by combining the test event occurrence time coding and the test type identification, a multi-source data reference pointer is established to point to the storage path of the original data, and a test data unit set containing time sequence correlation is obtained, and the time sequence correlation realizes the sequential arrangement between units through the time coding in the test event identifier.
3. The method of claim 1, wherein, The feature mapping rule library is constructed based on the clinical diagnosis decision logic, and the quantitative indicators and qualitative descriptions in the test data unit set are converted into standardized clinical feature representations through rule matching, including: Diagnosis reasoning texts in clinical diagnosis and treatment guidelines are collected, diagnosis decision elements are extracted through entity relationship extraction technology, and structured decision logic chains are generated, each node in the structured decision logic chain represents a diagnosis judgment step, and the edges represent the conditional dependence relationship between steps; A standardized clinical feature description model is defined based on the structured decision logic chain, and the description model contains feature name, data type, clinical value range and feature correlation strength parameter, wherein the feature correlation strength parameter is used to quantify the mutual influence degree of different features in diagnosis reasoning; According to the description model and the structured decision logic chain, a feature mapping rule entry is constructed, each rule entry is associated with the source data mode and the feature conversion logic through a dynamic matching algorithm, and the dynamic matching algorithm automatically selects a matching strategy according to the data type in the test data unit set; All feature mapping rule entries are classified according to clinical departments and diagnosis stages, rule version identification and clinical evidence level labels are added, and a feature mapping rule library supporting dynamic update is constructed; The feature mapping rule library is loaded through rule matching processing, the quantitative indicators in the test data unit set are subjected to threshold interval matching processing, and the qualitative descriptions are subjected to semantic similarity matching processing, and standardized clinical feature representations conforming to the definition of the description model are generated.
4. The method of claim 3, wherein, The feature mapping rule library is loaded through rule matching processing, the quantitative indicators in the test data unit set are subjected to threshold interval matching processing, and the qualitative descriptions are subjected to semantic similarity matching processing, and standardized clinical feature representations conforming to the definition of the description model are generated, including: The quantitative indicator field in the test data unit set is analyzed through rule matching processing, the numerical content and unit description are extracted, the dimension unification processing is performed according to the unit conversion rule in the feature mapping rule library, and the standardized numerical sequence with consistent units is generated; The interval division of the standardized numerical sequence is performed based on the threshold interval rule in the feature mapping rule library, and the continuous numerical value is mapped to a discrete clinical judgment level, each level corresponds to a feature state code defined in the description model, and the interval division adopts a mixed strategy combining a clinical significant threshold point and an equal interval division; The qualitative description text in the test data unit set is subjected to word segmentation and semantic coding processing, and the text description is converted into a combined feature representation containing a domain term vector and a context semantic vector, the domain term vector is generated by a medical term word embedding model, and the context semantic vector is generated by a bidirectional long short-term memory network; The semantic similarity of the combined feature representation and the standard term description in the feature mapping rule library is calculated, the standard term with the highest similarity is selected as the matching result, and a standardized term code corresponding to the qualitative description is generated; The feature state code corresponding to the quantitative indicator and the standardized term code corresponding to the qualitative description are weighted and fused according to the feature correlation strength parameter in the description model, and a standardized clinical feature representation containing the correlation between features is generated, and the weight value of the weighted fusion is in a positive correlation with the feature correlation strength parameter.
5. The method of claim 1, wherein, The medical description text conforming to the clinical narrative logic is generated according to the diagnostic correlation strength between features and the text generation strategy, including: The clinical narrative structure of the preliminary medical description text is analyzed, the feature description order and the feature correlation relationship expression in the text are extracted, a text structure analysis report is generated, and the analysis report contains a feature description position index and a correlation relationship expression frequency statistics; The text structure analysis report and the feature correlation matrix are compared, and abnormal paragraphs in which the feature description order and the feature correlation strength in the preliminary medical description text do not match are identified; Based on the position index of the abnormal paragraph and the correlation strength parameter in the feature correlation matrix, the sentence structure and the conjunction word selection in the text generation strategy are dynamically adjusted, and the abnormal paragraph is regenerated to enhance the text coherence between the correlated features; The regenerated paragraph and the non-abnormal paragraph of the preliminary medical description text are subjected to text splicing processing to generate an intermediate medical description text; The coverage rate of the feature description and the accuracy of the correlation relationship expression in the intermediate medical description text are calculated, and when the coverage rate and the accuracy both satisfy a preset threshold, the intermediate medical description text is determined as the medical description text conforming to the clinical narrative logic.
6. The method of claim 5, wherein, The coverage rate of the feature description and the accuracy of the correlation relationship expression in the intermediate medical description text are calculated, and when the coverage rate and the accuracy both satisfy a preset threshold, the intermediate medical description text is determined as the medical description text conforming to the clinical narrative logic, including: All feature names in the standardized clinical feature representation are extracted and matched with the feature description content in the intermediate medical description text, and the proportion of the described features in the total number of features is calculated as the feature description coverage rate; The association relationship expression sentence in the intermediate medical description text is parsed, the association direction and the association strength description between the feature pairs are extracted, the feature association strength parameters in the feature association matrix are compared, the expression accuracy score is calculated, and the score is obtained by calculating the similarity of the expression description vector and the matrix element vector through the cosine similarity algorithm; It is judged whether the feature description coverage reaches the preset coverage threshold and whether the expression accuracy score reaches the preset accuracy threshold. When both conditions are met, the intermediate medical description text is determined as a medical description text that meets the clinical narrative logic; When the feature description coverage does not reach the preset coverage threshold, the features that are not described are identified, the attention weight value of the corresponding feature in the text generation strategy is adjusted, and the self-recurrent text generation process is performed again; When the expression accuracy score does not reach the preset accuracy threshold, the association relationship sentence with the expression error is located, the association strength description in the sentence is corrected based on the parameters in the feature association matrix, and the intermediate medical description text after correction is generated again.
7. The method of claim 1, wherein, The medical description text is associated with the corresponding medical image sequence for diagnosis focus layout. A bidirectional reference relationship between the text description and the image feature area is established through semantic anchoring to generate a standardized graphic medical examination report containing a dynamic diagnosis reference line, including: The medical description text is parsed, the sentence segment containing the diagnostic key information is located through a clinical entity recognition model, and a diagnostic focus text unit is generated. The diagnostic focus text unit contains text content and location coordinates in the medical description text. The feature area detection is performed on the medical image sequence, the clinical attention area in the image is identified through a pre-trained medical image segmentation network, and an image feature area set containing area boundary coordinates and feature type labels is generated. The feature type label is generated through clinical terminology standardization processing. The semantic correlation degree of the diagnostic focus text unit and the image feature area set is calculated. The correlation degree is determined by the semantic similarity of the text content and the feature type label and the clinical diagnosis correlation. The diagnostic focus text unit and the image feature area are bidirectionally bound based on the semantic correlation degree to generate an association mapping relationship table containing text location coordinates and image area coordinates. The semantic anchoring mark is established between the medical description text and the medical image sequence according to the association mapping relationship table, and the dynamic diagnosis reference line connecting the text description and the corresponding image feature area is generated through a dynamic reference line algorithm. The dynamic reference line remains in real-time connection state with the text scrolling or image zooming during report reading. The medical description text and the medical image sequence containing the semantic anchoring mark and the dynamic diagnosis reference line are laid out to generate a standardized graphic medical examination report in line with the clinical reading habit.
8. The method of claim 7, wherein, The semantic correlation degree of the diagnostic focus text unit and the image feature area set is calculated. The correlation degree is determined by the semantic similarity of the text content and the feature type label and the clinical diagnosis correlation, including: The text content of the diagnostic focus text unit is word vector encoded to generate a text semantic vector. The feature type labels in the image feature region set are subjected to the same word vector coding to generate feature semantic vectors, so as to be in the same vector space as the text semantic vector; The cosine similarity between the text semantic vector and the feature semantic vector is calculated as a basic semantic similarity; A clinical diagnosis association knowledge base is queried to obtain a diagnosis correlation coefficient between a clinical diagnosis scene corresponding to the diagnosis focus text unit and an anatomical part corresponding to the image feature region, the diagnosis correlation coefficient being pre-calculated based on clinical case statistical data; The basic semantic similarity and the diagnosis correlation coefficient are subjected to weighted summation processing to generate a comprehensive semantic correlation degree.
9. A computer system, characterized by It comprises: a memory in which a computer program is stored; a processor for loading the computer program to implement the deep learning-based image-text medical examination report generation method according to any one of claims 1-8.
Citation Information
Patent Citations
Gynecological and obstetric information processing method and system based on Internet
CN116825264A
Knowledge and data fused medical content image-text generation system and method
CN120126811A