Blood disease stem cell transplantation prognosis analysis method and system based on OCR and NLP technology
By combining OCR and NLP technologies, automated recognition and structured data extraction of medical reports have been achieved, solving the problems of module isolation and data flow breakpoints in existing technologies. This improves the adaptability to medical scenarios and the accuracy of prognostic analysis, and enables autonomous early warning and personalized treatment support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF HEMATOLOGY & BLOOD DISEASES HOSPITAL CHINESE ACADEMY OF MEDICAL SCI & PEKING UNION MEDICAL COLLEGE
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-26
Smart Images

Figure CN122290853A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent processing and analysis technology of medical data, and relates to a method and system for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies. Background Technology
[0002] Acute graft-versus-host disease (aGVHD) is the most serious complication in transplant patients. In recent years, the proportion of haploidentical transplants has been increasing annually, leading to a high incidence of aGVHD. aGVHD patients often experience long hospital stays, incurring significant hospital costs, and severe cases have a high mortality rate. Because there are no early warning biomarkers, general preventative measures offer no significant survival benefit and increase the risk of infection and relapse. In this context, precise prognostic analysis can identify high-risk patients in advance, providing a basis for personalized treatment and prevention strategies, thereby reducing the incidence and severity of aGVHD and improving patient prognosis.
[0003] The existing medical data OCR recognition module and stem cell transplantation AI prognosis prediction module are set up in isolation, lacking a unified data collaboration link. The OCR recognition results need to be manually entered into the prediction system, which not only increases operational redundancy but also easily introduces secondary data errors, making it unable to meet the technical requirements of efficient clinical diagnosis and treatment.
[0004] In addition, existing OCR models rely on general deep learning frameworks and are not customized and optimized for medical scenarios. They have insufficient accuracy in recognizing handwritten medical records, mixed Chinese and English medical terminology, and yellowed, folded, low-quality images, and cannot efficiently achieve batch recognition and format conversion of multi-page PDFs. At the same time, stem cell transplantation prognosis prediction models only focus on structured data and do not sufficiently integrate unstructured clinical text data extracted by OCR, resulting in weak model generalization ability, poor predictive reproducibility in independent patient cohorts, and a clinical translation gap.
[0005] Therefore, how to avoid functional module isolation and data flow interruptions, and improve adaptability to medical scenarios are technical problems that urgently need to be solved. Summary of the Invention
[0006] To address the technical problems existing in the prior art, this invention provides a method and system for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies.
[0007] According to a first aspect of the present invention, a method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies is provided.
[0008] Specifically, the method includes the following steps: S1. Receive and identify medical report documents uploaded by users; S2. Call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. S3. Process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognostic prediction model for further processing, and output the prediction results of the prognostic indicators. S4. Merge the outputs of multiple prognostic prediction models to generate a visualized prediction report.
[0009] Based on the above scheme, the steps in S2—calling the OCR service to recognize the medical report document to obtain the original text, then post-processing the original text to convert it into medical text, and calling the NLP service to extract structured patient feature data from the medical text—specifically include: S201. Text cleaning: By removing noisy characters, standardizing whitespace characters, standardizing symbols, and removing layout noise, the noisy original recognized text is transformed into clean and well-formatted text. S202, Text Correction: By correcting the similarity of characters and sounds, correcting medical terminology, and correcting the rationality of numerical values, the text cleaned in step S201 is semantically corrected to generate standardized text that conforms to medical standards. S203. Input standardized text: Receive standardized text after OCR and post-processing, and perform sentence segmentation and basic word segmentation on it; S204. Rule and dictionary extraction: Based on predefined regular expression templates and a high-precision medical entity Trie tree dictionary, extract entities and their attributes with fixed and clear formats from the text processed by the preprocessing layer. S205. Deep learning model extraction: The MedicalBERT sequence labeling model is fine-tuned to identify named entities in the text, and the MedicalBERT relation extraction model is used to understand and extract the semantic relationships between entities. S206. Medical knowledge graph fusion: By aligning and verifying the extracted candidate entities and relationships with the medical knowledge graph, the prior knowledge of the graph is used to correct erroneous entities, fill in missing associations, and remove contradictory information. S207. Post-processing and structured output: Logically verify the results after knowledge graph fusion and assemble all extracted information into a structured JSON format to provide standardized input for downstream prediction models.
[0010] Based on the above scheme, step S201, text cleaning, involves transforming the noisy original recognized text into clean, well-formatted text by removing noisy characters, standardizing whitespace, standardizing symbols, and removing layout noise. Specifically, this includes: 1) Remove noisy characters: Based on predefined regular expression patterns, match and remove all characters required in non-medical text. The retained character set includes Chinese and English letters, numbers, basic medical symbols, and common Chinese punctuation. 2) Standardized whitespace: Replace all consecutive whitespace characters in the text with a single standard space, and uniformly remove leading and trailing spaces from the text; 3) Symbol standardization: Establish a medical symbol mapping table to replace easily confused or erroneous symbol variants in OCR recognition with standard medical symbols; 4) Remove layout noise: Based on a predefined library of layout keywords that are not related to the specific report content, remove layout interference items that are not related to the medical text by keyword matching.
[0011] Based on the above scheme, step S202, text correction, involves semantic-level correction of the text cleaned in step S201 through character shape and phonetic similarity correction, medical terminology correction, and numerical rationality correction, to generate standardized text that conforms to medical standards. Specifically, this includes: 1) Character shape and pronunciation similarity error correction: Based on the easily confused medical character mapping table, the cleaned text is scanned and replaced character by character to correct OCR recognition errors caused by similar character shape or pronunciation; 2) Medical terminology correction: By loading a medical dictionary, the system uses approximate word segmentation and edit distance to calculate matching text words. For words with edit distance within a set threshold and similar length, the system dynamically replaces them with the most similar standardized terms in the dictionary, thus correcting medical terminology bias caused by OCR recognition. 3) Numerical Reasonableness Correction: By pre-setting reasonable reference ranges for medical test indicators, regular expressions are used to match patterns of numerical values and units. When the identified value exceeds the normal range, the abnormal value misidentified by OCR is corrected according to logical rules.
[0012] Based on the above scheme, S204, rule and dictionary extraction: based on a predefined regular expression template and a high-precision medical entity Trie tree dictionary, the step of extracting entities with fixed and clear formats and their attributes from the text processed by the preprocessing layer specifically includes: i. Pattern matching based on regular expressions: For fields with highly fixed formats, design precise regular expressions for capture; ii. Dictionary-based Trie tree fast matching: Construct key entity names into a Trie tree data structure; scan the text to achieve fast lookup and matching with O(n) time complexity; iii. Context-based parsing: For complex expressions, keyword matching and context window analysis are combined.
[0013] Based on the above scheme, step S204, rule and dictionary extraction: the step of extracting entities with fixed and clear formats and their attributes from the text processed by the preprocessing layer based on predefined regular expression templates and high-precision medical entity Trie tree dictionary, further includes: The optimization method to enhance extraction capabilities includes the following steps: i. Dynamic dictionary expansion: Establish a new medical term discovery mechanism. When the rules and the existing dictionary cannot match, record the unregistered words, add them to the dictionary after review by medical experts, so that the system can adapt to new medical terms. ii. Active Model Learning: For deep learning model extraction engines, an active learning strategy is adopted to select samples with low model prediction confidence, which are then labeled by experts and added to the training set to fine-tune the model, maximizing the model's performance on challenging cases with minimal labeling cost. iii. Context-aware error correction: performing error correction at both the character and semantic levels; iv. Multi-evidence fusion decision-making: For the same key information, multiple extraction channels are allowed to work simultaneously, and voting or confidence weighting mechanisms are designed to fuse the results and improve the robustness of the final output.
[0014] Based on the above scheme, the construction of the medical knowledge graph in S206 specifically includes the following steps: 1) Data collection and preprocessing: Collect unstructured or semi-structured text; 2) Schema definition: Define the core entity types and relation types; 3) Knowledge extraction: A hybrid approach of rule extraction and pre-trained model fine-tuning is adopted. First, explicit knowledge pairs are quickly extracted using dictionary-based and regular expression-based rules. Then, a BERT model fine-tuned on a medical corpus is used to extract deep semantic relationships. 4) Knowledge fusion and storage: The extracted entity-relation pairs are aligned and disambiguated, and finally stored in the graph database to form a triplet network of entity-relation-entity.
[0015] According to a second aspect of the present invention, a prognostic analysis system for hematological stem cell transplantation based on OCR and NLP technologies is provided, the system comprising: The report upload and recognition module is used to receive and recognize medical report documents uploaded by users; The information extraction and structuring module is used to call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. The intelligent prediction engine module is used to process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognosis prediction model for processing, and output the prediction results of prognosis indicators. The results generation and display module is used to fuse the outputs of multiple prognostic prediction models to generate a visualized prediction report.
[0016] According to a third aspect of the present invention, a computer-readable storage medium is provided.
[0017] In some embodiments, the computer-readable storage medium includes a computer program for storing a computer program that, when executed by a processor, implements the steps of the prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies.
[0018] According to a fourth aspect of the present invention, a computer device is provided.
[0019] In some embodiments, the computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies.
[0020] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: This invention proposes a prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies. By constructing a fully automated collaborative architecture encompassing medical data uploading, OCR recognition, structured data extraction, AI prognostic prediction, and result output, it achieves seamless data linkage and automated flow without human intervention between modules, eliminating data breakpoints and human errors. This solves the technical problems of isolated functional modules and data flow breakpoints in existing technologies. Simultaneously, it improves adaptability to medical scenarios. This invention, through a combination of a general OCR basic model, deep post-processing and semantic correction, and domain-specific NLP structuring techniques, effectively addresses various challenges in medical document recognition without directly employing medical-specific OCR models and specialized image preprocessing. This reduces reliance on specific dedicated models and enhances the system's flexibility and scalability. By focusing the processing of domain-specific knowledge at the backend semantic level, it achieves high-precision extraction and structuring of key information in medical scenarios, providing a reliable foundation for subsequent data analysis and applications. This invention establishes a multimodal artificial intelligence model that enables AI to autonomously collect clinical data, provide early warnings before the onset of severe aGVHD, and conduct clinical interventions for intermediate- and high-risk patients, thus promoting GVHD management from post-treatment to forward-looking prevention.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0023] Figure 1 This is a flowchart illustrating a prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies according to an exemplary embodiment; Figure 2 This is a flowchart illustrating the construction of a medical knowledge graph according to an exemplary embodiment; Figure 3 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation
[0024] The following description and accompanying drawings fully illustrate specific embodiments of this application to enable those skilled in the art to practice them. Some parts and features of some embodiments may be included in or replace parts and features of other embodiments.
[0025] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.
[0026] Figure 1This invention provides a method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies. Specifically, the method includes the following steps: S1. Receive and identify medical report documents uploaded by users; S2. Call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. Specifically, the step of post-processing the original text to convert it into medical text is a key bridge connecting general OCR recognition and professional medical NLP. Its goal is to transform noisy original recognized text into clean and standardized medical text. It employs a two-stage pipeline design of cleaning followed by error correction, specifically including: S201. Text cleaning: By removing noisy characters, standardizing whitespace characters, standardizing symbols, and removing layout noise, the noisy original recognized text is transformed into clean and well-formatted text. Specifically, this includes: 1) Removing noisy characters: Based on predefined regular expression patterns, matching and removing all characters required for non-medical text. The retained character set includes Chinese and English letters, numbers, basic medical symbols (such as ±%℃ / ×+-.,()【】:;≤≥<>) and common Chinese punctuation marks; The purpose of the above steps is to filter out irrelevant characters such as scanning artifacts and stamp marks; 2) Standardized whitespace: Replace all consecutive whitespace characters (including spaces, tabs, newlines, etc.) in the text with a single standard space, and uniformly remove leading and trailing spaces from the text; 3) Symbol standardization: Establish a medical symbol mapping table to replace easily confused or erroneous symbol variants in OCR recognition with standard medical symbols; For example, the letters “C”, “c”, or “°C” are uniformly corrected to the temperature unit “℃”; the letters “x” or “X” are corrected to the multiplication sign “×”; and the long dash “—” is corrected to the short hyphen “-”. 4) Remove layout noise: Based on a predefined library of layout keywords that are irrelevant to the specific report content, remove layout interference items that are irrelevant to the medical text through keyword matching; The layout keyword library includes Page 1, XX Hospital, and Test Report, while the layout interference items include fixed headers, footers, and separators.
[0027] S202, Text Correction: By correcting the similarity of characters and sounds, correcting medical terminology, and correcting the rationality of numerical values, the text cleaned in step S201 is semantically corrected to generate standardized text that conforms to medical standards. Specifically, it includes: 1) Glyph and phonetic similarity error correction: Based on the confusion-prone medical character mapping table, the cleaned text is scanned and replaced character by character to correct OCR recognition errors caused by similar glyphs or pronunciations; If misrecognized characters in the mapping table are found (e.g., "唐" → "糖"), they are directly replaced with the correct characters; among them, the confusion-prone medical character mapping table includes {"糖": "唐", "细胞": "系包", "血红蛋白": "血红蛋包"}; 2) Medical term error correction: By loading a medical dictionary, approximate word segmentation and edit distance calculation are used to match text vocabulary, and words with an edit distance within the set threshold and similar lengths are dynamically replaced with the most similar standard terms in the dictionary to correct medical term deviations caused by OCR recognition, including the following steps; ⅰ. Load the medical dictionary: Load a medical professional term dictionary covering entities such as diseases, test indicators, drugs, and surgical names; ⅱ. Approximate word segmentation and matching: Adopt a word segmentation strategy similar to the maximum forward matching, and segment the text in combination with the medical professional term dictionary; for words that cannot be directly matched with the dictionary, calculate their edit distances with all candidate words in the dictionary; ⅲ. Dynamic replacement: If the edit distance of a word ≤ 2 and the lengths are similar (e.g., the edit distance between "血红蛋包" and "血红蛋白" is 1, and the lengths are both 4), it is replaced with the most similar standard term in the medical professional term dictionary; 3) Numerical rationality error correction: By presetting the reasonable reference value range of medical test indicators, using regular expressions to match the patterns of numerical values and units, when the recognized numerical value exceeds the normal range, the abnormal numerical value misrecognized by OCR is corrected according to logical rules; For example, if the blood glucose value is recognized as "16.1mmol / L" (far exceeding the normal high value), and the numerical value starts with "1", the rule may be applied to determine the first digit "1" as the noise misrecognized by OCR, and thus corrected to "6.1mmol / L".
[0028] Specifically, the steps of calling the NLP service to extract structured patient feature data from the text specifically include: S203. Input the normalized text: Receive the normalized text after OCR and post-processing, and perform sentence segmentation and basic word segmentation on it; Among them, sentence segmentation: Perform sentence-level segmentation according to the logical segmentation of medical texts (such as "Chief complaint:", "History of present illness:", "Test results:"), ensuring correct context association during subsequent extraction; Basic word segmentation: Use a word segmentation tool optimized for the medical field (such as the Chinese medical word segmentation model based on BERT) to perform preliminary word segmentation on the text, retaining the integrity of medical terms (e.g., "glycated hemoglobin" is not wrongly segmented into "glycation / hemoglobin").
[0029] S204. Rule and dictionary extraction: Based on predefined regular expression templates and a high-precision medical entity Trie tree dictionary, extract entities and their attributes with fixed and clear formats from the text processed by the preprocessing layer. During processing, based on predefined medical entity regular expression templates (such as age (\d+) years, test indicators (mmol / L|g / L)), entities in the text that conform to a fixed format are directly matched (such as "blood glucose: 6.1mmol / L" → extract "blood glucose" and "6.1mmol / L"). Using a high-precision medical entity Trie tree dictionary (containing a list of entities such as diseases, genes, and drugs, such as "ELN gene", "CSF3R mutation", and "amoxicillin"), standard terms in the text can be quickly located (e.g., when "Down syndrome" appears in the text, the dictionary match is corrected to "diabetes"). For the matched entities, extract their associated values (e.g., "Age: 25 years old" → entity "Age", value "25"; "Hemoglobin: 130g / L" → entity "Hemoglobin", value "130g / L"). The initial extracted entity-value pairs (e.g., "Age: 25 years old", "ELN gene: NPM1") cover well-formatted fields.
[0030] The specific algorithms and enhancement methods for key field extraction in the above scheme include: Firstly, the key field extraction algorithms include: i. Pattern matching based on regular expressions: For fields with highly fixed formats (such as "ELN prognostic genes: FLT3-ITD"), design precise regular expressions (ELN risk genes|ELN prognostic genes) to capture them.
[0031] ii. Dictionary-based Trie tree fast matching: Construct a Trie tree data structure from key entity names (such as all gene names and drug names); scan the text to achieve fast lookup and matching with O(n) time complexity.
[0032] iii. Context-based analysis: For more complex expressions, keyword matching and context window analysis are combined. For example, the word "mutation" is identified, and it is checked whether "CSF3R" is in the preceding window and whether "positive", "negative" or "T618I" is in the subsequent window, so as to comprehensively determine the "CSF3R mutation status".
[0033] Secondly, optimization methods to enhance extraction capabilities include: i. Dynamic dictionary expansion: Establish a new medical term discovery mechanism. When the rules and the existing dictionary cannot match, record the unregistered words, and add them to the dictionary after review by medical experts, so that the system can adapt to new medical terms.
[0034] ii. Active Model Learning: For deep learning model extraction engines, an active learning strategy is adopted to select samples with low model prediction confidence, which are then labeled by experts and added to the training set to fine-tune the model, maximizing the model's performance on challenging cases with minimal labeling cost.
[0035] iii. Context-aware error correction: This not only corrects errors at the character level but also at the semantic level. For example, when extracting "blood glucose 16.1 mmol / L" and the diagnosis "diabetes," the system will combine a knowledge graph to confirm the correlation between the value and the disease, enhancing the credibility of the results.
[0036] iv. Multi-evidence fusion decision-making: For the same key information, multiple extraction channels (rule A, rule B, model) are allowed to work simultaneously, and voting or confidence weighting mechanisms are designed to fuse the results, improving the robustness of the final output. For example, if two rules and one model all support "CSF3R mutation positive", then this result is ultimately adopted.
[0037] S205. Deep learning model extraction: The MedicalBERT sequence labeling model is fine-tuned to identify named entities (such as diseases, drugs, and surgeries) in the text, and the MedicalBERT relation extraction model is used to understand and extract the semantic relationships between entities (such as "diabetes causes high blood sugar") to supplement the coverage blind spots of the rule engine. During processing, a fine-tuned MedicalBERT sequence labeling model (a BERT variant trained on Chinese medical corpus) is used to label the text word by word (e.g., B-disease, I-disease, B-drug, O, etc.) to identify entities such as diseases (e.g., "acute myeloid leukemia"), drugs (e.g., "cytarabine"), and surgeries (e.g., "hematopoietic stem cell transplantation") in the text. The MedicalBERT relation extraction model is then used to analyze the semantic relationships between entities (e.g., the causal relationship between "diabetes" and "elevated blood sugar"), outputting structured relation triples (e.g., <diabetes, leading to elevated blood sugar>); and supplementing the extracted complex entities and relations (e.g., {"disease": ["acute myeloid leukemia"], "relationship": [<diabetes, leading to elevated blood sugar>]}), covering non-fixed format information.
[0038] S206. Medical Knowledge Graph Fusion: By aligning and verifying the extracted candidate entities and relationships with the medical knowledge graph, the prior knowledge of the graph is used to correct erroneous entities, fill in missing relationships, and eliminate contradictory information, ensuring the medical logic accuracy of the extracted results.
[0039] During processing, extracted candidate entities (e.g., "Down syndrome") are matched with standard entities (e.g., "diabetes") in the medical knowledge graph (based on name similarity and thesaurus), correcting entities misidentified by OCR or the model (e.g., mapping "Down syndrome" to "diabetes"); checking whether the relationships between entities conform to medical logic (e.g., in the knowledge graph, "abnormal blood sugar" is associated with "diabetes," and if the model extracts "abnormal blood sugar is associated with hypertension," it is corrected to "abnormal blood sugar is associated with diabetes" according to the graph); if there are entities not explicitly mentioned in the text but associated in the knowledge graph (e.g., a patient diagnosed with "acute myeloid leukemia," the knowledge graph suggests paying attention to "ELN gene status"), then relevant entity extraction tasks are proactively added. High-quality entities and relationships validated by the knowledge graph are output (e.g., {"Disease": ["Acute myeloid leukemia," "diabetes"], "Relationship": [<diabetes, leading to, elevated blood sugar>]}), ensuring the correctness of medical logic.
[0040] Furthermore, such as Figure 2 As shown, the construction, training, and validation of a medical knowledge graph is a systematic project, the specific details of which are as follows: Sources: The definitions of entities and relationships are primarily based on multi-source authoritative knowledge, with a core focus on medical guidelines and clinical consensus (such as NCCN guidelines and Chinese Medical Association treatment guidelines) to ensure the accuracy and authority of the knowledge. Simultaneously, standard medical terminology systems (such as UMLS, SNOMED CT, and ICD-10) are integrated to achieve terminology standardization. Furthermore, frequently occurring entity-relationship pairs are mined from high-quality medical literature and anonymized real medical record data to supplement the latest knowledge or clinical practice models not covered by guidelines.
[0041] Includes the following steps: 1) Data collection and preprocessing: Collect unstructured or semi-structured text from the above sources; 2) Pattern definition: Define the core entity types (such as disease, symptoms, test indicators, drugs, genes, surgery) and relationship types (such as cause, examination, treatment, association, and risk factor); 3) Knowledge extraction: A hybrid approach of rule extraction and pre-trained model fine-tuning is adopted. First, explicit knowledge pairs are quickly extracted using dictionary-based and regular expression-based rules. Then, a BERT model fine-tuned on a medical corpus is used to extract deep semantic relationships. 4) Knowledge fusion and storage: The extracted entity-relation pairs are aligned and disambiguated, and finally stored in a graph database (such as Neo4j) to form a triple network of entity-relation-entity.
[0042] Model training and tuning specifically include: First, training data: use manually annotated medical text relationship extraction datasets, or use remote supervision methods to automatically generate training data by aligning the knowledge graph with large-scale medical literature.
[0043] Secondly, model selection and training: We selected language models such as MedicalBERT or BioBERT, which have been pre-trained on massive amounts of biomedical text, as the foundation. We added a relation classification layer on top of them and used labeled data for supervised fine-tuning. The training goal is to enable the model to learn to determine whether a predefined relationship exists between two entities based on the text context.
[0044] Furthermore, the optimization focuses on the characteristics of nested entities and complex relationships in medical texts, employing strategies such as adversarial training and gradient accumulation to enhance the model's robustness; by adjusting the learning rate, batch size, and incorporating external dictionary features as model input, the extraction performance on small samples or complex sentence structures is improved.
[0045] Finally, the effectiveness was verified: the training set, validation set, and test set were divided, and the precision, recall, and F1 score of relation extraction were calculated on the test set as the core evaluation indicators; a portion of the newly constructed knowledge triples were randomly sampled and manually reviewed by medical experts to evaluate their correctness, relevance, and clinical applicability; the constructed medical knowledge graph was applied to real-world scenarios, and the effectiveness of the knowledge graph was indirectly verified by improving the performance of downstream tasks.
[0046] Taking the standard value of glycated hemoglobin as an example: 1. Dictionary matching: Export a "dictionary of test indicators" from the knowledge graph and match core indicators such as "blood glucose, hemoglobin, and white blood cell count" in the text; 2. Model Recognition: Use MedicalBERT to identify the abbreviation / variation of "glycated hemoglobin (HbA1c)" in the text, as well as the index result (such as "16.1 mmol / L"). 3. Knowledge graph correction: The model mistakenly associated "16.1 mmol / L (blood glucose)" with "hypertension". The knowledge graph query found "abnormal blood glucose associated with diabetes", automatically corrected the relationship, and prompted "blood glucose value exceeds the normal range (3.9-6.1 mmol / L)".
[0047] S207. Post-processing and structured output: Logical verification (such as numerical rationality check) is performed on the results after knowledge graph fusion, and all extracted information is assembled into a structured JSON format according to a predefined schema to provide standardized input for downstream prediction models.
[0048] The above solution allows for rule-based checks after the OCR module outputs the raw text. If the recognized text has an abnormal length or contains a large amount of garbled characters, it automatically triggers re-recognition or marks it as requiring manual review, preventing errors from spreading throughout the process. Similarly, after the NLP module outputs structured data, logical validation based on medical knowledge (such as the rationality of age range, gender, and specific diagnoses) can be performed to improve the quality of the data input to the prediction model.
[0049] S3. Process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognostic prediction model for further processing, and output the prediction results of the prognostic indicators. Specifically, pre-trained prognostic prediction models such as OS model, EFS model, and CIR model are used to perform parallel calculations and analyses on patient characteristic data to obtain prognostic prediction results regarding survival rate, recurrence risk, and other aspects.
[0050] S4. Merge the outputs of multiple prognostic prediction models to generate a visualized prediction report; Specifically, the prediction results from different models are integrated, analyzed, and visualized to generate a prediction report that includes charts and explanations of key indicators.
[0051] The prognostic prediction model is built upon algorithms such as machine learning and deep learning. Machine learning algorithms include logistic regression, decision trees, and random forests, while deep learning algorithms include artificial neural networks (ANN), convolutional neural networks (CNN), recurrent neural networks (RNN), and their variants (such as LSTM and GRU). These algorithms can learn and analyze the input structured data, uncovering potential patterns and regularities. The prognostic prediction model is a model already in the prior art and is not an innovation of this invention; therefore, it will not be elaborated upon further. This model originates from: 1) Outcomes of acute myeloid leukemia patients undergoing allogeneichematopoietic stem cell transplantation: validation, comparison and improvement of 2022 ELN genetic risk system (Exp Hematol Oncol. 2024;13(1):16) 2) Cao J, Zheng Y, Li R, et al. CSF3R Mutations in Hematological Disorders Undergoing Allogeneic Hematopoietic Stem Cell Transplantation. Am JHematol. 2025;100(5):925-927. The above scheme, with its four-stage data flow (OCR text recognition - text post-processing - NLP structured extraction - prediction model input) in system architecture and modular design, embodies a clear modular approach. This highly cohesive and loosely coupled design offers significant advantages in practice. For example, the OCR module can focus on addressing image quality challenges, while the NLP module can independently iterate its medical entity extraction algorithm. This decoupling greatly reduces system complexity and maintenance costs.
[0052] In practical deployments, to ensure process accuracy, data verification points are typically established between modules. For example, after the OCR module outputs raw text, rule checks can be added. If the recognized text has an abnormal length or contains a large amount of garbled characters, it will automatically trigger re-recognition or be marked as requiring manual review, preventing errors from spreading throughout the process. Similarly, after the NLP module outputs structured data, logical verification based on medical knowledge (such as the reasonableness of age range, gender, and specific diagnoses) can be performed to improve the quality of data input to the prediction model.
[0053] Using a combination of Alibaba's third-party OCR service and a self-developed NLP module is a common strategy that balances efficiency and customization.
[0054] Limitations of General-Purpose OCR and Post-Processing Requirements: General-purpose OCR services perform well in recognizing printed text, but their accuracy may drop when faced with technical terminology, special symbols, layout differences, and common image quality issues in medical documents. Therefore, a well-designed post-processing module (text cleaning and text correction) is crucial, as it needs to shoulder the responsibility of standardizing medical texts.
[0055] The core advantage of our self-developed NLP module lies in its ability to deeply adapt to medical scenarios. It can use the constructed medical knowledge graph to accurately extract entities such as names, ages, diagnoses, and indicator results, providing richer features for subsequent models.
[0056] This invention provides a specific implementation scheme for a prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies, the method comprising: 1. Doctors upload patient medical records to identify basic patient information; 2. First, extract the word CSF3R. If the word CSF3R is present, extract CSF3R positive, CEBPαbZIP positive, RUNX1 positive or negative. When the keyword is identified, a pop-up window will ask the doctor to confirm. The identified keyword or the option to select whether it is negative will be used to obtain the prediction result. 3. If CSF3R is negative or there is no mention of CSF3R, proceed to the ELN stratification group; 4. The algorithm identifies keywords in the stratification algorithm to classify patients into good, moderate, and poor prognosis stratification. If a keyword is identified, a pop-up window will ask the physician to confirm or select whether the patient is classified into good, moderate, or poor prognosis stratification. 5. Identify the last MRD positive or negative result. If the keyword is identified, a pop-up window will ask the physician to confirm. If no MRD result is identified, the predicted prognosis will be good, moderate, or poor. If an MRD result is identified, the case will be re-uploaded or the predicted result will be displayed by selecting whether the MRD is negative.
[0057] This invention provides a prognostic analysis system for hematological stem cell transplantation based on OCR and NLP technologies.
[0058] The system includes: The report upload and recognition module is used to receive and recognize medical report documents uploaded by users; The information extraction and structuring module is used to call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. The intelligent prediction engine module is used to process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognosis prediction model for processing, and output the prediction results of prognosis indicators. The results generation and display module is used to fuse the outputs of multiple prognostic prediction models to generate a visualized prediction report.
[0059] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores static and dynamic information data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0060] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0061] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0062] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0063] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0064] This invention is not limited to the structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this invention is limited only by the appended claims.
[0065] Finally, it should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0066] The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them; although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications can still be made to the specific implementation of the present invention or equivalent substitutions can be made to some technical features without departing from the spirit of the technical solutions of the present invention, and all such modifications and substitutions should be covered within the scope of the technical solutions claimed in the present invention.
Claims
1. A method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies, characterized in that, Includes the following steps: S1. Receive and identify medical report documents uploaded by users; S2. Call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. S3. Process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognostic prediction model for further processing, and output the prediction results of the prognostic indicators. S4. Merge the outputs of multiple prognostic prediction models to generate a visualized prediction report.
2. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies according to claim 1, characterized in that, In step S2, the OCR service is invoked to recognize the medical report document to obtain the original text. Then, the original text is post-processed to convert it into medical text. Finally, the NLP service is invoked to extract structured patient feature data from the medical text. Specifically, this includes the following steps: S201. Text cleaning: By removing noisy characters, standardizing whitespace characters, standardizing symbols, and removing layout noise, the noisy original recognized text is transformed into clean and well-formatted text. S202, Text Correction: By correcting the similarity of characters and sounds, correcting medical terminology, and correcting the rationality of numerical values, the text cleaned in step S201 is semantically corrected to generate standardized text that conforms to medical standards. S203. Input standardized text: Receive standardized text after OCR and post-processing, and perform sentence segmentation and basic word segmentation on it; S204. Rule and dictionary extraction: Based on predefined regular expression templates and a high-precision medical entity Trie tree dictionary, extract entities and their attributes with fixed and clear formats from the text processed by the preprocessing layer. S205. Deep learning model extraction: The MedicalBERT sequence labeling model is fine-tuned to identify named entities in the text, and the MedicalBERT relation extraction model is used to understand and extract the semantic relationships between entities. S206. Medical knowledge graph fusion: By aligning and verifying the extracted candidate entities and relationships with the medical knowledge graph, the prior knowledge of the graph is used to correct erroneous entities, fill in missing associations, and remove contradictory information. S207. Post-processing and structured output: Logically verify the results after knowledge graph fusion and assemble all extracted information into a structured JSON format to provide standardized input for downstream prediction models.
3. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies according to claim 2, characterized in that, S201, text cleaning: This step involves transforming the noisy original recognized text into clean, well-formatted text by removing noisy characters, standardizing whitespace, standardizing symbols, and removing layout noise. Specifically, it includes: 1) Remove noisy characters: Based on predefined regular expression patterns, match and remove all characters required in non-medical text. The retained character set includes Chinese and English letters, numbers, basic medical symbols, and common Chinese punctuation. 2) Standardized whitespace: Replace all consecutive whitespace characters in the text with a single standard space, and uniformly remove leading and trailing spaces from the text; 3) Symbol standardization: Establish a medical symbol mapping table to replace easily confused or erroneous symbol variants in OCR recognition with standard medical symbols; 4) Remove layout noise: Based on a predefined library of layout keywords that are not related to the specific report content, remove layout interference items that are not related to the medical text by keyword matching.
4. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies according to claim 2, characterized in that, S202, text correction: This step involves semantically correcting the text cleaned in step S201 through character shape and pronunciation correction, medical terminology correction, and numerical rationality correction to generate standardized text that conforms to medical standards. Specifically, it includes: 1) Character shape and pronunciation similarity error correction: Based on the easily confused medical character mapping table, the cleaned text is scanned and replaced character by character to correct OCR recognition errors caused by similar character shape or pronunciation; 2) Medical terminology correction: By loading a medical dictionary, the system uses approximate word segmentation and edit distance to calculate matching text words. For words with edit distance within a set threshold and similar length, the system dynamically replaces them with the most similar standardized terms in the dictionary, thus correcting medical terminology bias caused by OCR recognition. 3) Numerical Reasonableness Correction: By pre-setting reasonable reference ranges for medical test indicators, regular expressions are used to match patterns of numerical values and units. When the identified value exceeds the normal range, the abnormal value misidentified by OCR is corrected according to logical rules.
5. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies according to claim 2, characterized in that, S204, rule and dictionary extraction: Based on a predefined regular expression template and a high-precision medical entity Trie tree dictionary, the step of extracting entities with fixed and clear formats and their attributes from the text processed by the preprocessing layer specifically includes: i. Pattern matching based on regular expressions: For fields with highly fixed formats, design precise regular expressions for capture; ii. Dictionary-based Trie tree fast matching: Construct key entity names into a Trie tree data structure; scan the text to achieve fast lookup and matching with O(n) time complexity; iii. Context-based parsing: For complex expressions, keyword matching and context window analysis are combined.
6. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technology according to claim 5, characterized in that, S204, rule and dictionary extraction: Based on a predefined regular expression template and a high-precision medical entity Trie tree dictionary, the step of extracting entities with fixed and clear formats and their attributes from the text processed by the preprocessing layer also includes: The optimization method to enhance extraction capabilities includes the following steps: i. Dynamic dictionary expansion: Establish a new medical term discovery mechanism. When the rules and the existing dictionary cannot match, record the unregistered words, add them to the dictionary after review by medical experts, so that the system can adapt to new medical terms. ii. Active Model Learning: For deep learning model extraction engines, an active learning strategy is adopted to select samples with low model prediction confidence, which are then labeled by experts and added to the training set to fine-tune the model, maximizing the model's performance on challenging cases with minimal labeling cost. iii. Context-aware error correction: performing error correction at both the character and semantic levels; iv. Multi-evidence fusion decision-making: For the same key information, multiple extraction channels are allowed to work simultaneously, and voting or confidence weighting mechanisms are designed to fuse the results and improve the robustness of the final output.
7. The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technologies according to claim 2, characterized in that, The construction of the medical knowledge graph in S206 specifically includes the following steps: 1) Data collection and preprocessing: Collect unstructured or semi-structured text; 2) Schema definition: Define the core entity types and relation types; 3) Knowledge extraction: A hybrid approach of rule extraction and pre-trained model fine-tuning is adopted. First, explicit knowledge pairs are quickly extracted using dictionary-based and regular expression-based rules. Then, a BERT model fine-tuned on a medical corpus is used to extract deep semantic relationships. 4) Knowledge fusion and storage: The extracted entity relationship pairs are aligned and disambiguated, and finally stored in the graph database to form a triplet network.
8. A prognostic analysis system for hematological stem cell transplantation based on OCR and NLP technologies, characterized in that, The method for prognostic analysis of hematological stem cell transplantation based on OCR and NLP technology according to any one of claims 1-7, the system comprising: The report upload and recognition module is used to receive and recognize medical report documents uploaded by users; The information extraction and structuring module is used to call the OCR service to recognize the medical report document to obtain the original text, then post-process the original text to convert it into medical text, and call the NLP service to extract structured patient feature data from the medical text. The intelligent prediction engine module is used to process and optimize the extracted structured patient feature data, input the processed patient feature data into the prognosis prediction model for processing, and output the prediction results of prognosis indicators. The results generation and display module is used to fuse the outputs of multiple prognostic prediction models to generate a visualized prediction report.
9. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the steps of the prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies as described in any one of claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the prognostic analysis method for hematological stem cell transplantation based on OCR and NLP technologies as described in any one of claims 1-7.