LLM adaptive staging system based on dynamic staging module
Patent Information
- Application Number
- CN202510829985.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-07-22
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN120356601A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of tumor staging systems. More specifically, it relates to an LLM adaptive staging system based on a dynamic staging module. Background Art
[0002] Currently, in the development of tumor staging systems, the mainstream approach uses an end-to-end deep learning model to directly predict the TNM staging results. For example, in known technologies, pre-trained language models such as BERT, BioBERT, and ClinicalBERT are used to encode pathological report texts, and the T / N / M stages (such as: T1, N0, M0) are output through a classification layer.
[0003] However, the above technical solutions have serious coupling problems. That is, most systems use an end-to-end training method, integrating feature extraction information understanding and staging judgment in one model. When the AJCC staging standard is updated, it is necessary to re-collect annotated data and re-train the entire model; since the new staging annotation may involve new subtypes or conditional changes, the original model cannot adapt and must be trained from scratch; resulting in high costs and long update cycles, unable to quickly respond to changes in clinical guidelines and affecting the actual deployment efficiency. Summary of the Invention
[0004] The present invention provides an LLM adaptive staging system based on a dynamic staging module, aiming to solve the technical problems of high costs and long update cycles caused by having to train the model from scratch after the change of the current staging standard document, and being unable to quickly respond to changes in clinical guidelines.
[0005] An LLM (Large Language Model) adaptive staging system based on a dynamic staging module includes a model extraction module, a dynamic staging module, and a TNM standard management module; The model extraction module is used to receive the original pathological report text and extract pathological features from the original pathological report text; The dynamic staging module makes logical judgments based on the extracted pathological features and the effective staging standard document managed by the TNM standard management module, and outputs the final TNM staging result; The TNM standard management module is used to manage multiple versions of staging standard documents and provide a RESTful API interface for loading, unloading, and querying the versions of staging standard documents; Among them, the model extraction module, the dynamic staging module, and the TNM standard management module are independently configured.
[0006] In the present invention, the model extraction module and the dynamic staging module are configured modularly and independently, which solves the technical problem of high coupling degree in the prior art. Through the modular and independent configuration, after the staging standard file is changed, it is possible to quickly respond to the change of clinical guidelines by updating the staging standard file, without long-term model training and with low maintenance cost.
[0007] Preferably, the model extraction module encodes the input original pathological report text based on the trained language model and outputs a structured JSON object related to pathology.
[0008] Preferably, in the dynamic staging module, a declarative language is used to model and configure the TNM staging standard to obtain a dynamic staging unit; The extracted pathological features are used as the initial input data of the dynamic staging unit. The dynamic staging unit, based on the configured staging logic and combined with the pathological feature information, gradually analyzes and calculates the final TNM staging result according to the established code logic.
[0009] Preferably, the TNM standard management module is used to perform version control on the staging standard file and support rollback to historical versions.
[0010] The beneficial effects of the present invention include: in the present invention, the model extraction module and the dynamic staging module are configured modularly and independently, which solves the technical problem of high coupling degree in the prior art. Through the modular and independent configuration, after the staging standard file is changed, it is possible to quickly respond to the change of clinical guidelines by updating the staging standard file, without long-term model training and with low maintenance cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0012] Figure 1 It is a schematic block diagram of the system provided for the embodiment of the present invention.
[0013] Figure 2 It is a schematic diagram of the specific staging process provided for the embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0014] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer and more understandable, the following further details this application in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0015] First, the meaning of TNM staging is explained as follows: T (Tumor): The size and extent of the tumor, describing the location of the primary tumor and whether it has invaded adjacent tissues.
[0016] T0: No primary tumor.
[0017] T1, T2, T3, T4: Are divided into different stages according to the size and extent of the tumor. The larger the number, the larger the tumor or the more extensive the spread.
[0018] N (Node): The situation of lymph node metastasis, describing whether the tumor has spread to nearby lymph nodes.
[0019] N0: No lymph node metastasis.
[0020] N1, N2, N3: Are divided into different stages according to the number and degree of lymph node metastasis. The larger the number, the more extensive or severe the metastasis.
[0021] M (Metastasis): The situation of distant metastasis, describing whether the cancer has spread to other parts of the body (distant organs).
[0022] M0: No distant metastasis.
[0023] M1: Indicates that distant metastasis of the cancer has occurred, usually pointing to other organs such as the liver, lungs, and bones.
[0024] See Figure 1 and Figure 2 As shown, the LLM (Large Language Model) adaptive staging system based on the dynamic staging module includes a model extraction module, a dynamic staging module, and a TNM standard management module; The model extraction module is used to receive the original pathological report text and extract the pathological features in the original pathological report text; The dynamic staging module makes logical judgments based on the extracted pathological features and the effective staging standard file managed by the TNM standard management module, and outputs the final TNM staging result; The TNM standard management module is used to manage multiple versions of the staging standard file and provide a RESTful API interface for loading, unloading, and querying the version of the staging standard file; The model extraction module, the dynamic staging module, and the TNM standard management module are independently configured.
[0025] In the present invention, the model extraction module and the dynamic staging module are modularly and independently configured, solving the technical problem of high coupling degree in the prior art. Through the modular independent configuration, after the staging standard file changes, it is possible to quickly respond to the changes in clinical guidelines by updating the staging standard file, without long-cycle model training and with low maintenance costs.
[0026] As a possible implementation manner of this embodiment, the model extraction module encodes the input original pathological report text based on the trained language model and outputs a structured JSON object related to pathology; the model extraction module uses a language model that supports long sequence modeling, such as Longformer or DeBERTa-v3-Large; And optionally, medical pre-trained models such as BioBERT and ClinicalBERT can be configured to improve the ability to understand medical terms; The specific steps are as follows: The user uploads the pathological report text to the system; The system calls the pre-trained language model (such as Longformer or DeBERTa-v3-Large) to encode the input text; or fine-tunes the large language model and the model context module (MCP) to extract TNM description information from the input data; The model outputs a JSON object containing key features such as tumor size, lymph node status, and distant metastasis; The structured features are passed to the dynamic staging module.
[0027] As a possible implementation manner of this embodiment, the dynamic staging module loads the currently effective staging standard file, and based on the extracted pathological features, matches the features item by item according to the conditional expressions in the dynamic staging module, and selects the most suitable features in the order of priority to generate the final TNM staging result.
[0028] The specific steps are as follows: The dynamic staging module uses a declarative language (such as YAML) to model and configure the TNM staging standard, clearly expressing complex staging logic and facilitating maintenance and update; The TNM staging-related information extracted and structured by the large language model (LLM) is represented in JSON format as pathological features. The dynamic staging module gradually parses and calculates the final TNM staging result based on the YAML file and the JSON-format input according to the established code logic in the YAML file.
[0029] It should be noted that the code logic in the YAML file can be a similarity matching logic, which performs similarity matching based on the obtained pathological features in JSON format and the corresponding feature items in the staging standard file, and outputs the corresponding staging results based on the similarity matching results.
[0030] Specifically, the staging standard file is constructed as a mapping file, which contains the mapping relationships between various pathological features and TNM staging. The final TNM staging is determined by calculating the similarity between the input JSON format data and the feature items in the mapping file. Cosine similarity, Euclidean distance or other similarity measurement methods can be used; the similarity matching methods include two categories: Text-based similarity: If the pathological features in the JSON file are text descriptions, then text-based similarity can be used for matching. Numeric-based similarity: If the pathological features are numeric (such as tumor size, number of lymph nodes, etc.), then numeric distance metrics (such as Euclidean distance, Manhattan distance, etc.) can be used for matching.
[0031] And it can also be based on weighted summation to obtain the final staging result, as follows: Feature extraction: Extract various relevant features (such as tumor size, lymph node metastasis status, etc.) according to the input pathological features in JSON format.
[0032] Calculate similarity: For each feature, calculate its similarity with the corresponding feature item in the standard staging data; use appropriate similarity calculation methods (such as cosine similarity, Euclidean distance, etc.).
[0033] Weighted summation: The similarity of each feature can have different weights, and the weight represents the importance of the feature in staging. Multiply the similarity of each feature by its weight, then sum to get the summation result, and map the result of the weighted summation to the specific TNM staging (for example, T1, T2, T3, N0, N1, N2, etc.) through a certain threshold or interval.
[0034] The implementation methods of similarity matching and weighted summation are just one of the implementation methods of the present invention. Based on the specific implementation logic of the present invention, adjusting the specific logic code to achieve the purpose of staging belongs to the protection scope of the present invention.
[0035] Based on the above, the present invention has strong flexibility and can adjust the staging standard (through the YAML file) to apply to dynamic and complex staging calculation scenarios without changing the core code logic. That is to say, after each change of the staging standard file, we only need to construct the staging standard file as a mapping file.
[0036] As a possible implementation of this embodiment, the TNM standard management module is used to perform version control on the staging standard file and support rolling back to a historical version.
[0037] As a possible implementation of this embodiment, the rollback is based on a set rollback mechanism to roll back to a historical version, and the rollback mechanism includes manual intervention rollback and automatic rollback.
[0038] As a possible implementation of this embodiment, the manual intervention rollback is operated by an administrator. If the current applied staging standard file does not match the pathology report, or the staging is inaccurate due to changes in the staging standard file, then the manual intervention rollback is performed.
[0039] As a possible implementation of this embodiment, the automatic rollback includes the dynamic staging module during real-time monitoring: When it is found that the matching abnormality rate exceeds the set threshold, the rollback is automatically triggered; If the difference rate between the generated staging result and the staging result reviewed by the clinician exceeds a predetermined threshold, the automatic rollback is triggered.
[0040] In this embodiment, the rollback mechanism is set, which further realizes fast response. In the prior art, if there are matching or prediction abnormalities, the model needs to be retrained, and it will be deployed to the system for use only after the training is completed; while in this embodiment, it can roll back to the most stable historical version for continued use. At the same time, the new staging standard file is screened for problems, and the staging standard file is corrected without affecting clinical use.
[0041] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An LLM adaptive staging system based on a dynamic staging module, characterized in that, It includes a model extraction module, a dynamic staging module, and a TNM standard management module; The model extraction module is used to receive the original pathological report text and extract pathological features from the original pathological report text; The dynamic staging module makes logical judgments based on the extracted pathological features and the effective staging standard file managed by the TNM standard management module, and outputs the final TNM staging result; The TNM standard management module is used to manage multiple versions of the staging standard file and provide a RESTful API interface for loading, unloading, and querying the version of the staging standard file; Among them, the model extraction module, the dynamic staging module, and the TNM standard management module are independently configured.
2. The LLM adaptive staging system based on the dynamic staging module according to claim 1, characterized in that, The model extraction module encodes the input original pathological report text based on the trained language model and outputs a structured JSON object related to pathology.
3. The LLM adaptive staging system based on the dynamic staging module according to claim 1, wherein In the dynamic staging module, a declarative language is used to model and configure the TNM staging standard to obtain a dynamic staging unit; The extracted pathological features are used as the initial input data of the dynamic staging unit. The dynamic staging unit gradually parses and calculates the final TNM staging result according to the configured staging logic and in combination with the pathological feature information according to the established code logic.
4. The LLM adaptive staging system based on the dynamic staging module according to claim 1, wherein The TNM standard management module is used to perform version control on the staging standard file and support rolling back to historical versions.
Citation Information
Patent Citations
TNM (Tumor Necrosis Model) staging prediction method and system in clinical text of large language model
CN119830907A
Cited By
Dynamic modular intelligent tumor staging system and method based on MCP protocol and LLM
CN120932925A