A Structured Processing Method and System for Medical Texts on Hepatobiliary and Pancreatic Diseases Based on Natural Language Processing

By constructing a three-dimensional topological subgraph of the hepatobiliary and pancreatic anatomical topological knowledge base and calculating semantic dependency distance, the problem of multiple concurrent lesions and intertwined location descriptions in medical texts for hepatobiliary and pancreatic diseases was solved. This achieved accurate matching of lesion entities with anatomical locations and quantitative attributes, generating high-quality structured data.

CN123068544APending Publication Date: 2026-11-10HUBEI AEROSPACE HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611190181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing deep learning-based named entity recognition and relation extraction models struggle to accurately handle complex and lengthy texts containing multiple concurrent lesions and intertwined location descriptions when processing medical texts related to hepatobiliary and pancreatic diseases. This leads to incorrect associations and mismatches between lesion entities and their corresponding anatomical locations or quantitative attributes, resulting in the inability to generate accurate and reliable structured data.

Method used

By extracting entities from medical texts, a three-dimensional topological subgraph based on the hepatobiliary and pancreatic anatomy topological knowledge base is constructed. Instances are expanded by combining quantitative descriptive words, semantic dependency distance is calculated, and attribute alignment and referential resolution are performed by combining contextual features. Finally, structured text data is generated according to the preset data paradigm.

Benefits of technology

It improves the accuracy of matching lesion entities with their corresponding anatomical locations and quantity attributes in medical texts for hepatobiliary and pancreatic diseases, solves the problem of chaotic entity association when multiple lesions occur concurrently and location descriptions are intertwined, and generates high-quality structured data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123068544A_ABST
    Figure CN123068544A_ABST
Patent Text Reader

Abstract

A method and system for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing, relating to the field of medical text data processing technology. The method includes: acquiring medical texts related to hepatobiliary and pancreatic diseases; extracting anatomical region nodes and lesion instance nodes from the medical text; extracting contextual features from the medical text; combining contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes; assembling the attribute-aligned lesion instance nodes and their corresponding anatomical region nodes according to a preset hepatobiliary and pancreatic disease data paradigm using key-value pairs to generate and output the target structured text data. This invention effectively solves the entity confusion problem under complex clinical descriptions and significantly improves the accuracy of matching lesion entities with their corresponding anatomical locations and quantity attributes in medical texts related to hepatobiliary and pancreatic diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical text data processing technology, specifically to a method and system for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing. Background Technology

[0002] With the continuous advancement of medical informatization, hospital information systems have accumulated massive amounts of medical text data (such as electronic medical records, imaging diagnostic reports, surgical records, etc.). To fully explore the clinical research value of this unstructured text data, it is usually necessary to use natural language processing technology to transform it into computer-readable structured data. In the field of hepatobiliary and pancreatic diseases, due to the wide variety and complexity of diseases, high-quality structured processing of medical texts is of great significance for assisting clinical decision-making and medical research.

[0003] Currently, related technologies typically employ deep learning-based named entity recognition and relation extraction models to automate the processing of medical texts. Specifically, these methods first identify medical entities such as lesions, anatomical locations, and sizes in the text using a pre-trained language model. Then, they utilize relation classification models (usually based on the co-occurrence features of entities in the text sequence or linear interval distance) to determine whether there are modification or attribution relationships between entities, thereby grouping attributes belonging to the same lesion together and ultimately outputting a structured result.

[0004] However, when processing medical texts related to hepatobiliary and pancreatic diseases, the complex anatomical structure of these organs and the fact that patients often have multiple lesions simultaneously lead doctors to use complex relative location descriptions and vague quantitative expressions in their medical texts. Existing relation extraction models primarily rely on the literal sequence features of the text. When faced with complex and lengthy texts containing multiple concurrent lesions and interwoven location descriptions, entity association confusion easily occurs. This results in incorrect associations and mismatches between the extracted lesion entities and their corresponding actual anatomical locations or quantitative attributes, making it impossible to generate accurate and reliable structured data specific to these diseases. Summary of the Invention

[0005] To address the aforementioned shortcomings, a method and system for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing is provided.

[0006] In a first aspect, the present invention provides a method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing, the method comprising: Obtain the medical text for liver, gallbladder and pancreas diseases to be processed, extract entities from the medical text to obtain an initial entity set, which includes lesion entities, anatomical region entities and quantity descriptive words; Based on a pre-defined hepatobiliary and pancreatic anatomical topology knowledge base, the anatomical region entities in the initial entity set are spatially mapped to different regions to construct a three-dimensional topological subgraph representing the spatial adjacency relationship of liver segments and pancreatic sites. Based on the quantity descriptors in the initial entity set, the lesion entity is expanded into multiple independent lesion instance nodes by dividing the quantity of instances. Extract the contextual features of the medical text, calculate the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph, and combine the contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes; The lesion instance nodes with completed attribute alignment and the corresponding anatomical region nodes are assembled into key-value pairs according to the preset liver, gallbladder and pancreas disease data paradigm to generate and output the target structured text data.

[0007] By employing the above technical solution, the medical text for hepatobiliary and pancreatic diseases to be processed is obtained, and entity extraction is performed on the medical text to obtain an initial entity set including lesion entities, anatomical region entities, and quantitative descriptive words, thus extracting key medical elements from the unstructured text. Based on a pre-defined hepatobiliary and pancreatic anatomical topology knowledge base, the anatomical region entities in the initial entity set are spatially mapped to different regions to construct a three-dimensional topological subgraph. This restores the originally flat textual anatomical terms to a three-dimensional structure with realistic liver segmentation and spatial adjacency relationships of pancreatic sites, overcoming the deficiency of relying solely on textual literal sequence features to perceive complex spatial locations. Based on the quantitative descriptive words in the initial entity set, the lesion entities are expanded into instances based on quantity, resulting in multiple independent lesion instance nodes. This concretizes the vague quantitative expression into independent computational units, avoiding the problem of multiple lesion instances. When multiple lesions coexist, referential confusion arises due to the sharing of the same lesion terminology. This paper addresses this issue by extracting contextual features from medical texts, calculating the semantic dependency distance between lesion instance nodes and anatomical region nodes in the 3D topological subgraph, and combining these contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes. Utilizing the dual constraints of spatial topology and semantic dependency, the paper accurately locates the true location of each lesion instance in complex, long texts with interwoven lesions. Finally, the attribute-aligned lesion instance nodes and their corresponding anatomical region nodes are assembled into key-value pairs according to a pre-defined data paradigm for hepatobiliary and pancreatic diseases, generating and outputting the target structured text data. This effectively solves the problem of entity association confusion when multiple lesions coexist and their location descriptions are interwoven, thereby improving the accuracy of matching lesion entities with their corresponding anatomical locations and quantity attributes in hepatobiliary and pancreatic disease medical texts.

[0008] Secondly, a structured text processing system for medical texts related to hepatobiliary and pancreatic diseases based on natural language processing, the system comprising: The entity extraction module is used to acquire medical texts related to liver, gallbladder and pancreas diseases to be processed, and to extract entities from the medical texts to obtain an initial entity set. The initial entity set includes lesion entities, anatomical region entities and quantity descriptive words. The topology subgraph construction module is used to perform regional spatial mapping on the anatomical entities in the initial entity set based on a preset hepatobiliary and pancreatic anatomical topology knowledge base, and construct a three-dimensional topology subgraph representing the spatial adjacency relationship of liver segments and pancreatic sites. The instance expansion module is used to expand the lesion entity into multiple independent lesion instance nodes by dividing the number of instances based on the quantity descriptors in the initial entity set. The attribute alignment and resolution module is used to extract the context features of the medical text, calculate the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph, and combine the context features to perform attribute alignment and referential resolution on multiple lesion instance nodes. The structured data generation module is used to assemble the attribute-aligned lesion instance nodes and the corresponding anatomical region nodes according to the preset liver, gallbladder and pancreas disease data paradigm into key-value pairs, and generate and output the target structured text data.

[0009] Thirdly, the present invention provides an electronic device, including a memory and a processor; The memory is used to store computer programs; The processor is configured to implement the above-described method for structuring medical texts related to liver, gallbladder, and pancreas diseases based on natural language processing when executing the computer program.

[0010] Fourthly, the present invention provides a computer-readable storage medium storing a computer program, which, when read and run by a processor, implements the above-described method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing. Attached Figure Description

[0011] Figure 1 A flowchart illustrating a method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing, provided in an embodiment of the present invention. Figure 2 An example diagram of a medical text for liver, gallbladder, and pancreas diseases to be processed, provided as an embodiment of the present invention; Figure 3 A schematic diagram of a pre-defined data paradigm for hepatobiliary and pancreatic diseases provided in an embodiment of the present invention; Figure 4 This is a structural block diagram of a medical text structuring system for liver, gallbladder, and pancreas diseases based on natural language processing, provided in an embodiment of the present invention. Detailed Implementation

[0012] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention. Example

[0013] like Figure 1 As shown, a method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing is presented. The method includes: Obtain the medical text for liver, gallbladder and pancreas diseases to be processed, extract entities from the medical text to obtain an initial entity set, which includes lesion entities, anatomical region entities and quantity descriptive words; Based on a pre-defined hepatobiliary and pancreatic anatomical topology knowledge base, the anatomical entities in the initial entity set are spatially mapped to different regions to construct a three-dimensional topological subgraph representing the spatial adjacency relationships of liver segments and pancreatic sites. Based on the quantity descriptors in the initial entity set, the lesion entity is expanded into multiple independent lesion instance nodes by dividing the quantity of instances. Extract contextual features from medical texts, calculate the semantic dependency distance between lesion instance nodes and nodes of each anatomical region in the 3D topological subgraph, and combine contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes. The lesion instance nodes with completed attribute alignment and the corresponding anatomical region nodes are assembled into key-value pairs according to the preset data paradigm for liver, gallbladder and pancreas diseases, and the target structured text data is generated and output.

[0014] Specifically, the electronic device first acquires the medical text related to liver, gallbladder, and pancreas diseases to be processed, for example... Figure 2 As shown, the medical text in practical applications can be a single clinical document (such as an unstructured physical examination text or ultrasound report text), or a comprehensive electronic medical record collection containing multiple source sub-text records such as the same patient's imaging diagnosis text, surgical record text, and pathology report text. Subsequently, a pre-trained natural language processing sequence labeling model is used to extract entities from the medical text, thereby obtaining an initial entity set. This initial entity set specifically includes lesion entities such as tumors or nodules, anatomical region entities such as liver segments or pancreatic body and tail, and quantitative descriptive words representing the number of lesions. Subsequently, based on a pre-set hepatobiliary and pancreatic anatomical topology knowledge base, the anatomical region entities in the initial entity set are spatially mapped to different regions. This knowledge base embeds the Curono segmentation standard of the liver and the anatomical structure information of the pancreas. Through mapping, anatomical terms in the text can be transformed into nodes with actual physical location associations, thereby constructing a three-dimensional topological subgraph representing the spatial adjacency relationships of liver segments and pancreatic sites, enabling subsequent processing to perceive the complex three-dimensional spatial structure inside the organs.

[0015] After constructing the 3D topological subgraph, the lesion entities are expanded into instances based on the quantity descriptors in the initial entity set. For example, when the quantity descriptors are multiple or specific Arabic numerals, a single lesion entity is copied and split into the corresponding number of independent computational units, thereby obtaining multiple independent lesion instance nodes to avoid feature confusion in subsequent processing of multiple lesions. Then, a pre-trained medical language model (such as a medical text encoder based on the Transformer architecture) is used to transform the medical text into word vector representations containing contextual semantics, which are used as contextual features of the medical text. In the actual processing logic, the extraction of contextual features and the calculation of semantic dependency distance are closely coordinated: the system extracts the aforementioned contextual features on the one hand, and extracts the dependency syntax tree between words in the text through dependency parsing tools on the other hand, incorporating the extracted contextual features as the underlying node attributes. It then calculates the shortest path hop count between lesion instance nodes and each anatomical region node in the 3D topological subgraph on the syntax tree, and converts this hop count, combined with the dependency relationship type between nodes (such as modification relation, subject-predicate relation), into a quantified semantic dependency distance. This distance objectively reflects the degree of association between entities in the syntax tree structure. Based on this, and combined with the extracted contextual features that may have undergone multi-source fusion and updates, attribute alignment and referential resolution are performed on multiple lesion instance nodes to accurately identify the anatomical region node to which each independent lesion instance node truly belongs.

[0016] Finally, the lesion instance nodes with completed attribute alignment and the corresponding anatomical region nodes are assembled into key-value pairs according to the preset liver, gallbladder and pancreas disease data paradigm. This transforms unstructured text elements into a standardized field mapping format, generates and outputs target structured text data, which can be directly stored in the disease database for subsequent clinical research and auxiliary diagnosis and treatment systems. Example

[0017] As a preferred embodiment of the present invention, based on Example 1, and based on a preset hepatobiliary and pancreatic anatomical topological knowledge base, the anatomical region entities in the initial entity set are spatially mapped to different regions to construct a three-dimensional topological subgraph representing the spatial adjacency relationships of liver segments and pancreatic sites, including: Analyze the entities in the anatomical region and separate out the standard anatomical roots and spatial location modifiers; Map standard anatomical terminology to standard three-dimensional coordinate nodes in the hepatobiliary and pancreatic anatomy topological knowledge base; When a spatial orientation modifier is identified as spanning the boundary region of multiple standard anatomical roots, virtual boundary nodes are generated between the corresponding standard three-dimensional coordinate nodes. Based on the semantic weights of spatial orientation modifiers, topological connection edges and distance penalty coefficients are assigned to virtual boundary nodes to generate a 3D topological subgraph.

[0018] Specifically, after acquiring the anatomical region entities from the initial entity set, the electronic device first uses a lexical analysis algorithm to perform structured parsing of the anatomical region entities, thereby accurately separating the standard anatomical roots representing core organ parts and spatial location modifiers used to describe specific location details. For example, when processing the anatomical region entity of the junction of liver segments 5 and 8, it is separated into two standard anatomical roots, liver segment 5 and liver segment 8, and the spatial location modifier "junction". Subsequently, the separated standard anatomical roots are input into a pre-defined hepatobiliary and pancreatic anatomy topology knowledge base for retrieval and matching, accurately mapping them to predefined standard three-dimensional coordinate nodes within the knowledge base, thereby establishing the basic anchor point position of the anatomical part in the standard three-dimensional anatomical model.

[0019] Furthermore, the system performs semantic analysis on the separated spatial orientation modifiers. When a spatial orientation modifier is identified as representing a boundary region spanning multiple standard anatomical roots, virtual boundary nodes are generated through coordinate interpolation between the corresponding standard 3D coordinate nodes in the knowledge base to accurately represent this non-standard and ambiguous boundary position. Based on this, the system obtains the semantic weights of the spatial orientation modifiers by querying a pre-defined orientation dictionary (e.g., "close to" is assigned a higher weight, "biased to" is assigned a medium weight) to assess the physical degree to which the boundary region leans towards a particular standard anatomical root. Based on this, corresponding topological connection edges and distance penalty coefficients are assigned to the generated virtual boundary nodes. Specifically, if the semantic weight indicates that the boundary region is more biased towards a certain standard anatomical node, a smaller distance penalty coefficient is assigned to the connection edge; conversely, a larger distance penalty coefficient is assigned. The distance penalty coefficient is used to quantify the semantic offset of the cross-regional position in subsequent calculations, thereby weightedly connecting the virtual boundary nodes with the original standard 3D coordinate nodes, ultimately generating a 3D topological subgraph that accurately represents the complex spatial adjacency relationships of liver segments and pancreas. Example

[0020] As a preferred embodiment of the present invention, based on Embodiment 1, the lesion entities are expanded by number of instances according to the quantity descriptors in the initial entity set, resulting in multiple independent lesion instance nodes, including: Quantitative classification of quantity descriptors determines whether they belong to precise numerical type or fuzzy quantifier type; If the value is a precise numerical type, then the corresponding number of independent lesion instance nodes will be directly copied and generated according to the numerical value. If it is a fuzzy quantifier type, then extract the morphological distribution feature words associated with the lesion entity from the medical text; Based on the discreteness of morphological distribution feature words, a cluster of lesion nodes containing dynamic number placeholders is generated, and the cluster of lesion nodes is used as a whole in subsequent attribute alignment.

[0021] Specifically, after acquiring the quantity descriptors in the initial entity set, the electronic device first uses a preset text classification algorithm to quantify and classify the quantity descriptors. It then uses semantic parsing to determine whether the quantity descriptors belong to the precise numerical type or the fuzzy quantifier type. If the determination result is a precise numerical type, such as a medical text that clearly records 3 hepatic hemangiomas, the system will parse out the specific number 3 and directly copy the original lesion entity according to this value, thereby generating the corresponding number of independent lesion instance nodes. This ensures that each specific lesion mentioned in the text has an independent computing carrier in the system for subsequent individual location matching.

[0022] Furthermore, if the determination result is a fuzzy quantifier type, such as a description in medical text that cannot determine the specific number of lesions (e.g., multiple metastatic tumors or diffuse lesions), the system will extract morphological distribution feature words associated with the lesion entity from the medical text through dependency parsing, such as descriptive words like scattered distribution or clustered aggregation. Subsequently, the system will evaluate the dispersion of the lesions in the anatomical space based on the dispersion of the extracted morphological distribution feature words, and generate a cluster of lesion nodes containing dynamic quantity placeholders. The dynamic quantity placeholders are used to flexibly represent the unknown and multiple specific lesion numbers. In subsequent graph convolution and attribute alignment calculations, the system will treat this cluster of lesion nodes as a whole for feature transfer. Its aggregated neighbor features will be shared with all potential lesion instances represented within the cluster, thus effectively solving the problems of disordered expansion of lesion nodes and disordered entity associations under fuzzy quantity expressions, ensuring the accuracy and integrity of structured data. Example

[0023] As a preferred embodiment of the present invention, based on Example 1, the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph is calculated, including: Perform syntactic analysis on medical texts to generate syntactic dependency trees representing the modification relationships between words; Align the nodes of the syntactic dependency tree with the nodes of the anatomical regions in the 3D topological subgraph to construct a text-space heterogeneous graph; Perform graph convolution operations on the text-spatial heterogeneous graph to enable lesion instance nodes to absorb the neighbor features of lesion instance nodes on the syntactic path and spatial topological path; Calculate the cosine similarity of feature vectors between lesion instance nodes after feature aggregation and nodes of each anatomical region, and convert the cosine similarity of feature vectors into semantic dependency distance.

[0024] Specifically, after extracting the contextual features of medical text, the electronic device first uses dependency parsing algorithms in natural language processing to perform deep syntactic analysis on the medical text, thereby extracting the grammatical structure between words in the text and generating a syntactic dependency tree that can intuitively represent the modification relationships between words. For example, for the clinical description of a hypoechoic nodule in the right lobe of the liver, the system will parse out the modification and dependency relationships between the lesion entity of the nodule and the anatomical region entity of the right lobe of the liver. Subsequently, the system uses the anatomical region entities in the initial entity set as anchor points, and performs cross-modal mapping and edge connection between the corresponding entity nodes in the generated syntactic dependency tree and the anatomical region nodes in the pre-constructed three-dimensional topological subgraph, thus integrating the grammatical structure at the text level with the spatial structure at the anatomical level, thereby constructing a text-space heterogeneous graph containing multi-dimensional relational information.

[0025] Furthermore, the system performs graph convolution operations on the constructed text-spatial heterogeneous graph. The specific information transfer and feature aggregation process is as follows: First, the contextual features of the previously extracted medical text (such as word vectors containing contextual semantics) are used as the initial basic features of each node; then, for each lesion instance node, the system traverses all its connected neighbor nodes (including text neighbor nodes on the syntactic dependency tree and spatial neighbor nodes on the 3D topological subgraph) and extracts the feature vectors of these neighbor nodes; next, according to the type and weight of the connecting edges, a weighted summation or average pooling operation is performed on all the extracted neighbor feature vectors to obtain aggregated features; finally, the aggregated features are concatenated with the features of the lesion instance node itself in the previous layer and input into the nonlinear activation function to update the feature representation of the lesion instance node. Through the above-mentioned multi-layered operations, lesion instance nodes can perform feature aggregation along the edges of the heterogeneous graph, thereby fully absorbing the neighbor features of lesion instance nodes on syntactic and spatial topological paths. This ensures that the updated lesion instance node features not only contain semantic information from the text context but also incorporate real anatomical spatial topological information. Based on this, the system calculates the cosine similarity of feature vectors between the feature-aggregated lesion instance nodes and nodes in each anatomical region to quantify the degree of matching between the two in the fused feature space. Finally, a preset distance mapping function is used to convert the cosine similarity of feature vectors into semantic dependency distance, thereby providing a reliable quantitative basis for accurately locating the true location of lesions and effectively improving the accuracy of entity association in complex medical texts. Example

[0026] As a preferred embodiment of the present invention, based on Example 1, the contextual features of the medical text are extracted, including: Identify the source types of medical texts, which include at least image diagnostic texts, surgical record texts, and pathology report texts; Based on the source type, a pre-trained type-specific attention mask is invoked to extract contextual features from the medical text, thus obtaining contextual features; When medical texts from different sources extract conflicting attribute features for the same lesion instance node, the preset confidence weights for each source type for different attributes are obtained. The conflicting attribute features are weighted and fused based on confidence weights to update the context features.

[0027] Specifically, when processing input medical text to extract contextual features, electronic devices, especially those dealing with complex medical texts containing multiple sources, first use a text classification model to identify the source type of each sub-segment or sub-text within the medical text. This clarifies whether the text fragment belongs to a diagnostic imaging text, surgical record text, or pathology report text. Then, based on the identified source type, a pre-trained type-specific attention mask is invoked to extract contextual features from the medical text. This type-specific attention mask is a weight matrix of the same length as the text sequence, trained using historical labeled data. It automatically reduces the weight of non-key descriptive words and amplifies the weight of key medical entities. For example, for diagnostic imaging text, an attention mask focusing on spatial location and size is invoked, while for pathology report text, an attention mask focusing on cell morphology and histological properties is invoked. This accurately filters out irrelevant and redundant words and focuses on key medical information in different types of text, thus obtaining the initial contextual features.

[0028] Furthermore, in complex scenarios involving joint analysis of multi-source clinical texts, when the system discovers conflicting attribute features extracted from sub-text records of different source types within the same medical text for the same lesion instance node—for example, an imaging diagnostic text describing the maximum diameter of a liver lesion as 3 cm, while a surgical record text states the maximum diameter of the lesion at the time of resection as 4 cm—the system will immediately obtain the preset confidence weights for different attributes from each source type. These confidence weights are stored in a preset configuration table and are pre-set based on the clinical characteristics of different medical documents. For example, for the lesion size attribute, the configuration table sets the confidence weights for different attributes for each source type. The confidence weight of the recorded text is the highest, followed by the image diagnosis text. For the pathological classification attribute, the confidence weight of the pathology report text is set to be the highest. Considering that surgical visual measurements are usually more accurate in terms of size attributes, the system will assign a higher confidence weight to the surgical record text in this attribute. Finally, based on these confidence weights, the conflicting attribute features are scientifically weighted and fused, with high-confidence features as the main force to correct and update the context features, thereby effectively eliminating information contradictions in multi-source medical data and ensuring that the finally extracted context features can truly, accurately and comprehensively reflect the patient's clinical status. Example

[0029] As a preferred embodiment of the present invention, based on Example 1, and in conjunction with contextual features, attribute alignment and referential resolution are performed on multiple lesion instance nodes, including: Identify relative descriptive terms, absolute measurement values, and lesion types for lesion instance nodes from medical texts; The absolute measurement values ​​are used as attribute features and attached to the corresponding lesion instance nodes respectively. Based on the magnitude of the absolute measurement values, multiple lesion instance nodes of the same lesion type are locally sorted to generate an instance sequence; The relative pronouns are mapped to position indices in the instance sequence, and the spatial region alignment of the corresponding lesion instance nodes is completed based on the position indices.

[0030] Specifically, after acquiring the contextual features obtained from the aforementioned processing, the electronic device first uses a natural language processing model to accurately identify the relative descriptive terms, absolute measurement values, and lesion types for each lesion instance node from the medical text. For example, in a scenario where the text describes multiple liver cysts, with the largest one having a diameter of about 5 centimeters, the system will extract the largest one as a relative descriptive term, extract 5 centimeters as an absolute measurement value, and identify the cyst as the lesion type. Subsequently, the system will use the extracted absolute measurement values ​​as key attribute features and accurately attach them to the corresponding lesion instance nodes, thereby providing quantitative data support for subsequent comparison and resolution.

[0031] Furthermore, after feature mounting, the system performs local sorting on multiple lesion instance nodes belonging to the same lesion type according to the size of their absolute measurement values, thereby generating an instance sequence arranged by size. Based on this, the system maps the previously extracted relative referential descriptors to specific position indices in the instance sequence. For example, the larger one is mapped to the first position index in the descending order of the instance sequence. Finally, the system accurately locates the corresponding lesion instance node based on the position index and completes the spatial region alignment of the corresponding lesion instance node by combining it with the aforementioned anatomical region nodes. This process effectively solves the problem of entity confusion caused by ambiguous referencing in medical texts, ensures accurate matching of lesion features and spatial locations under complex clinical descriptions, and significantly improves the accuracy of structured data and the intelligence level of the system. Example

[0032] As a preferred embodiment of the present invention, based on Example 1, the attribute-aligned lesion instance nodes and the corresponding anatomical region nodes are assembled into key-value pairs according to a preset liver, gallbladder, and pancreatic disease data paradigm to generate and output target structured text data, including: Traverse the lesion instance nodes that have completed attribute alignment and check whether there are any isolated lesion nodes with empty anatomical region attributes. If it exists, extract the surgical operation entity from the medical text and query the mapping rules between surgical operations and anatomical regions in the hepatobiliary and pancreatic anatomy topology knowledge base; Based on the mapping rules, the implicit anatomical region corresponding to the surgical operation entity is inversely deduced, and the implicit anatomical region is assigned to the isolated lesion node. All lesion instance nodes and their attributes are converted into JSON key-value pairs, and then nested and assembled according to the hierarchical structure of the liver, gallbladder and pancreas disease data paradigm to output the target structured text data.

[0033] Specifically, after obtaining the aforementioned processing results, the electronic device will first comprehensively traverse the lesion instance nodes that have completed attribute alignment in order to meticulously detect whether there are isolated lesion nodes with empty anatomical region attributes. If such isolated lesion nodes are found during the traversal, the system will immediately extract the relevant surgical operation entities from the original medical text and simultaneously query the mapping rules between surgical operations and anatomical regions in the pre-built hepatobiliary and pancreatic anatomy topology knowledge base. These mapping rules are a priori medical dictionary stored in the form of key-value pairs, which records the unique or multiple binding relationships between specific surgical verbs and target organs. For example, when a medical text only records that a 2-cm gallstone was found during a cholecystectomy without specifying the exact location of the gallstone, the gallstone is an isolated lesion node lacking location information. The system will extract the surgical operation entity of cholecystectomy and, based on the fixed mapping rule in the knowledge base that "if 'cholecystectomy' is included, then the implicit anatomical region must be 'gallbladder'", it will inversely deduce that the implicit anatomical region corresponding to the surgical operation entity is the gallbladder. Subsequently, the system will accurately assign the deduced implicit anatomical region to the isolated lesion node, thereby effectively supplementing the spatial location information missing in the clinical record due to omitted expressions.

[0034] Furthermore, after completing the information completion and attribute alignment for all nodes, the system will uniformly convert all lesion instance nodes and their attributes into JSON format key-value pairs, strictly following the format as follows: Figure 3 The hierarchical structure of the pre-defined hepatobiliary and pancreatic disease data paradigm (such as the CDM general data model) is deeply nested and assembled, organizing information such as lesion type, size, and corresponding anatomical region in a unified data framework. This ultimately generates and smoothly outputs the target structured text data. This complete workflow not only completely eliminates information gaps caused by implicit expressions in medical texts, but also ensures the standardization and normalization of output data, providing high-quality and highly structured underlying data support for subsequent clinical auxiliary diagnosis, medical statistical analysis, and the efficient construction of disease databases. Example

[0035] like Figure 4As shown in the figure, an embodiment of the present invention provides a medical text structuring system for hepatobiliary and pancreatic diseases based on natural language processing. The system includes: The entity extraction module is used to acquire medical texts related to hepatobiliary and pancreatic diseases to be processed, extract entities from the medical texts to obtain an initial entity set, which includes lesion entities, anatomical region entities, and quantity descriptive words. The topology subgraph construction module is used to perform regional spatial mapping on the anatomical entities in the initial entity set based on a preset hepatobiliary and pancreatic anatomical topology knowledge base, and construct a three-dimensional topology subgraph representing the spatial adjacency relationship of liver segments and pancreatic parts. The instance expansion module is used to expand the lesion entity into multiple independent lesion instance nodes based on the quantity descriptors in the initial entity set. The attribute alignment and resolution module is used to extract contextual features from medical texts, calculate the semantic dependency distance between lesion instance nodes and nodes of each anatomical region in the 3D topological subgraph, and combine contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes. The structured data generation module is used to assemble the attribute-aligned lesion instance nodes and the corresponding anatomical region nodes according to the preset liver, gallbladder and pancreas disease data paradigm into key-value pairs, and generate and output the target structured text data. Example

[0036] An electronic device, comprising a memory and a processor; Memory, used to store computer programs; The processor is used to implement the above-described method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing when executing computer programs. Example

[0037] A computer-readable storage medium storing a computer program, which, when read and run by a processor, implements the above-mentioned method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing.

[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for structuring medical texts related to hepatobiliary and pancreatic diseases based on natural language processing, characterized in that... The method includes: Obtain the medical text for liver, gallbladder and pancreas diseases to be processed, extract entities from the medical text to obtain an initial entity set, which includes lesion entities, anatomical region entities and quantity descriptive words; Based on a pre-defined hepatobiliary and pancreatic anatomical topology knowledge base, the anatomical region entities in the initial entity set are spatially mapped to different regions to construct a three-dimensional topological subgraph representing the spatial adjacency relationship of liver segments and pancreatic sites. Based on the quantity descriptors in the initial entity set, the lesion entity is expanded into multiple independent lesion instance nodes by dividing the quantity of instances. Extract the contextual features of the medical text, calculate the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph, and combine the contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes; The lesion instance nodes with completed attribute alignment and the corresponding anatomical region nodes are assembled into key-value pairs according to the preset liver, gallbladder and pancreas disease data paradigm to generate and output the target structured text data.

2. The method according to claim 1, characterized in that, The aforementioned knowledge base of hepatobiliary and pancreatic anatomy topology performs regional spatial mapping on the anatomical entities in the initial entity set, constructing a three-dimensional topological subgraph representing the spatial adjacency relationships of liver segments and pancreatic sites, including: The anatomical region entities are analyzed to separate standard anatomical roots and spatial location modifiers; Map the standard anatomical terminology to standard three-dimensional coordinate nodes in the hepatobiliary and pancreatic anatomy topology knowledge base; When the spatial orientation modifier is identified as spanning the boundary region of multiple standard anatomical roots, virtual boundary nodes are generated between the corresponding standard three-dimensional coordinate nodes. Based on the semantic weights of the spatial orientation modifiers, topological connection edges and distance penalty coefficients are assigned to the virtual boundary nodes to generate the three-dimensional topological subgraph.

3. The method according to claim 1, characterized in that, The step involves expanding the lesion entity into multiple independent lesion instance nodes by dividing the number of instances based on the quantity descriptors in the initial entity set, including: The quantity descriptive words are quantified and classified to determine whether they belong to precise numerical type or fuzzy quantity word type; If the value is a precise numerical type, then the corresponding number of independent lesion instance nodes will be directly copied and generated according to the numerical value. If it is a fuzzy quantifier type, then extract the morphological distribution feature words associated with the lesion entity from the medical text; Based on the discreteness of the morphological distribution feature words, a cluster of lesion nodes containing a dynamic number of placeholders is generated, and the cluster of lesion nodes is used as a whole in subsequent attribute alignment.

4. The method according to claim 1, characterized in that, The calculation of the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph includes: The medical text is subjected to syntactic analysis to generate a syntactic dependency tree representing the modification relationships between words; Align the nodes of the syntactic dependency tree with the anatomical region nodes in the three-dimensional topological subgraph to construct a text-space heterogeneous graph; Perform graph convolution operation on the text-spatial heterogeneous graph so that the lesion instance node absorbs the neighbor features of the lesion instance node on the syntactic path and the spatial topological path; Calculate the cosine similarity of feature vectors between the lesion instance nodes and the nodes of each anatomical region after feature aggregation, and convert the cosine similarity of feature vectors into the semantic dependency distance.

5. The method according to claim 1, characterized in that, The extraction of contextual features from the medical text includes: Identify the source type of the medical text, which includes at least image diagnostic text, surgical record text, and pathology report text; Based on the source type, a pre-trained type-specific attention mask is invoked to extract contextual features from the medical text, thereby obtaining contextual features; When medical texts from different sources extract conflicting attribute features for the same lesion instance node, the preset confidence weights for each source type for different attributes are obtained. The conflicting attribute features are weighted and fused based on the confidence weights to update the context features.

6. The method according to claim 1, characterized in that, The step of combining the contextual features to perform attribute alignment and referential resolution on multiple lesion instance nodes includes: Identify relative descriptive terms, absolute measurement values, and lesion types for the lesion instance nodes from the medical text; The absolute measurement values ​​are used as attribute features and respectively attached to the corresponding lesion instance nodes; Based on the magnitude of the absolute measurement value, multiple lesion instance nodes of the same lesion type are locally sorted to generate an instance sequence; The relative descriptive terms are mapped to position indices in the instance sequence, and the spatial region alignment of the corresponding lesion instance nodes is completed based on the position indices.

7. The method according to claim 1, characterized in that, The lesion instance nodes with completed attribute alignment and the corresponding anatomical region nodes are assembled into key-value pairs according to a preset hepatobiliary and pancreatic disease data paradigm to generate and output target structured text data, including: Traverse the lesion instance nodes that have completed attribute alignment and check whether there are any isolated lesion nodes with empty anatomical region attributes. If it exists, extract the surgical operation entity from the medical text and query the mapping rules between the surgical operation and the anatomical region in the hepatobiliary and pancreatic anatomy topology knowledge base; Based on the mapping rules, the implicit anatomical region corresponding to the surgical operation entity is deduced in reverse, and the implicit anatomical region is assigned to the isolated lesion node. All lesion instance nodes and their attributes are converted into JSON key-value pairs, and then nested and assembled according to the hierarchical structure of the liver, gallbladder and pancreas disease data paradigm to output the target structured text data.

8. A structured text processing system for medical conditions related to hepatobiliary and pancreatic diseases based on natural language processing, characterized in that... The system includes: The entity extraction module is used to acquire medical texts related to liver, gallbladder and pancreas diseases to be processed, and to extract entities from the medical texts to obtain an initial entity set. The initial entity set includes lesion entities, anatomical region entities and quantity descriptive words. The topology subgraph construction module is used to perform regional spatial mapping on the anatomical entities in the initial entity set based on a preset hepatobiliary and pancreatic anatomical topology knowledge base, and construct a three-dimensional topology subgraph representing the spatial adjacency relationship of liver segments and pancreatic sites. The instance expansion module is used to expand the lesion entity into multiple independent lesion instance nodes by dividing the number of instances based on the quantity descriptors in the initial entity set. The attribute alignment and resolution module is used to extract the context features of the medical text, calculate the semantic dependency distance between the lesion instance node and each anatomical region node in the three-dimensional topological subgraph, and combine the context features to perform attribute alignment and referential resolution on multiple lesion instance nodes. The structured data generation module is used to assemble the attribute-aligned lesion instance nodes and the corresponding anatomical region nodes according to the preset liver, gallbladder and pancreas disease data paradigm into key-value pairs, and generate and output the target structured text data.

9. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the method for structuring medical texts for liver, gallbladder, and pancreas diseases based on natural language processing as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when read and run by a processor, implements the method for structuring medical texts for liver, gallbladder, and pancreas diseases based on natural language processing as described in any one of claims 1-7.