A medical text correction method based on semantic understanding

By constructing a medical fact knowledge base and using bidirectional structured alignment technology, the problem that existing medical text correction technologies cannot identify semantic and logical errors has been solved, enabling deep semantic understanding and traceable error correction of medical texts.

CN122133647APending Publication Date: 2026-06-02NORTHWEST UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHWEST UNIV
Filing Date
2026-02-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing medical text correction technologies cannot deeply integrate medical expertise, making it difficult to identify and correct semantic and logical errors. Furthermore, correction suggestions lack medical factual basis, and the model decision-making process is opaque.

Method used

A medical fact knowledge base is constructed to store semantic relationships in the form of triples. Text is parsed through a semantic role labeling network, and semantic conflicts are identified through bidirectional structured alignment. Correction suggestions are generated based on the knowledge base.

Benefits of technology

It achieves deep semantic understanding and fact consistency verification, provides traceable medical error correction suggestions, and ensures the medical correctness and transparency of error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122133647A_ABST
    Figure CN122133647A_ABST
Patent Text Reader

Abstract

This invention discloses a medical text error correction method based on semantic understanding, belonging to the field of medical information technology. This invention abandons the traditional linear approach of local error detection and replacement, instead constructing a closed-loop verification system that moves from medical semantic understanding to contradiction discovery and then to evidence-based correction. Specifically, it includes: 1. Constructing and utilizing a dynamic and traceable medical fact knowledge base as the gold standard for semantic verification; 2. Proposing a bidirectional structured alignment semantic contradiction discovery mechanism, deeply comparing unstructured text semantics with structured medical knowledge to locate logical contradictions; 3. Designing an evidence-based correction suggestion generation method based on knowledge base subgraph retrieval to ensure that error correction suggestions are supported not only by linguistics but also by medical facts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, and in particular to a method for correcting errors in medical text based on semantic understanding. Background Technology

[0002] Accuracy and consistency are paramount in medical texts such as electronic medical records, clinical notes, and medical research reports. However, two types of errors frequently occur during writing, transcription, or summary generation: surface-level spelling or grammatical errors, and deeper semantic and logical errors. For example, the statement "The patient has no history of diabetes and injects insulin daily" may be factually contradictory, or "Using amoxicillin in someone allergic to penicillin violates a medical contraindication." Traditional text correction techniques primarily target the first type of error, relying on dictionaries, rules, or statistical language models, and are unable to understand and verify the underlying medical facts within the text.

[0003] In recent years, with the development of pre-trained language models such as BERT and GPT series, they have demonstrated powerful capabilities in general-domain text generation and correction. However, directly applying these models to medical text correction has significant drawbacks: First, general-purpose models lack professional medical knowledge and struggle to identify semantic errors that violate medical common sense; second, their correction suggestions may only pursue linguistic fluency without sufficient medical factual basis, and may even introduce new errors; finally, the model's decision-making process is opaque, making it difficult to trace the medical evidence upon which the corrections are based.

[0004] Therefore, existing technologies lack an automatic error correction method that can deeply integrate medical expertise, perform deep semantic understanding and factual consistency verification of text, and provide traceable medical evidence. Summary of the Invention

[0005] To address the technical problems existing in the background art, this invention proposes a medical text error correction method based on semantic understanding.

[0006] This invention proposes a medical text error correction method based on semantic understanding, comprising the following steps: S1. Obtain the original medical text to be corrected; S2. Construct a medical fact knowledge base based on authoritative medical literature and treatment guidelines, wherein the medical fact knowledge base stores semantic relationships between medical concepts in the form of triples; the triples include head entity, relation and tail entity; S3. Input the original medical text into a semantic role labeling network pre-trained with medical corpus, and output an analytical graph of medical entities and their semantic roles in the original medical text. S4. Perform bidirectional structural alignment between the semantic relationships in the analytical graph and the corresponding entity relationships in the medical fact knowledge base, identify and output the set of discrepancy pairs with semantic conflicts; S5. Based on the set of differences, retrieve the correct knowledge subgraph associated with the conflicting context from the medical fact knowledge base, and generate a corrective suggestion text for the original medical text based on the correct knowledge subgraph.

[0007] As an explanation: S1 is the input step of the method, which clarifies that the object being processed is "raw medical text", providing the operational basis for all subsequent steps; Step S2 establishes the reference system for this method—the "Medical Facts Knowledge Base." It clarifies its sources (authoritative literature and guidelines) and structured form (trines), which not only stores data but also provides a computable and queryable structured knowledge foundation for subsequent semantic verification. The output is the "Medical Facts Knowledge Base." Step S3 performs deep semantic parsing on the input text. Using a specific tool, a "semantic role annotation network pre-trained on a medical corpus," the unstructured text is transformed into a structured "analytic graph." The output is an "analytic graph" that reflects semantic roles in the text, such as "who did what to whom." The core of step S4 is "two-way structured alignment." It's not simply keyword matching, but rather a semantic-level alignment comparison between the text "analysis graph" (one structure) obtained in step S3 and the "medical fact knowledge base" (another structure) from step S2. This operation can uncover deep contradictions between textual descriptions and medical common sense, outputting a clear "set of difference pairs." The product is a "set of difference pairs." Step S5 involves evidence-based correction based on the discovered contradictions. Using the "set of difference pairs" as a clue, it retrieves the correct knowledge ("correct knowledge subgraph") from the "medical fact knowledge base" and generates corrective suggestions accordingly. This ensures the medical correctness of the corrective suggestions, completing the closed loop from "discovering errors" to "providing the correct version." The output is the "corrective suggestion text."

[0008] Preferably, step S2 specifically includes: S21. From multi-source authoritative medical texts, extract candidate medical entity relationship pairs through a joint model of entity recognition and relationship extraction; S22. Input the candidate medical entity relationship pairs into a reinforcement learning filter based on medical expert feedback, filter out relationship pairs with confidence higher than the dynamic threshold, and form standardized triples; S23. The standardized triples are hierarchically linked and conflict-resolved according to the medical discipline system to construct the medical fact knowledge base.

[0009] In S22, the candidate medical entity relationship pairs are input into a reinforcement learning filter based on medical expert feedback, wherein the filter is evaluated using the following confidence function. Screening candidate triples: ; And the dynamic threshold The following formula is used with each training round. Adaptive adjustment: ; in, This represents the head entity, relation, and tail entity as a vector. , , , For learnable parameters, For the Sigmoid function, As the initial threshold, For learning rate, This represents the sample size of the most recent batch of expert feedback. Filter out > The relationships are paired to form standardized triples.

[0010] As an explanation, the construction process of this medical fact knowledge base is as follows. It is not a simple data accumulation, but rather a process involving three steps: "joint model extraction," "reinforcement learning filters (dynamically learning selection criteria based on expert feedback)," and "hierarchical linking and conflict resolution." This ensures the high quality, low noise, and internal consistency of the knowledge base. Step S21 produces "candidate medical entity relation pairs," step S22 produces "standardized triples," and step S23, the final product, is the structured "medical fact knowledge base." Preferably, step S4 specifically includes: S41. From the analytical graph, extract the local subgraph with the questionable medical entity as the core as the text semantic subgraph; S42. Retrieve all relevant triples corresponding to entities in the text semantic subgraph from the medical fact knowledge base, and construct a knowledge verification subgraph; S43. Calculate the structured similarity between the text semantic subgraph and the knowledge verification subgraph in terms of relational paths and attribute values, mark nodes or edges with similarity lower than the adaptive threshold as conflicts, and generate the set of difference pairs.

[0011] In S43, the text semantic subgraph is calculated using the following formula. With the knowledge verification subgraph Structural similarity : ; in, and These are the edge sets of the text semantic subgraph and the knowledge verification subgraph, respectively. Let be the set of all reachable paths between the two subgraphs. Representing a semantic subgraph of text along the path The final attribute value passed, ‖ (.) is the indicator function. and The pre-trained structural weight coefficients; the structural similarity Below the adaptive threshold Nodes or edges are marked as conflicting, and the set of difference pairs is generated.

[0012] As an explanation: This is the specific implementation of the "bidirectional structured alignment". It constructs two comparable structured objects, a "textual semantic subgraph" and a "knowledge verification subgraph", and innovatively calculates their "structured similarity" at the level of "relationship paths and attribute values", thereby achieving deep semantic contradiction discovery. The product of step S41 is the "textual semantic subgraph", the product of S42 is the "knowledge verification subgraph", and the product of S43 is the "set of difference pairs". Preferably, after step S1 and before step S3, the method further includes: S01. Perform sentence segmentation and terminology standardization on the original medical text to generate preprocessed standard text; S02. Use the standard text as input to the semantic role labeling network in step S3.

[0013] Preferably, step S5, which generates correction suggestion text based on the correct knowledge subgraph, specifically includes: S51. Based on the type of the difference set, call the corresponding natural language generation template and fill the correct knowledge subgraph into the template; S52. Optimize the fluency of the filled text to generate the corrected suggestion text with grammatical correctness.

[0014] Preferably, the adaptive threshold in step S43 is determined in the following manner: S431. Calculate the historical confidence average of all relation paths in the knowledge verification subgraph; S432. The historical confidence average is weighted by the current prevalence coefficient of the medical entity to dynamically obtain the adaptive threshold for this comparison.

[0015] Preferably, it further includes: S6. Calculate the semantic change degree and medical fact confidence degree of the corrective suggestion text relative to the original medical text; S7. When the semantic change degree is lower than the first threshold and the confidence degree of the medical fact is higher than the second threshold, the correction suggestion text is automatically output as the final error correction result.

[0016] Preferably, it further includes: S8. When the conditions of step S7 are not met, submit the original medical text, the set of difference pairs, and the correction suggestion text to the manual review interface. S9. Receive the final confirmation result fed back through the manual review interface, and update the weight of the medical fact knowledge base with the result.

[0017] Preferably, the relationship types in the medical fact knowledge base include, but are not limited to, etiology, clinical manifestations, examination methods, treatment methods, drug contraindications, and prognosis.

[0018] Preferably, the semantic role labeling network adopts a Transformer-based bidirectional encoder architecture and is pre-trained on a mixed corpus of Chinese medical texts and English medical literature summaries.

[0019] The semantic understanding-based medical text error correction method proposed in this invention has the following beneficial technical effects: This invention abandons the traditional linear approach of local error detection and replacement, instead constructing a closed-loop verification system that moves from medical semantic understanding to contradiction discovery and then to evidence-based correction. Specifically: 1. It constructs and utilizes a dynamic and traceable medical fact knowledge base as the gold standard for semantic verification; 2. It proposes a bidirectional structured alignment semantic contradiction discovery mechanism, deeply comparing unstructured text semantics with structured medical knowledge to locate logical contradictions; 3. It designs an evidence-based correction suggestion generation method based on knowledge base subgraph retrieval, ensuring that correction suggestions are supported not only by linguistics but also by medical facts. Attached Figure Description

[0020] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart of step S2 of the method of the present invention; Figure 3 This is a flowchart of step S4 of the method of the present invention. Detailed Implementation

[0021] Embodiments of the present invention are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar symbols denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0022] like Figures 1-3 The illustrated method for medical text error correction based on semantic understanding includes the following steps: S1. Obtain the original medical text to be corrected; S2. Construct a medical fact knowledge base based on authoritative medical literature and treatment guidelines, wherein the medical fact knowledge base stores semantic relationships between medical concepts in the form of triples; the triples include head entity, relation and tail entity; S3. Input the original medical text into a semantic role labeling network pre-trained with medical corpus, and output an analytical graph of medical entities and their semantic roles in the original medical text. S4. Perform bidirectional structural alignment between the semantic relationships in the analytical graph and the corresponding entity relationships in the medical fact knowledge base, identify and output the set of discrepancy pairs with semantic conflicts; S5. Based on the set of differences, retrieve the correct knowledge subgraph associated with the conflicting context from the medical fact knowledge base, and generate a corrective suggestion text for the original medical text based on the correct knowledge subgraph.

[0023] As an explanation: S1 is the input step of the method, which clarifies that the object being processed is "raw medical text", providing the operational basis for all subsequent steps; Step S2 establishes the reference system for this method—the "Medical Facts Knowledge Base." It clarifies its sources (authoritative literature and guidelines) and structured form (trines), which not only stores data but also provides a computable and queryable structured knowledge foundation for subsequent semantic verification. The output is the "Medical Facts Knowledge Base." Step S3 performs deep semantic parsing on the input text. Using a specific tool, a "semantic role annotation network pre-trained on a medical corpus," the unstructured text is transformed into a structured "analytic graph." The output is an "analytic graph" that reflects semantic roles in the text, such as "who did what to whom." The core of step S4 is "two-way structured alignment." It's not simply keyword matching, but rather a semantic-level alignment comparison between the text "analysis graph" (one structure) obtained in step S3 and the "medical fact knowledge base" (another structure) from step S2. This operation can uncover deep contradictions between textual descriptions and medical common sense, outputting a clear "set of difference pairs." The product is a "set of difference pairs." Step S5 involves evidence-based correction based on the discovered contradictions. Using the "set of difference pairs" as a clue, it retrieves the correct knowledge ("correct knowledge subgraph") from the "medical fact knowledge base" and generates corrective suggestions accordingly. This ensures the medical correctness of the corrective suggestions, completing the closed loop from "discovering errors" to "providing the correct version." The output is the "corrective suggestion text."

[0024] In an optional embodiment, step S2 specifically includes: S21. From multi-source authoritative medical texts, extract candidate medical entity relationship pairs through a joint model of entity recognition and relationship extraction; S22. Input the candidate medical entity relationship pairs into a reinforcement learning filter based on medical expert feedback, filter out relationship pairs with confidence higher than the dynamic threshold, and form standardized triples; S23. The standardized triples are hierarchically linked and conflict-resolved according to the medical discipline system to construct the medical fact knowledge base.

[0025] In S22, the candidate medical entity relationship pairs are input into a reinforcement learning filter based on medical expert feedback, wherein the filter is evaluated using the following confidence function. Screening candidate triples: ; And the dynamic threshold The following formula is used with each training round. Adaptive adjustment: ; in, This represents the head entity, relation, and tail entity as a vector. , , , For learnable parameters, For the Sigmoid function, As the initial threshold, For learning rate, This represents the sample size of the most recent batch of expert feedback. Filter out > The relationships are paired to form standardized triples.

[0026] As an explanation, the construction process of this medical fact knowledge base is as follows. It is not a simple data accumulation, but rather a process involving three steps: "joint model extraction," "reinforcement learning filters (dynamically learning selection criteria based on expert feedback)," and "hierarchical linking and conflict resolution." This ensures the high quality, low noise, and internal consistency of the knowledge base. Step S21 produces "candidate medical entity relation pairs," step S22 produces "standardized triples," and step S23, the final product, is the structured "medical fact knowledge base." In an optional embodiment, step S4 specifically includes: S41. From the analytical graph, extract the local subgraph with the questionable medical entity as the core as the text semantic subgraph; S42. Retrieve all relevant triples corresponding to entities in the text semantic subgraph from the medical fact knowledge base, and construct a knowledge verification subgraph; S43. Calculate the structured similarity between the text semantic subgraph and the knowledge verification subgraph in terms of relational paths and attribute values, mark nodes or edges with similarity lower than the adaptive threshold as conflicts, and generate the set of difference pairs.

[0027] In S43, the text semantic subgraph is calculated using the following formula. With the knowledge verification subgraph Structural similarity : ; in, and These are the edge sets of the text semantic subgraph and the knowledge verification subgraph, respectively. Let be the set of all reachable paths between the two subgraphs. Representing a semantic subgraph of text along the path The final attribute value passed, ‖ (.) is the indicator function. and The pre-trained structural weight coefficients; the structural similarity Below the adaptive threshold Nodes or edges are marked as conflicting, and the set of difference pairs is generated.

[0028] As an explanation: This is the specific implementation of the "bidirectional structured alignment". It constructs two comparable structured objects, a "textual semantic subgraph" and a "knowledge verification subgraph", and innovatively calculates their "structured similarity" at the level of "relationship paths and attribute values", thereby achieving deep semantic contradiction discovery. The product of step S41 is the "textual semantic subgraph", the product of S42 is the "knowledge verification subgraph", and the product of S43 is the "set of difference pairs". In an optional embodiment, after step S1 and before step S3, the method further includes: S01. Perform sentence segmentation and terminology standardization on the original medical text to generate preprocessed standard text; S02. Use the standard text as input to the semantic role labeling network in step S3.

[0029] 5. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, the step S5 of generating correction suggestion text based on the correct knowledge subgraph specifically includes: S51. Based on the type of the difference set, call the corresponding natural language generation template and fill the correct knowledge subgraph into the template; S52. Optimize the fluency of the filled text to generate the corrected suggestion text with grammatical correctness.

[0030] In an optional embodiment, the adaptive threshold in step S43 is determined in the following manner: S431. Calculate the historical confidence average of all relation paths in the knowledge verification subgraph; S432. The historical confidence average is weighted by the current prevalence coefficient of the medical entity to dynamically obtain the adaptive threshold for this comparison.

[0031] In an optional embodiment, it further includes: S6. Calculate the semantic change degree and medical fact confidence degree of the corrective suggestion text relative to the original medical text; S7. When the semantic change degree is lower than the first threshold and the confidence degree of the medical fact is higher than the second threshold, the correction suggestion text is automatically output as the final error correction result.

[0032] In an optional embodiment, it further includes: S8. When the conditions of step S7 are not met, submit the original medical text, the set of difference pairs, and the correction suggestion text to the manual review interface. S9. Receive the final confirmation result fed back through the manual review interface, and update the weight of the medical fact knowledge base with the result.

[0033] In an optional embodiment, the relationship types in the medical fact knowledge base include, but are not limited to, etiology, clinical manifestations, examination methods, treatment methods, drug contraindications, and prognosis.

[0034] In an optional embodiment, the semantic role labeling network employs a Transformer-based bidirectional encoder architecture and is pre-trained on a mixed corpus of Chinese medical texts and English medical literature summaries.

[0035] This invention abandons the traditional linear approach of local error detection and replacement, instead constructing a closed-loop verification system that moves from medical semantic understanding to contradiction discovery and then to evidence-based correction. Specifically: 1. It constructs and utilizes a dynamic and traceable medical fact knowledge base as the gold standard for semantic verification; 2. It proposes a bidirectional structured alignment semantic contradiction discovery mechanism, deeply comparing unstructured text semantics with structured medical knowledge to locate logical contradictions; 3. It designs an evidence-based correction suggestion generation method based on knowledge base subgraph retrieval, ensuring that correction suggestions are supported not only by linguistics but also by medical facts.

[0036] For clarification, "acquisition" in this application refers to obtaining the required content or data using existing technical means.

[0037] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.

[0038] In the embodiments provided by this invention, it should be understood that the disclosed system or method can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for instance, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.

[0039] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0040] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.

[0041] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the basic characteristics of the present invention.

[0042] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for correcting errors in medical text based on semantic understanding, characterized in that, Includes the following steps, S1. Obtain the original medical text to be corrected; S2. Construct a medical fact knowledge base based on authoritative medical literature and treatment guidelines, wherein the medical fact knowledge base stores semantic relationships between medical concepts in the form of triples; the triples include head entity, relation and tail entity; S3. Input the original medical text into a semantic role labeling network pre-trained with medical corpus, and output an analytical graph of medical entities and their semantic roles in the original medical text. S4. Perform bidirectional structural alignment between the semantic relationships in the analytical graph and the corresponding entity relationships in the medical fact knowledge base, identify and output the set of discrepancy pairs with semantic conflicts; S5. Based on the set of differences, retrieve the correct knowledge subgraph associated with the conflicting context from the medical fact knowledge base, and generate a corrective suggestion text for the original medical text based on the correct knowledge subgraph.

2. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, Step S2 specifically includes: S21. From multi-source authoritative medical texts, extract candidate medical entity relationship pairs through a joint model of entity recognition and relationship extraction; S22. Input the candidate medical entity relationship pairs into a reinforcement learning filter based on medical expert feedback, filter out relationship pairs with confidence higher than the dynamic threshold, and form standardized triples; S23. The standardized triples are hierarchically linked and conflict-resolved according to the medical discipline system to construct the medical fact knowledge base.

3. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, Step S4 specifically includes: S41. From the analytical graph, extract the local subgraph with the questionable medical entity as the core as the text semantic subgraph; S42. Retrieve all relevant triples corresponding to entities in the text semantic subgraph from the medical fact knowledge base, and construct a knowledge verification subgraph; S43. Calculate the structured similarity between the text semantic subgraph and the knowledge verification subgraph in terms of relational paths and attribute values, mark nodes or edges with similarity lower than the adaptive threshold as conflicts, and generate the set of difference pairs.

4. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, After step S1 and before step S3, the method further includes: S01. Perform sentence segmentation and terminology standardization on the original medical text to generate preprocessed standard text; S02. Use the standard text as input to the semantic role labeling network in step S3.

5. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, The step S5, which generates correction suggestion text based on the correct knowledge subgraph, specifically includes: S51. Based on the type of the difference set, call the corresponding natural language generation template and fill the correct knowledge subgraph into the template; S52. Optimize the fluency of the filled text to generate the corrected suggestion text with grammatical correctness.

6. The medical text error correction method based on semantic understanding according to claim 3, characterized in that, The adaptive threshold in step S43 is determined in the following way: S431. Calculate the historical confidence average of all relation paths in the knowledge verification subgraph; S432. The historical confidence average is weighted by the current prevalence coefficient of the medical entity to dynamically obtain the adaptive threshold for this comparison.

7. The medical text error correction method based on semantic understanding according to claim 1, characterized in that, Also includes: S6. Calculate the semantic change degree and medical fact confidence degree of the corrective suggestion text relative to the original medical text; S7. When the semantic change degree is lower than the first threshold and the confidence degree of the medical fact is higher than the second threshold, the correction suggestion text is automatically output as the final error correction result.

8. The medical text error correction method based on semantic understanding according to claim 7, characterized in that, Also includes: S8. When the conditions of step S7 are not met, submit the original medical text, the set of difference pairs, and the correction suggestion text to the manual review interface. S9. Receive the final confirmation result fed back through the manual review interface, and update the weight of the medical fact knowledge base with the result.

9. The medical text error correction method based on semantic understanding according to claim 6, characterized in that, The relationship types in the medical fact knowledge base include, but are not limited to, etiology, clinical manifestations, examination methods, treatment methods, drug contraindications, and prognosis.

10. The medical text error correction method based on semantic understanding according to claim 7, characterized in that, The semantic role labeling network adopts a Transformer-based bidirectional encoder architecture and is pre-trained on a mixed corpus of Chinese medical texts and English medical literature summaries.