Artificial intelligence-based clinical research report automatic drafting system and method
By constructing a medical knowledge graph and fine-tuning the large language model using a multi-condition encoder, the problems of high computational resource consumption and data disconnect in the generation of clinical research reports were solved, achieving efficient and accurate automatic report writing.
Patent Information
- Application Number
- CN202510962042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-07-14
AI Technical Summary
Existing clinical research report generation models suffer from high computational resource consumption, damage to the knowledge integrity of pre-trained models, and lack of explicit constraint mechanisms on adverse reaction characteristics, resulting in inaccurate reports. Furthermore, data disconnect between devices affects diagnostic accuracy.
Clinical research data and equipment profiling data are acquired through the data acquisition module, a medical knowledge graph is constructed, a multi-condition encoder is established to fine-tune the large language model under multiple conditions, and the symptoms and diagnoses are extracted by combining the BioBERT model. Multi-modal encoder and condition encoder are set up and fine-tuned three times to optimize the large language model, so as to realize automated mapping and dynamic learning from text to structured dimensions.
It significantly improves the accuracy of report generation and the efficiency of anomaly detection, ensures the integrity of knowledge in the large language model, improves computational efficiency, enhances sensitivity to adverse reaction characteristics, and solves the problem of invisible and uncontrollable equipment status.
Smart Images

Figure CN120473070B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to an automated system and method for writing clinical research reports based on artificial intelligence. Background Technology
[0002] A Clinical Research Report (CSR) is a comprehensive regulatory report that describes the data and results observed in a clinical study. It is generally required to be written at the end of the study, but it may also be generated at other times during the study. Currently, automatic report generation technology is widely used. However, in the field of clinical medicine, most CSR generation models only consider medical images or medical reports in the initial steps. The low matching degree of feature information between medical images and medical reports leads to insufficient extraction of key semantics and reduced model robustness.
[0003] In recent years, with the rapid development of artificial intelligence technology, especially the successful application of large language models in various natural language processing tasks, the automatic writing of reports has also gained new development opportunities. Through large language models, corresponding reports can be automatically generated based on natural language expressions. In the process of generating clinical research reports, large language models are usually trained and cross-modal attention mechanisms are proposed for full parameter fine-tuning. This method consumes a lot of computing resources and is prone to destroying the knowledge integrity of the pre-trained large language model. It lacks explicit constraint mechanisms on adverse reaction features, has a high false detection rate, and ultimately leads to inaccurate reports.
[0004] Furthermore, the generation of modern clinical medical reports heavily relies on the test data output by medical devices, including imaging equipment (CT, MRI), in vitro diagnostic equipment (biochemical analyzers, hematology analyzers), and vital sign monitoring equipment (ECG monitors, ventilators). These devices should theoretically provide objective and real-time data support for the generation of clinical research reports. However, the existing report generation process suffers from significant data disconnect between devices and the data, which impairs diagnostic accuracy and consequently affects the accuracy of clinical research reports, potentially leading to medical errors to some extent. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides an artificial intelligence-based system and method for automatically writing clinical research reports, which solves the problems mentioned in the background.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] Firstly, this application provides an artificial intelligence-based automatic clinical research report writing system, comprising:
[0010] The data acquisition module collects clinical research data and equipment profile data uploaded by users and extracts report elements;
[0011] The relationship mapping module, based on the reporting elements, obtains entities, entity types, and corresponding parameter points that have a mapping relationship between the clinical research process and the reporting elements; it also obtains adverse reaction types and lesion areas that have a mapping relationship between the clinical research process and the reporting elements; and it obtains the internal structure of the research equipment that has a mapping relationship with the reporting elements from the clinical research process.
[0012] The training fine-tuning module sets up a multi-condition encoder based on the mapping relationship, constructs corresponding fine-tuning instructions, performs multi-condition fine-tuning on the large language model, and trains and updates it to obtain an optimized large language model.
[0013] Furthermore, the steps for refining the report's elements include:
[0014] Research requirements are extracted from clinical research data uploaded by users, including research literature, research topics, research protocols, research progress, target diseases, and target symptoms.
[0015] Extract equipment requirements from equipment profile data, including equipment aging requirements and equipment performance requirements;
[0016] Combine research requirements and equipment requirements to generate report elements.
[0017] Furthermore, obtaining the mapping relationship also includes:
[0018] The report should analyze at least the elements of data cleaning and data transformation.
[0019] Several research types to be uploaded are identified, and the BioBERT model is used to extract symptoms, drug entities, and corresponding parameter points. The matching dimension is performed through a rule engine, a quantitative evaluation strategy is executed, and the corresponding evaluation feature set and training sample size are obtained. A pre-set large language model is used for pre-training. The evaluation dataset includes matching efficiency, matching accuracy, and fusion coverage.
[0020] Using each entity as a node, retrieve each entity type to construct a medical knowledge graph containing target disease, target symptom, target drug, and research type; obtain the parameter points corresponding to any entity based on the medical knowledge graph, standardize the values corresponding to the parameter points into relative position indicators, draw parameter change curves and overlay and display dynamic standard intervals; when at least two parameter points are detected to exceed the dynamic standard interval, generate an early warning signal and inject it into the medical knowledge graph as a dynamic attribute.
[0021] Obtain the weights that map the lesion areas to the reported elements;
[0022] Obtain the threshold values that indicate a mapping relationship between the internal structure of the research equipment and the report elements.
[0023] Furthermore, the quantitative evaluation strategy is based on the following formula:
[0024] ;
[0025] In the formula, N represents the number of training samples, and D type The study type is indicated by φ(·), which represents the nonlinear weighted result of the characteristic indices for the corresponding study type. The characteristic indices must include at least one of the following: equilibrium characteristics, interaction strength characteristics, and individual difference characteristics. h represents the standardization factor, and β... type λ represents the weight coefficient corresponding to the feature index, Es represents the basic sample size, and λ represents the adjustment factor.
[0026] Furthermore, the steps for constructing fine-tuning instructions include:
[0027] One fine-tuning: Calculate the value index based on the evaluation feature set, compare and analyze the value index with the preset standard value range [jz1, jz2], automatically match template paragraphs, and under the condition of triggering the basic paragraph template and the standard paragraph template, call the NLP interpretive paragraph generator and automatically annotate;
[0028] Secondary fine-tuning: Establish a joint embedding space, including a visual encoder and a text encoder. Input the weights that map the lesion region to the reporting elements into the joint embedding space. Set the scene feature matrix for the lesion region and retain the alignment loss. Establish a conditional encoder. Input the weights and the scene feature matrix into the conditional encoder. When an adverse reaction type is detected, enforce the constraint.
[0029] Three fine-tuning steps: First, obtain the timestamp that exceeds the threshold. Then, randomly extract several times before and after the corresponding time to form a time series, and the time series is a dynamic variable. Second, extract the average and fluctuation values of the corresponding values of the related parameter points in the time series, and calculate the risk level by weighted summation. Third, retrieve the medical knowledge graph to determine whether the numerical results corresponding to the parameter points are correct.
[0030] Content is identified and tagged based on different risk levels, with three risk levels. The numerical value corresponding to each risk level is data-bound with the content tags in the generated report, and deep learning of risk tags is performed using Internet big data. For parameter points below the second level, the corresponding calibration value is provided; otherwise, the value corresponding to the parameter point is marked as invalid, and an equipment maintenance instruction is generated.
[0031] Furthermore, the value index is compared and analyzed with the preset standard value range [jz1, jz2]:
[0032] Label the value index as "value";
[0033] When value < jz1, the paragraph basic template is matched;
[0034] When jz1 ≤ value < jz2, the paragraph standard template is matched;
[0035] When value ≥ jz2, the top-level paragraph template is matched.
[0036] Furthermore, the second fine-tuning steps include:
[0037] A joint embedding space is established. Image features of lesion areas are extracted using a visual encoder, and text features are extracted using a text encoder. The features corresponding to lesion areas and report elements, as well as the weights that have a mapping relationship between lesion areas and report elements, are mapped to a unified space.
[0038] The image features and text features of each lesion region are concatenated into a joint feature vector, and a scene feature matrix is set for the lesion region while retaining the alignment loss.
[0039] When an adverse reaction type is detected, a constraint is forcibly applied: LOA = max(LOA, 1.5).
[0040] In the formula, LOA represents the alignment loss.
[0041] Furthermore, the step of extracting the associated parameter points in the time series includes: when establishing the association between the time series and the parameter points, firstly providing a judgment standard for the value corresponding to each parameter point, and then extracting the corresponding trigger relationship between each judgment standard and the report element.
[0042] Secondly, this application provides a method for automatically writing clinical research reports based on artificial intelligence, including the following steps:
[0043] Receive the instruction to generate a report;
[0044] Identify the device profile data and clinical research data for generating report instructions, and extract report elements from them;
[0045] Based on the reporting elements, the system obtains entities, entity types, and corresponding parameter points that are mapped to the clinical research process and the reporting elements, as well as adverse reaction types and lesion areas that are mapped to the clinical research process and the reporting elements. It also obtains the internal structure of the research equipment that is mapped to the reporting elements from the clinical research process.
[0046] Based on the mapping relationship, a multi-condition encoder is set up, corresponding fine-tuning instructions are constructed, the large language model is fine-tuned under multiple conditions, and then trained and updated to obtain an optimized large language model.
[0047] (III) Beneficial Effects
[0048] This invention provides an artificial intelligence-based system and method for automatically writing clinical research reports, which has the following beneficial effects:
[0049] 1. This invention obtains entities, entity types, and corresponding parameter points that map the clinical research process to report elements, as well as adverse reaction types and lesion areas that map the clinical research process to report elements. It also obtains the internal structure of research equipment that maps to report elements from the clinical research process. This not only achieves automated mapping from text to structured dimensions but also continuously improves matching accuracy through dynamic learning and multimodal fusion, forming an intelligent analysis engine with clinical decision-making value. By establishing a medical knowledge graph, extracting parameter points corresponding to entities, drawing parameter change curves, and overlaying dynamic standard intervals, the medical knowledge graph is dynamically updated, enabling intelligent and standardized monitoring of clinical research quality and significantly improving the efficiency and accuracy of anomaly detection.
[0050] 2. This invention first pre-trains a large language model and, based on mapping relationships, sets up a multi-condition encoder to construct corresponding fine-tuning instructions. This fine-tuning of specific parameters optimizes the large language model, ensuring its knowledge integrity and improving computational efficiency. In the first fine-tuning, an evaluation feature set is constructed based on matching efficiency, matching accuracy, and fusion coverage, and a value index is calculated to automatically match template paragraphs. In the second fine-tuning, a joint embedding space is established, setting a scene feature matrix for the lesion region while retaining alignment loss, thus strengthening the lesion and facilitating the extraction of crucial local features for diagnosis. This significantly improves sensitivity to adverse reaction features and enhances the semantic understanding of the generated report. In the third fine-tuning, the internal structure of the equipment and the over-limit threshold are integrated into the large language model, solving the long-standing problem in clinical research where the influence of equipment status is invisible and uncontrollable. Attached Figure Description
[0051] Figure 1 This is a schematic diagram of a module of an automated clinical research report writing system according to an exemplary embodiment;
[0052] Figure 2 This is a schematic diagram illustrating the steps of an automatic clinical research report writing method according to an exemplary embodiment. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0054] Example 1
[0055] This invention provides an artificial intelligence-based system for automatically writing clinical research reports; Figure 1 This is a schematic diagram of a module of an automated clinical research report writing system according to an exemplary embodiment; please refer to... Figure 1 The system includes: a data acquisition module, a relation mapping module, and a training and fine-tuning module, and the data acquisition module, relation mapping module, and training and fine-tuning module are connected in communication.
[0056] Functional module description of this system:
[0057] Data acquisition module: Collects clinical research data and equipment profile data uploaded by users, and extracts report elements from them;
[0058] The steps for extracting key elements from a report include:
[0059] Research requirements are extracted from clinical research data uploaded by users, including research literature, research topics, research protocols, research progress, diseases, symptoms, and drugs.
[0060] Extract equipment requirements from equipment profile data, including equipment aging requirements and equipment performance requirements;
[0061] Equipment profile data is a summary of equipment status tags. Other tagging technologies can also be used instead. For example, big data analysis can be used to generate equipment profiles to ensure that the selection of equipment is more in line with the actual needs of clinical research. This enables the automated generation of clinical research reports throughout the entire process, significantly improving research efficiency and report quality, while also meeting medical data compliance requirements.
[0062] Combine research requirements and equipment requirements to obtain report elements;
[0063] The following explanations are provided for the relevant terms:
[0064] Research Literature: Refers to academic resources directly related to clinical research, including published clinical trial reports, case analyses, treatment guidelines, meta-analyses, etc.; Research Topic: Research topics centered around clinical problems (such as disease diagnosis and treatment, disease management, etc.), requiring clear intervention methods and clinical endpoints; Research Protocol: Operational documents that standardize the implementation of clinical research, requiring compliance with ethical review and regulatory requirements (such as ICH-GCP standards); Research Progress: A summary of the interim results and challenges during the execution of clinical research, used to adjust the trial protocol or meet regulatory reporting requirements; Disease: The specific disease entity targeted in the study, requiring clear identification of its clinical subtype (e.g., in breast cancer molecules, Luminal A, Luminal B, etc.), stage (e.g., Phase 0, Phase I, Phase II, Phase III, and Phase IV), and current treatment status; Symptoms: Clinical manifestations targeted in the study, usually used as primary / secondary endpoints or safety indicators; Drugs: Treatment indicators configured in the study for clinical manifestations.
[0065] Equipment aging requirements: Management standards set for the performance degradation of equipment due to long-term use, environmental exposure, or natural wear and tear in clinical studies; Equipment performance requirements: Technical specifications and functional standards that equipment must meet in clinical studies to ensure that it can accurately and stably perform the operation or measurement tasks required for the study.
[0066] The aforementioned data can be further enhanced by combining web scraping technology to obtain more relevant data from public network platforms. After filtering and cleaning, the data dimensions are enriched, further improving the breadth and depth of data collection. At the same time, by combining users' usage habits of the devices, the system can judge their proficiency and correctness in using the devices. Through this combination, the statistical device status tags will be more accurate, thus providing users with a more professional automatic report writing solution. This system improves resource utilization and efficiency of automatic report writing by optimizing the way users obtain report elements and the accuracy of their needs.
[0067] The relationship mapping module, based on the reporting elements, obtains entities, entity types, and corresponding parameter points that have a mapping relationship between the clinical research process and the reporting elements, as well as adverse reaction types and lesion areas that have a mapping relationship between the clinical research process and the reporting elements. It also obtains the internal structure of the research equipment that has a mapping relationship with the reporting elements from the clinical research process.
[0068] It should be noted that the mapping relationship refers to establishing an association between two things. Once one is referenced, the other will also change accordingly or be referenced. By obtaining entities and entity types, mapping relationships are established between indicators and reporting elements in the clinical research process. By obtaining adverse reaction types, mapping relationships are established between lesion areas and reporting elements in the clinical research process. Mapping relationships are also established between the internal structure of research equipment and reporting elements.
[0069] The process of obtaining the mapping relationship also includes:
[0070] The report should include at least data cleaning and data transformation elements.
[0071] Data cleaning: missing data handling, outlier detection, duplicate data handling, and data correction are fundamental to ensuring data accuracy and reliability. They eliminate noise, errors, and inconsistencies in the data, enabling subsequent analysis to draw credible conclusions. Data transformation: variable transformation, data aggregation and grouping, deriving new variables, and time series processing are used to transform raw data into a form more suitable for analysis or to generate new variables for further analysis.
[0072] Several research types to be uploaded are identified, and the BioBERT model is used to extract symptoms, drug entities, and corresponding parameter points. The dimensions are matched through a rule engine, a quantitative evaluation strategy is executed, and the corresponding evaluation feature set and training sample size are obtained. A pre-set large language model is used for pre-training. The evaluation dataset includes matching efficiency, matching accuracy, and fusion coverage.
[0073] The steps for implementing a quantitative assessment strategy include:
[0074] Formula setting: ;
[0075] In the formula, N represents the training sample size. This indicates the type of research, including parallel design, factorial design, cross-design, and hybrid design. This represents the non-linear weighted result of the characteristic index for the corresponding research type, used to quantify the characteristic index of the research type. The characteristic index includes at least one of the characteristic indices obtained from the quantification of equilibrium characteristics, interaction strength characteristics, and individual difference characteristics. h represents the standardization factor, which takes a value greater than 0, and is used to control the quantification of different characteristic indices. This represents the weight coefficient corresponding to the feature index, and If greater than 0, e represents the natural base. Indicates the basic sample size. This represents a control factor with a value range of [0.01, 0.1], used to control the rationality of the combination of research types;
[0076] Specifically, if we label parallel designs as A, factorial designs as B, and cross designs as C, then there are a total of 7 combinations of research types: [A], [B], [C], [AB], [AC], [BC], and [ABC].
[0077] When there is only a single research type: [A] corresponds to the balance characteristic, [B] corresponds to the interaction strength characteristic, and [C] corresponds to the individual difference characteristic; when there are two research types: [AB] corresponds to the balance characteristic and the interaction strength characteristic, [AC] corresponds to the balance characteristic and the individual difference characteristic, and [BC] corresponds to the interaction strength characteristic and the individual difference characteristic; when there are three research types [ABC], they correspond to the balance characteristic, the interaction strength characteristic, and the individual difference characteristic.
[0078] For example: If it is a hybrid design, the corresponding It can be decomposed into h1 (balance characteristics) * h2 (interaction intensity characteristics) * h3 (individual difference characteristics), where h1, h2, and h3 represent standardization factors;
[0079] Assuming the calculated φ is 1.8 and Es is 50, It is 0.05;
[0080] Therefore, the sample size = 1.8 * e 0.05*50 =22, then the sample size is adjusted to 22;
[0081] By using the features of each group corresponding to the research type as monitoring vectors and inputting them into the above formula model, the system can automatically determine the sample size through the combination of balance features, interaction strength features and individual difference features, rather than relying solely on qualitative experience. This significantly improves the interpretability and practicality of the large language model in clinical research.
[0082] In addition, parallel design: random grouping improves the balance between groups, corresponding to a large training sample size; factorial design: analyzes the interaction of multiple factors, corresponding to a moderate training sample size; crossover design: reduces inter-individual differences, corresponding to a small training sample size; the balance feature is jointly measured by calculating the standardized mean difference of covariates and the entropy balance index, the interaction strength feature uses a hierarchical causal forest model to estimate the interaction effect value between variables, and the individual difference feature uses a random intercept-slope mixture model to quantify patient heterogeneity; the specific process will not be elaborated here.
[0083] Using each entity as a node, retrieve each entity type and construct a medical knowledge graph containing the target disease, target symptoms, target drugs, and research types;
[0084] Based on the medical knowledge graph, obtain the parameter point q corresponding to any entity, mark the value corresponding to any parameter point q as Lq, and compare and analyze the dynamic standard interval QZ[QZ1, QZ2] of parameter point q. Standardize the value corresponding to parameter point q into a relative position index, draw the parameter change curve and overlay the dynamic standard interval. When at least two parameter points are detected to exceed the dynamic standard interval, generate an early warning signal and inject it into the medical knowledge graph as a dynamic attribute.
[0085] The dynamic standard interval QZ corresponds one-to-one with the parameter point q, and the dynamic standard interval is generated in at least one of the following ways:
[0086] Linear adjustment based on research progress time: ;
[0087] In the formula, This represents the dynamic standard interval at a given research time t. denoted as the upper and lower limits of the initial standard interval, k represents the time slope coefficient, which takes the form of a percentage, and t represents the research progress time;
[0088] Statistical intervals based on adaptive sample size: ;
[0089] In the formula, , This represents the upper and lower bounds of the current time interval t. This represents the moving average value corresponding to the historical parameter points. This represents the standard deviation corresponding to the parameter point. This indicates the current cumulative sample size;
[0090] Fuzzy logic intervals based on expert rules: ;
[0091] In the formula, QZ represents the dynamic standard interval. The union symbol represents the set of rules used to control multiple rules in fuzzy logic. It signifies merging the results of multiple rules, where n1 represents the number of rules. This represents the m-th expert rule. Indicates the rule weight. This represents the implication relation in fuzzy logic, that is, if the condition is satisfied... Then the weights are used. ;
[0092] Specifically, since report elements are typically multimodal data, a CRF-BERT hybrid model is used for medical entity recognition and relation extraction. Weakly supervised learning is used to probabilistically fill in missing label parameters. Different subgroups correspond to different standard ranges for their parameter points, and each parameter point is associated with a specific value and report location. By plotting parameter change curves, the severity of each parameter point can be analyzed, and the medical knowledge graph can be updated. This enables intelligent and standardized monitoring of clinical research quality, significantly improving the efficiency and accuracy of anomaly detection. The system not only achieves automated mapping from text to structured dimensions but also continuously improves matching accuracy through dynamic learning and multimodal fusion, forming an intelligent analysis engine with clinical decision-making value. Furthermore, in practical implementation, the parameter rule base needs to be configured according to the specific research type and deeply integrated with existing clinical data platforms (such as Medidata Rave).
[0093] Obtain the weights that map the lesion areas to the reported elements;
[0094] Obtain the threshold values that map the internal structure of the research equipment to the report elements;
[0095] The training fine-tuning module sets up a multi-condition encoder based on the mapping relationship, constructs corresponding fine-tuning instructions, performs multi-condition fine-tuning on the large language model, and trains and updates it to obtain an optimized large language model.
[0096] The steps to construct fine-tuning instructions include:
[0097] A fine-tuning: Calculating the value index based on the evaluation feature set:
[0098] ;
[0099] In the formula, Indicates the value index. This represents the weighting adjustment coefficient for the preset value index, where e represents the natural base. , , These are matching efficiency, matching accuracy, and fusion coverage, respectively. , , These are the matching efficiency threshold, the matching accuracy threshold, and the fusion coverage threshold, respectively. , , All are weighting ratio coefficients. , , All are greater than 0, and α1+α2+α3=1. The weight correction coefficient represents the preset number of training samples, and Greater than 0;
[0100] Formula explanation: The higher the values of matching efficiency, matching accuracy, and fusion coverage, the higher the calculated value index, indicating that the quality of the generated report output by the system is higher and the large language model is trained better.
[0101] Value Index Comparative analysis with the preset standard value range [jz1, jz2]:
[0102] when When <jz1, match the basic paragraph template;
[0103] When jz1≤ When <jz2, match the standard paragraph template;
[0104] when When the value is greater than or equal to jz2, the top-level paragraph template is matched.
[0105] Specifically, the basic paragraph template is suitable for generating basic content, but has a low terminology density and uncontrollable paragraph length, resulting in low relevance and failing to meet the basic needs of most clinical research reports. The standard paragraph template is suitable for structured report writing with fixed paragraphs, but it cannot provide detailed descriptions for more complex clinical studies (such as research images), resulting in weak relevance. The top-level paragraph template has a medium to high terminology density, mandates the inclusion of professional terminology, and adaptively adjusts the number of evidence points, resulting in strong relevance.
[0106] Given that the basic and standard paragraph templates are triggered, and the relevance of these templates is generally low, NLP is invoked for intelligent interpretation and multi-dimensional automatic annotation (e.g., data source, confidence level, guideline basis, data calibration) to assist in the fully automated generation of clinical reports. The automatic annotation includes annotation type, implementation method, and example values, for example:
[0107]
[0108] By using interval judgment to perform dynamic template matching, a progressive architecture with context-aware connection is realized, and content of different depths is dynamically generated to improve the semantic relevance of the written report.
[0109] Secondary fine-tuning: Establish a joint embedding space, including a visual encoder and a text encoder. Input the weights that map the lesion region to the reporting elements into the joint embedding space. Set the scene feature matrix for the lesion region and retain the alignment loss. Establish a conditional encoder. Input the weights and the scene feature matrix into the conditional encoder. When an adverse reaction type is detected, enforce the constraint and fine-tune the weights in low rank.
[0110] A joint embedding space is established. Image features of lesion areas are extracted using a visual encoder, and text features are extracted using a text encoder. The features corresponding to lesion areas and report elements, as well as the weights that have a mapping relationship between lesion areas and report elements, are mapped to a unified space.
[0111] Specifically, in the visual encoder, Mask R-CNN is used to enhance lesion regions; in the text encoder, a bidirectional Long Short-Term Memory (LSTM) network is used to train short text interpretation. When the text length is 10-50 words, the number of memory units is set to 128-256; when the text length is 50-100 words, the number of memory units is set to 256-512; when the text involves medical diagnosis, the number of memory units is set to 512, and the time window step size is 15 words. A Transformer network is used to train long text interpretation, with 512 memory units and a time window step size of 50 words, and so on. The specific steps are not described here.
[0112] The image and text features of each lesion region are concatenated into a joint feature vector, and a scene feature matrix is set for the lesion region, represented in the following form: In the formula, This indicates vector concatenation, where n3 represents the number of lesion regions and d represents the dimension of the embedding space.
[0113] The formula for calculating the alignment loss is:
[0114] ;
[0115] In the formula, The alignment loss is a metric that measures the quality of feature alignment between an image and text. sim(·) represents the similarity function. This represents the image features corresponding to positive samples. This represents the text features corresponding to positive samples. This represents the image features corresponding to all samples, including mismatched negative samples. The weights representing the mapping relationship between lesion region i and reported element j. This represents the weight between lesion region i and the mismatched negative sample j, and , All are greater than 0. This represents the adjustment coefficient, and A value greater than 0 is used to control the distribution shape of the samples relative to the overall distribution, preventing issues caused by dynamic weights (e.g., ...). The introduced values are unstable;
[0116] When an adverse reaction type is detected, a constraint is applied: ;
[0117] Formula Explanation: By adjusting LOA, the alignment of key features is strengthened. Regardless of whether an adverse reaction is detected, the minimum LOA value is forced to be 1.5, which strengthens the alignment of relevant features of adverse reactions (such as hemorrhage, necrosis, and edema). The adverse reaction type is represented by a performance label, y={1, 2, ..., P}, where P is a positive integer greater than 0.
[0118] An adverse reaction perception gate is constructed based on the adverse reaction type and alignment loss degree, and the adverse reaction perception gate is introduced into the scene feature matrix with low-rank fine-tuning weights.
[0119] Specifically, the scene feature matrix is established to maintain the semantic relevance between lesion region vectors. The alignment loss allows the model to learn to distinguish the correct cross-modal associations by comparing positive samples with a large number of negative samples. That is, through the synergistic effect of the scene feature matrix and low-rank conditional constraints, while ensuring cross-modal semantic alignment, the complex associations of clinical scenarios are effectively captured. Under the premise of maintaining the overall stability of the model, it can not only prevent important lesion features and important text features from being over-compressed in the embedding space, but also significantly improve the sensitivity to adverse reaction features, resulting in a deeper semantic understanding of the generated report.
[0120] Three fine-tunings:
[0121] The system obtains timestamps that exceed the threshold, randomly extracts several moments before and after the corresponding timestamp to form a time series, and the time series is a dynamically changing quantity; it extracts the average and fluctuation values of the corresponding values of the associated parameter points in the time series, and calculates the risk level by weighted summation, and retrieves the medical knowledge graph to determine whether the numerical results corresponding to the parameter points are correct; where the fluctuation value is half the difference between the maximum and minimum values in the time series.
[0122] The steps for extracting associated parameter points in the time series include: obtaining parameter points that have a mapping relationship between the clinical research process and reporting elements; when establishing the association, firstly, providing judgment criteria for the value corresponding to each parameter point, including the value range, rate of change, and synergy constraints of associated parameters; then extracting the corresponding trigger relationship between each judgment criterion and the reporting element, for example: establishing a trigger rule mapping table to dynamically associate the judgment criteria of the parameter with the reporting element (e.g., warning level, recommended measures, chart type); when the value corresponding to the parameter point exceeds the preset value range (the value corresponding to the parameter point is not in the preset dynamic standard interval) or the rate of change of the parameter point exceeds the preset rate of change, the value result corresponding to the parameter point is determined to be incorrect, and the parameter point needs to be calibrated to obtain the calibration value. The calculation model is: calibrated value = g(original value, error model), where the error model includes zero-point offset, gain error, nonlinear error, and random noise. The zero-point offset correction value, gain correction coefficient, and nonlinear compensation coefficient are determined using the least squares method or weighted regression. g(·) can be expressed as: In the formula, jz represents the calibration value of the parameter point, and ys represents the original value of the parameter point. Let represent random noise, a represent the gain correction coefficient, b represent the zero-point offset correction value, and c represent the nonlinear compensation coefficient. The specific calculation steps will not be described in detail.
[0123] Content is identified and tagged based on different risk levels, with three risk levels: 1, 2, and 3, with the risk level increasing sequentially. The numerical value corresponding to each risk level is data-bound with the content tags in the generated report, and deep learning of the risk tags is performed using internet big data. For parameter points below level two (below level 1 or below level 2), the corresponding calibration value is provided; otherwise, the value corresponding to the parameter point is marked as invalid, and an equipment maintenance instruction is generated.
[0124] Upon receiving a maintenance instruction, immediately proceed with the maintenance of the equipment.
[0125] Finally, based on the pre-trained large language model, several blank new connected layers are added after the pre-trained layers of the initial pre-trained model. The blank connected layers are trained based on the model and the input features are adjusted. Through three fine-tuning and iterative training, the evaluation feature set and the number of training samples are continuously updated. Based on the model, a new evaluation feature set and the corresponding number of training samples are input, and the fully connected layers are adjusted forward by the new connected layers to achieve optimization of the large language model.
[0126] Specifically, large language models can comprehensively process image and text information to generate more comprehensive and accurate medical reports. They possess rich medical knowledge and language representation capabilities, facilitating better understanding and expression of medical texts. The automatic generation of reports often heavily relies on the quality and quantity of training data; therefore, the equipment used for collecting clinical data is crucial. For example, with continuous glucose monitors, sensor detachment due to equipment issues can lead to false hypoglycemia, ultimately resulting in inaccurate reports and increasing the difficulty of understanding natural language during the reporting process. By incorporating the internal structure of the device, the accuracy of semantic report generation can be further improved.
[0127] In addition, the pre-trained large language model can be set up as a capsule network to extract key semantic information, ensuring that the model can effectively learn the core semantics in the text; attention pooling technology is used to focus on document-level information in the text, enhancing the recognition and understanding of medical professional terms and concepts.
[0128] Example 2
[0129] This invention provides a method for automatically writing clinical research reports based on artificial intelligence; Figure 2 This is a schematic diagram illustrating the steps of an automated clinical research report writing method according to an exemplary embodiment; please refer to... Figure 2 The method includes the following steps:
[0130] S1. Receive the instruction to generate a report;
[0131] S2. Determine the device profile data and clinical research data for generating report instructions, and extract report elements from them;
[0132] S3. Based on the reporting elements, obtain the entities, entity types and corresponding parameter points that have a mapping relationship between the clinical research process and the reporting elements, and obtain the adverse reaction types and lesion areas that have a mapping relationship between the clinical research process and the reporting elements. Obtain the internal structure of the research equipment that has a mapping relationship with the reporting elements from the clinical research process.
[0133] S4. Based on the mapping relationship, set up a multi-condition encoder, construct the corresponding fine-tuning instructions, perform multi-condition fine-tuning on the large language model, and train and update to obtain an optimized large language model.
[0134] The weighting coefficients are determined using the coefficient of variation method, which assigns weights to each indicator based on the degree of variation between its current value and the target value. If the numerical difference of an indicator is large, clearly distinguishing each evaluated object, it indicates that the indicator has rich discriminative information and should therefore be given a larger weight. Conversely, if the numerical difference of each evaluated object on a certain indicator is small, then the indicator's ability to distinguish each evaluated object is weak, and therefore it should be given a smaller weight. This method directly utilizes the information contained in each indicator to calculate the weight of the indicator, thus possessing objectivity.
[0135] In the application, the various formulas mentioned are all calculated by removing dimensions and taking their numerical values. The formulas are derived from the most recent real-world situation by collecting a large amount of data and simulating it with software. The formulas are set by those skilled in the art according to the actual situation.
[0136] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented in software, the above embodiments can be implemented, in whole or in part, as a computer program product. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution.
[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0138] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An AI-based automatic clinical research report writing system, characterized in that: include: The data acquisition module collects clinical research data and equipment profile data uploaded by users and extracts report elements; The relationship mapping module, based on the reporting elements, obtains entities, entity types, and corresponding parameter points that have a mapping relationship between the clinical research process and the reporting elements; it also obtains adverse reaction types and lesion areas that have a mapping relationship between the clinical research process and the reporting elements; and it obtains the internal structure of the research equipment that has a mapping relationship with the reporting elements from the clinical research process. The training fine-tuning module sets up a multi-condition encoder based on the mapping relationship, constructs corresponding fine-tuning instructions, performs multi-condition fine-tuning on the large language model, and trains and updates it to obtain an optimized large language model. The process of obtaining the mapping relationship also includes: The report should analyze at least the elements of data cleaning and data transformation. Several research types to be uploaded were identified. The BioBERT model was used to extract symptoms, disease types, and drug entities, and corresponding parameter points were obtained. A rule engine was used to match dimensions, and a quantitative evaluation strategy was executed to obtain the corresponding evaluation feature set and training sample size. A pre-set large language model was then used for pre-training. The evaluation dataset included matching efficiency, matching accuracy, and fusion coverage. The quantitative evaluation strategy was based on the following formula: ; In the formula, N represents the number of training samples, and D type The study type is indicated by φ(·), which represents the nonlinear weighted result of the characteristic indices for the corresponding study type. The characteristic indices must include at least one of the following: equilibrium characteristics, interaction strength characteristics, and individual difference characteristics. h represents the standardization factor, and β... type λ represents the weight coefficient corresponding to the feature index, Es represents the basic sample size, and λ represents the adjustment factor. Using each entity as a node, retrieve each entity type to construct a medical knowledge graph containing target disease, target symptom, target drug, and research type; obtain the parameter points corresponding to any entity based on the medical knowledge graph, standardize the values corresponding to the parameter points into relative position indicators, draw parameter change curves and overlay and display dynamic standard intervals; when at least two parameter points are detected to exceed the dynamic standard interval, generate an early warning signal and inject it into the medical knowledge graph as a dynamic attribute. Obtain the weights that map the lesion areas to the reported elements; Obtain the threshold values that indicate a mapping relationship between the internal structure of the research equipment and the report elements.
2. The AI-based automatic clinical research report writing system according to claim 1, characterized in that, The steps for extracting report elements include: Research requirements are extracted from clinical research data uploaded by users, including research literature, research topics, research protocols, research progress, target diseases, and target symptoms. Extract equipment requirements from equipment profile data, including equipment aging requirements and equipment performance requirements; Combine research requirements and equipment requirements to generate report elements.
3. The AI-based automatic clinical research report writing system according to claim 1, characterized in that, The steps to construct fine-tuning instructions include: One fine-tuning: Calculate the value index based on the evaluation feature set, compare and analyze the value index with the preset standard value range [jz1, jz2], automatically match template paragraphs, and under the condition of triggering the basic paragraph template and the standard paragraph template, call the NLP interpretive paragraph generator and automatically annotate; Secondary fine-tuning: Establish a joint embedding space, including a visual encoder and a text encoder. Input the weights that map the lesion region to the reporting elements into the joint embedding space. Set the scene feature matrix for the lesion region and retain the alignment loss. Establish a conditional encoder. Input the weights and the scene feature matrix into the conditional encoder. When an adverse reaction type is detected, enforce the constraint. Three fine-tuning steps: First, obtain the timestamp that exceeds the threshold. Then, randomly extract several times before and after the corresponding time to form a time series, and the time series is a dynamic variable. Second, extract the average and fluctuation values of the corresponding values of the related parameter points in the time series, and calculate the risk level by weighted summation. Third, retrieve the medical knowledge graph to determine whether the numerical results corresponding to the parameter points are correct. Content is identified and tagged based on different risk levels, with three risk levels. The numerical value corresponding to each risk level is data-bound with the content tags in the generated report, and deep learning of risk tags is performed using Internet big data. For parameter points below the second level, the corresponding calibration value is provided; otherwise, the value corresponding to the parameter point is marked as invalid, and an equipment maintenance instruction is generated.
4. The AI-based automatic clinical research report writing system according to claim 3, characterized in that, The value index is compared and analyzed with the preset standard value range [jz1, jz2]. Label the value index as "value"; When value < jz1, the paragraph basic template is matched; When jz1 ≤ value < jz2, the paragraph standard template is matched; When value ≥ jz2, the top-level paragraph template is matched.
5. The AI-based automatic clinical research report writing system according to claim 1, characterized in that, The steps for secondary fine-tuning include: A joint embedding space is established. Image features of lesion areas are extracted using a visual encoder, and text features are extracted using a text encoder. The features corresponding to lesion areas and report elements, as well as the weights that have a mapping relationship between lesion areas and report elements, are mapped to a unified space. The image features and text features of each lesion region are concatenated into a joint feature vector, and a scene feature matrix is set for the lesion region while retaining the alignment loss. When an adverse reaction type is detected, a constraint is forcibly applied: LOA = max(LOA, 1.5). In the formula, LOA represents the alignment loss.
6. The AI-based automatic clinical research report writing system according to claim 3, characterized in that, The steps for extracting the associated parameter points in the time series include: when establishing the association between the time series and the parameter points, firstly, providing a judgment standard for the value corresponding to each parameter point, and then extracting the corresponding trigger relationship between each judgment standard and the report element.
7. A method for automatically writing clinical research reports based on artificial intelligence, characterized in that: Includes the following steps: Receive the instruction to generate a report; Identify the device profile data and clinical research data for generating report instructions, and extract report elements from them; Based on the reporting elements, the system obtains entities, entity types, and corresponding parameter points that are mapped to the clinical research process and the reporting elements, as well as adverse reaction types and lesion areas that are mapped to the clinical research process and the reporting elements. It also obtains the internal structure of the research equipment that is mapped to the reporting elements from the clinical research process. Based on the mapping relationship, a multi-condition encoder is set up, corresponding fine-tuning instructions are constructed, the large language model is fine-tuned under multiple conditions, and then trained and updated to obtain an optimized large language model. The process of obtaining the mapping relationship also includes: The report should analyze at least the elements of data cleaning and data transformation. Several research types to be uploaded were identified. The BioBERT model was used to extract symptoms, disease types, and drug entities, and corresponding parameter points were obtained. A rule engine was used to match dimensions, and a quantitative evaluation strategy was executed to obtain the corresponding evaluation feature set and training sample size. A pre-set large language model was then used for pre-training. The evaluation dataset included matching efficiency, matching accuracy, and fusion coverage. The quantitative evaluation strategy was based on the following formula: ; In the formula, N represents the number of training samples, and D type The study type is indicated by φ(·), which represents the nonlinear weighted result of the characteristic indices for the corresponding study type. The characteristic indices must include at least one of the following: equilibrium characteristics, interaction strength characteristics, and individual difference characteristics. h represents the standardization factor, and β... type λ represents the weight coefficient corresponding to the feature index, Es represents the basic sample size, and λ represents the adjustment factor. Using each entity as a node, retrieve each entity type to construct a medical knowledge graph containing target disease, target symptom, target drug, and research type; obtain the parameter points corresponding to any entity based on the medical knowledge graph, standardize the values corresponding to the parameter points into relative position indicators, draw parameter change curves and overlay and display dynamic standard intervals; when at least two parameter points are detected to exceed the dynamic standard interval, generate an early warning signal and inject it into the medical knowledge graph as a dynamic attribute. Obtain the weights that map the lesion areas to the reported elements; Obtain the threshold values that indicate a mapping relationship between the internal structure of the research equipment and the report elements.
Citation Information
Patent Citations
Artificial intelligence automatic report evaluation method and system
CN119517274A
Medical image report generation method based on multi-modal large model preference alignment technology
CN120032790A