Rule + nlp-based unstructured information structuring method for tumor medical records
Patent Information
- Application Number
- CN202611341971.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies struggle to simultaneously achieve high accuracy, recall, and interpretability in tumor medical records. Pure rule-based methods offer high accuracy but low recall and are difficult to maintain, while pure deep learning methods have good generalization but rely on extensive annotation and have poor interpretability.
The system employs a collaborative approach combining rule-based and NLP channels. It extracts high-frequency clinical elements through rules and extracts long-tail expressions through NLP. Combined with a medical knowledge base and a pre-trained language model, it performs entity recognition and relation extraction, and then integrates disambiguation to map the results onto a unified tumor structured field.
It achieves improved accuracy and long-tail recall for high-frequency paradigms, enhanced consistency of results, and the results can be directly used for clinical research and follow-up management.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and medical information technology, specifically to a method for structuring unstructured information in tumor medical records based on a combination of rules and NLP, which is particularly suitable for the automatic extraction and standardization of entities, attributes and clinical relationships in tumor medical record texts. Background Technology
[0002] Oncology medical records, encompassing outpatient records, admission records, discharge summaries, pathology reports, imaging reports, and follow-up records, serve as fundamental data for real-world cancer research, efficacy evaluation, and survival analysis. However, due to their long-term storage as free text, key elements such as diagnosis, pathology, staging, treatment, and outcomes are difficult for machines to directly utilize. Existing pure rule-based methods offer high accuracy but low recall and are difficult to maintain; pure deep learning methods have good generalization but rely heavily on annotations and suffer from poor interpretability. Therefore, a structured method that balances accuracy, recall, and interpretability is needed. Summary of the Invention
[0003] To address the shortcomings of existing technologies, this invention provides a rule-based + NLP-based method for structuring unstructured information in tumor medical records. By employing a dual-channel approach—rule-based and NLP-based—it balances the accuracy of high-frequency paradigms with the recall of long-tail expressions, and maps the results to a unified tumor field system for output. To solve the aforementioned technical problems, this invention adopts the following technical solution: S1, acquire the original text of the tumor medical record and preprocess it to obtain candidate text fragments; S2, based on a pre-built rule base and medical knowledge base, extract rules from high-frequency clinical elements using regular expressions, dictionary matching, and pattern templates to obtain rule extraction results R; S3, based on a pre-trained language model, perform NLP extraction using named entity recognition, dependency parsing, and relation extraction to obtain NLP extraction results N; S4, align R and N according to entity type and attribute keys, and fuse and resolve conflicts to obtain a fusion result; S5, map the fusion result to a unified tumor structured field system and output it.
[0004] The beneficial effects of this invention are as follows: the rule channel provides interpretable hard constraints, the NLP channel improves long-tail recall, fusion disambiguation ensures consistency, negative / suspect identification and abbreviation standardization improve accuracy, and the unified field system enables the results to be directly used for clinical research and follow-up management. Attached Figure Description
[0005] Figure 1 This is a diagram illustrating the overall architecture of the rule-based NLP-based tumor medical record structured system of this invention. Figure 2 This is the overall flowchart of the method; Figure 3 Flowchart for medical record text preprocessing; Figure 4 A diagram illustrating the collaborative extraction structure between the rule-based channel and the NLP channel; Figure 5 This is a diagram illustrating the structured output field hierarchy.
[0006] In each of the accompanying drawings, the same or corresponding parts / steps are labeled with the same or corresponding reference numerals. Detailed Implementation
[0007] like Figure 1 As shown, the system of this invention includes: raw text input of tumor medical records, a preprocessing module, a rule + NLP dual-channel structured engine, a knowledge base (tumor terminology / rules), and a structured result verification and fusion module, ultimately outputting structured medical record data. The preprocessing module is responsible for cleaning, sentence segmentation, word segmentation, and standardization; the dual-channel engine performs rule extraction and NLP extraction in parallel; and the verification and fusion module completes conflict resolution and quality verification.
[0008] like Figure 2 As shown, the method of this invention sequentially executes five steps, S1 to S5: S1 Medical record text acquisition and preprocessing; S2 Rule-based structured extraction; S3 NLP-based structured extraction; S4 Dual-channel result fusion and conflict resolution; S5 Structured output and quality verification. S2 and S3 can logically be executed in parallel to improve processing efficiency. Figure 3 As shown, the preprocessing includes the following steps: original medical record text → format cleaning (denoising, removing redundant punctuation) → sentence segmentation → Chinese word segmentation → medical abbreviation standardization → negative / suspected identification, ultimately outputting candidate segments. Medical abbreviation standardization maps "LUAD" and "ADC" to standard terms such as "lung adenocarcinoma"; negative / suspected identification is used to identify negative or uncertain expressions such as "no metastasis" and "metastasis?", avoiding false sampling.
[0009] like Figure 4 As shown, candidate text fragments are fed into the rule engine and NLP engine, respectively. The rule engine, based on a rule base / medical knowledge base, extracts high-frequency paradigms through regular expressions, dictionaries, and pattern templates, outputting rule results R. The NLP engine, based on a pre-trained language model, performs generalized extraction through NER, dependency parsing, and relation extraction, outputting NLP results N. R and N are then fed into a fusion and disambiguation module, aligned by entity type and attribute key, and fused using a strategy of "rule priority, NLP supplementation, confidence weighting, and context disambiguation" to obtain structured fields.
[0010] Specifically, the score for fusion and conflict resolution is calculated as follows: for field f, the fusion value is the candidate value that maximizes the score, and the score is = w_R·conf_R + w_N·conf_N, where conf_R and conf_N are the confidence levels of the candidate value in the rule channel and the NLP channel, respectively, and w_R and w_N are preset weights (typically w_R>w_N, reflecting the priority of rules).
[0011] like Figure 5 As shown, the fusion results are mapped to a unified four-layer field system: the first layer is basic patient information (age, gender, medical record number); the second layer is diagnostic information (primary lesion, pathological type, TNM stage); the third layer is treatment information (surgery, chemotherapy, radiotherapy, targeted therapy, immunotherapy); and the fourth layer is follow-up and outcome information (recurrence, metastasis, survival status). After output, completeness and consistency checks are performed sequentially, with the rule result R as a hard constraint. Fields that fail the checks trigger manual review or model / rule iterative updates.
[0012] The above description is merely a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the accompanying drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for structuring unstructured information in tumor medical records based on rule-based NLP, characterized in that, Includes the following steps: S1: Obtain the original text of the tumor medical record and perform preprocessing to obtain candidate text fragments; S2, based on a pre-built rule base and medical knowledge base, extracts rules from high-frequency clinical elements through regular expressions, dictionary matching and pattern templates, and obtains the rule extraction result R; S3, based on a pre-trained language model, performs NLP extraction through named entity recognition, dependency parsing and relation extraction, and obtains the NLP extraction result N; S4: Align R and N according to entity type and attribute key, and merge and resolve conflicts to obtain the fusion result; S5 maps the fusion results to a unified tumor structured field system and outputs them.
2. The method according to claim 1, characterized in that, The preprocessing described in step S1 includes at least: format cleaning, sentence segmentation, Chinese word segmentation, medical abbreviation standardization, and identification of negative and suspected expressions; clinical elements that are confirmed as negative by negative or suspected identification do not participate in the structured output.
3. The method according to claim 1, characterized in that, The rule base mentioned in step S2 includes at least: regular expression rules, dictionary rules, and pattern template rules; the medical knowledge base includes at least the standard terminology and synonym mapping for tumor location, pathological type, TNM stage, surgical method, chemotherapy regimen, radiotherapy, targeted therapy, and immunotherapy.
4. The method according to claim 1, characterized in that, The fusion and conflict resolution described in step S4 adopts the strategy of "rule priority, NLP supplementation, confidence weighting, and context disambiguation": the same field is subject to the rule result R as a hard constraint; fields not covered by R are supplemented by NLP result N; when both R and N cover the field and their values conflict, disambiguation is performed by weighting by confidence and combining with context semantics.
5. The method according to claim 4, characterized in that, The confidence-weighted disambiguation satisfies the following: for field f, the fusion value is the candidate value that maximizes the score, and the score = w_R·conf_R + w_N·conf_N, where conf_R and conf_N are the confidence scores of the candidate value for the rule channel and the NLP channel, respectively, and w_R and w_N are preset weights.
6. The method according to claim 1, characterized in that, The unified field system described in step S5 includes at least four layers: patient basic information, diagnostic information, treatment information, and follow-up and outcome information; wherein the diagnostic information includes at least the primary lesion, pathological type, and TNM stage; the treatment information includes at least surgery, chemotherapy, radiotherapy, targeted therapy, and immunotherapy; and the follow-up and outcome information includes at least recurrence, metastasis, and survival status.
7. The method according to claim 1, characterized in that, Step S5 also includes performing integrity and consistency checks on the output results, and using the rule extraction result R as a hard constraint for the checks, triggering manual review or rule / NLP model iterative updates for fields that fail the checks.
8. A structured processing system for tumor medical records, characterized in that, include: The preprocessing module, rule extraction engine, NLP extraction engine, fusion and conflict resolution module, and structured output and verification module are each configured to collaboratively execute the steps of the method described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 7.
