Information extraction method, device and equipment for medical text and medium

By using modular column topic adapters and topic adaptation mechanisms, the simultaneous optimization of entity recognition and relation extraction in medical texts is achieved, solving the problems of semantic inconsistency and low degree of structuring in existing technologies, improving the accuracy and consistency of information extraction, and generating directly usable structured data.

CN121528577AActive Publication Date: 2026-02-13BEIJING YIYONG TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202610032826.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-02-13
Estimated Expiration
2046-01-12

AI Technical Summary

Technical Problem

Existing technologies for automatically extracting highly structured information from medical texts suffer from semantic inconsistencies, weak topic generalization capabilities, and low levels of structuring. In particular, they struggle to accurately extract entities and relationships for specific topics in oncology clinical research and data governance.

Method used

It adopts a modular column topic adapter and topic adaptation mechanism, performs entity recognition and relationship extraction in parallel through a neural network model, and performs joint training by combining a multi-task loss function to dynamically adjust the focus of feature extraction and generate an information set that conforms to a predetermined structured format.

Benefits of technology

It significantly improves the accuracy and semantic consistency of information extraction under different column themes, generating high-quality structured data that can be directly used for clinical decision-making or scientific research analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121528577A_ABST
    Figure CN121528577A_ABST
Patent Text Reader

Abstract

The invention provides an information extraction method and device for a medical text, equipment and a medium. The method comprises the following steps: coding a medical text by using a coding network to obtain a context vector sequence of the medical text; determining an adapter to be activated from a neural network model comprising a plurality of adapters; using the adapter to inject information of column themes of the medical text into the context vector sequence to obtain an optimized feature vector; performing entity identification on the optimized feature vector, and predicting a relationship type between each entity pair in the identified entities; and outputting an information set with a predetermined structured format based on the identified entity and the predicted relationship type, each column topic having a corresponding topic representative vector, the method further comprising: obtaining a numerical vector of the medical text; and according to the text semantic similarity between the numerical value vector and the theme representative vector corresponding to each column theme, determining the theme representative vector closest to the numerical value vector, and determining the column theme of the medical text.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of data processing, and in particular, to a medical text information extraction method, device and equipment, and a non-transitory computer readable storage medium. BACKGROUND

[0002] In the current medical artificial intelligence and natural language processing technology field, data processing and structuring in medical text represented by electronic medical record data, especially tumor specialty electronic medical record data, has always been a major difficulty in the development of medical informatization. In clinical research and data governance in, for example, oncology, automatically extracting highly structured information from medical text such as free-text medical records is a basic and key task.

[0003] Therefore, accurately automatically extracting highly structured information from medical text is a problem to be solved. SUMMARY

[0004] According to an aspect of the present application, a medical text information extraction method is provided, which comprises: encoding the medical text using an encoding network to obtain a context vector sequence of the medical text; determining an activated adapter from a neural network model comprising a plurality of adapters based on a target column topic of the medical text, wherein each of the plurality of adapters corresponds to a column topic; injecting information of the target column topic of the medical text into the context vector sequence using the activated adapter to obtain an optimized feature vector; performing entity recognition on the optimized feature vector and predicting the relationship type between each pair of entities in the recognized entities; and outputting an information set with a predetermined structured format based on the recognized entities and the predicted relationship type, wherein each column topic has a corresponding topic representative vector, and wherein the information extraction method further comprises: obtaining a numerical vector of the medical text; and determining the closest topic representative vector of the numerical vector according to the text semantic similarity between the numerical vector and the topic representative vector corresponding to each column topic, and determining the target column topic of the medical text according to the closest topic representative vector.

[0005] According to an embodiment of the present application, the topic representative vector corresponding to each column topic is obtained by: obtaining a plurality of groups by grouping a plurality of reference medical texts, each group comprising reference medical texts having the same column topic; and extracting an average vector for each group as the topic representative vector corresponding to the column topic of the group.

[0006] According to an embodiment of the present application, the entity recognition is performed on the optimized feature vector by using an entity recognition model, and the relationship between entities is extracted by using a relationship extraction model.

[0007] According to an embodiment of the present application, the method further comprises: decoding, for the optimized feature vector, entities by using the entity recognition model and adopting a pointer network or a conditional random field (CRF) decoder, and predicting, for each identified entity, a relationship between the entity and other identified entities by using a relationship extraction model.

[0008] According to an embodiment of the present application, predicting, for each identified entity, a relationship between the entity and other identified entities by using a relationship extraction model comprises: constructing an n*n matrix, where n is a sequence length corresponding to the optimized feature vector; and taking each entity identified for the optimized feature vector as a main diagonal element and a boundary of the matrix, and taking a relationship type simultaneously predicted for the currently identified entity and each previously identified entity as a non-diagonal element of the matrix.

[0009] According to an embodiment of the present application, the information extraction method further comprises: obtaining a training sample set, wherein each training sample in the training sample set comprises an entity label and a relationship label between entities; dividing the training sample set to obtain a plurality of sample subsets, wherein each sample subset comprises training samples with a same topic label (column topic); based on a positive sample set and a negative sample set of each training sample, performing contrastive learning and determining a contrastive loss as a first loss associated with the neural network model; based on a training optimized feature vector corresponding to each training sample and the training sample comprising an entity label, determining a second loss associated with the entity recognition model by using a span-based NER method; based on a predicted relationship of each entity pair in the identified entities of each training sample or each entity pair corresponding to the included entity labels and a corresponding relationship label, determining a third loss associated with the relationship extraction model; and based on the first loss, the second loss and the third loss, constructing a multi-task loss function to jointly train the neural network model, the entity recognition model and the relationship extraction model.

[0010] According to an embodiment of the present application, wherein dividing the training sample set to obtain a plurality of sample subsets comprises: clustering each medical text included in the training sample set by using a clustering algorithm to obtain a plurality of training sample clusters, wherein for each training sample, training samples under a topic label (column topic) to which the training sample belongs belong to a positive sample set of the training sample, and training samples under other topic labels (column topics) belong to a negative sample set of the training sample.

[0011] According to an embodiment of the present application, the multi-task loss function is constructed to jointly train the neural network model, the entity recognition model and the relation extraction model, including: for different training samples in the training sample set, alternately performing the following steps: fixing the parameters of the neural network model, adjusting the parameters of the entity recognition model and the relation extraction model to minimize the total loss value of the multi-task loss function; and fixing the parameters of the entity recognition model and the relation extraction model, adjusting the parameters of the neural network model to minimize the total loss value of the multi-task loss function.

[0012] According to an embodiment of the present application, the neural network model includes a plurality of sub-neural networks, each corresponding to an adapter, wherein the information extraction method further comprises: after training the neural network model, training an additional sub-neural network corresponding to an additional adapter, the additional adapter corresponding to a new column topic.

[0013] According to an embodiment of the present application, the predetermined structured format is JSON format.

[0014] According to an embodiment of the present application, wherein the medical text includes medical history text of a tumor patient, and wherein the plurality of adapters include a treatment adapter, an examination adapter and a TNM staging adapter corresponding to column topics of treatment, examination and TNM staging, respectively.

[0015] According to another aspect of the present application, an information extraction device for medical text is also provided, including: an encoding module configured to encode the medical text using an encoding network to obtain a context vector sequence of the medical text; an optimization module configured to: determine an activated adapter from a neural network model including a plurality of adapters based on a target column topic of the medical text, wherein each of the plurality of adapters corresponds to a column topic; and inject information of the target column topic of the medical text into the context vector sequence using the activated adapter to obtain an optimized feature vector; an identification and prediction module configured to perform entity recognition on the optimized feature vector and predict relationships between each pair of entities in the recognized entities; and an output module configured to output an information set having a predetermined structured format based on the recognized entities and the predicted relationship types, wherein each column topic has a corresponding topic representative vector, and wherein the optimization module is further configured to: obtain a numerical vector of the medical text; and determine a closest topic representative vector of the numerical vector according to a text semantic similarity between the numerical vector and the topic representative vector corresponding to each column topic, and determine the target column topic of the medical text according to the closest topic representative vector.

[0016] According to an embodiment of the present application, the information extraction device further comprises a training module configured to: obtain a training sample set, wherein each training sample in the training sample set comprises an entity label and a relationship label between entities; divide the training sample set to obtain a plurality of sample subsets, wherein each sample subset comprises training samples with the same topic label (column topic); based on the positive sample set and the negative sample set of each training sample, perform contrastive learning and determine a contrastive loss as a first loss associated with the neural network model; based on the training optimization feature vector corresponding to each training sample and the entity label included in the training sample, determine a second loss associated with the entity recognition model using a span-based NER method; for each entity pair in the identified entities of each training sample or each entity pair corresponding to the included entity label, based on the predicted relationship of the entity pair and the corresponding relationship label, determine a third loss associated with the relationship extraction model; and based on the first loss, the second loss and the third loss, construct a multi-task loss function to jointly train the neural network model, the entity recognition model and the relationship extraction model.

[0017] According to another aspect of the present application, a computing device is also provided, comprising: one or more processors; and one or more memories having stored thereon a computer program that, when executed by the one or more processors, causes the one or more processors to perform the information extraction method as described above.

[0018] According to another aspect of the present application, a non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by one or more processors, causes the one or more processors to perform the information extraction method as described above.

[0019] According to the information extraction scheme for medical text according to the embodiments of the present application, by designing a modular column topic adapter, a topic self-adaptation mechanism is introduced, and the synchronization optimization of entity recognition and relationship extraction is realized, so that the model can dynamically adjust its feature extraction focus according to the topic of the target column topic, thereby significantly improving the accuracy and semantic consistency of information extraction under different column topics. In addition, by the above-mentioned joint training of the three models, the corresponding column topic adapter can be selected or weighted for the training sample during training, and an adapter dedicated to the column topic can be generated. In addition, by using a multi-task loss function for joint optimization, these models are forced to learn a consistent representation that is beneficial to both entity recognition and relationship extraction tasks in addition to generating adapters. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1An exemplary system architecture block diagram to which the technical solutions of the present application are applied is schematically shown.

[0021] Figure 2 A flowchart of an information extraction method for medical text according to an embodiment of the present application is shown.

[0022] Figure 3A A schematic flowchart of a method for determining a relationship type based on table filling is shown.

[0023] Figure 3B An architecture schematic diagram of an example (for tumor medical record text) using an information extraction method for medical text according to an embodiment of the present application is shown.

[0024] Figure 4 A flowchart of a joint training method according to an embodiment of the present application is shown.

[0025] Figure 5 An exemplary block diagram of an information extraction device according to an embodiment of the present application is shown.

[0026] Figure 6 A structural block diagram of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] The technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present disclosure.

[0028] As described previously, in clinical research and data governance in oncology, for example, it is a basic and key task to automatically extract highly structured information from medical text such as free-text medical records. In addition, these information is usually around specific clinical column topics, such as "examination and inspection", "tumor staging", "surgical treatment", "drug treatment", "pathological examination", etc., so it is an urgent problem to accurately automatically extract highly structured information from medical text.

[0029] Currently, the mainstream solutions have significant technical bottlenecks:

[0030] 1) Semantic inconsistency caused by task separation: Existing technologies usually adopt a pipeline architecture. First, entity recognition (NER) is performed using a model (such as a sequence labeling model) to identify entities such as "tumor size", "lymph node location", "drug name", etc. Then, another model (such as a relation classification model) is used for relation extraction (RE) to determine the relationship between entities (such as the "drug-adverse reaction" relationship). This separation design is prone to error accumulation and semantic conflicts. In addition, the entity recognition model may not identify certain entities, and the network relationship between multiple entity nodes is complex. For example, the entity recognition model may correctly identify the "paclitaxel" and "neutropenia" entities, but the relation extraction model fails to extract the "causes" relationship between the two, or worse, extracts the wrong "treatment" relationship, so the correct semantics should be that "paclitaxel" causes "neutropenia", but the correct relationship is not extracted, or the final generated semantics is that "paclitaxel" is used to treat "neutropenia", that is, the final generated "drug treatment" column topic content and "adverse reaction" column topic content cannot correspond in semantics, so the data quality is low.

[0031] 2) Weak topic generalization ability: Existing information extraction models are usually general-purpose and lack the ability to perceive and adapt to specific clinical column topics. A model is trained to extract all types of entities and relationships corresponding to specific clinical column topics, but when it comes to the "tumor stage" column topic, it may not be able to fully focus on key entities such as stage (T), lymph node (N), and distant metastasis (M) and their complex combination rules, resulting in a significant decline in performance in complex scenarios (such as new cancer types and non-standard expressions). The model cannot dynamically adjust its focus according to the topic of the column topic.

[0032] 3) Low degree of structuring: The separation method only generates discrete entity and relationship triples (i.e., entity 1, entity 2, relationship type), which is difficult to directly form high-quality structured column topics that can be directly used for clinical decision-making or scientific analysis, and requires a large number of post-processing rules to assemble into a usable format, which is cumbersome and has high maintenance costs.

[0033] Therefore, embodiments of the present disclosure provide a new method that can deeply integrate column topic semantics and achieve end-to-end integrated modeling to improve the accuracy, consistency, and usability of structured information extraction in medical text.

[0034] It should be noted that the patient user information and data (including but not limited to data from various data sources for analysis, stored data, displayed data, etc.) involved in the present application are information and data authorized by the patient user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards, and provide corresponding operation portal for the patient user to choose authorization or rejection.

[0035] Figure 1 An exemplary system architecture block diagram to which the technical solutions of the present application are applied is schematically shown.

[0036] As shown in Figure 1 , the system architecture 100 can include a terminal device 110, a network 120 and a server 130. The terminal device 110 can include various electronic devices such as smartphones, tablets, notebooks, desktop computers, etc. The server 130 can be a standalone physical server, or a server cluster or distributed device composed of multiple physical servers, or a cloud server providing cloud computing services. The network 120 can be various connection type communication media capable of providing communication links between the terminal device 110 and the server 130, such as wired communication links or wireless communication links.

[0037] According to the implementation needs, the system architecture in the embodiments of the present application can have any number of terminal devices, networks and servers. For example, the server 130 can be a server group composed of multiple server devices. In addition, the technical solutions provided by the embodiments of the present application can be applied to the terminal device 110, or can be applied to the server 130, or can be jointly implemented by the terminal device 110 and the server 130, and the present application does not make special limitations on this.

[0038] For example, the server 130 can perform the information extraction method for medical text provided by the present application, for example, receive the medical history text of a tumor patient input by a doctor through the terminal device 110 from the terminal device 110 via the network 120 or obtain the stored medical history text from the storage device, accurately identify each entity in the medical history text and extract the relationship type between each entity pair, and return the identified entity and the relationship type between the entity pairs to the terminal device 110. In addition, since the information extraction method also involves various neural network models, the server 130 can also train and update the various neural network models to use the trained various models for information extraction of the current medical text. In addition, in other embodiments, the information extraction method can be performed at the terminal device 110, for example, in the case that the terminal device 110 has sufficient computing and processing capabilities, and the terminal device 110 can obtain the trained various models from the server via the network, and after obtaining the medical history text input by the doctor, locally perform information extraction thereon.

[0039] The method 200 shown in FIG. 2 can be performed by Figures 2 to 5 The specific details of the scheme for predicting the survival period of a tumor patient according to the embodiments of the present application are further described.

[0040] Figure 2 The flowchart of the information extraction method for medical text according to the embodiments of the present application is shown. Figure 2 The method 200 shown in FIG. 2 can be performed by Figure 1 The terminal device or the server shown in FIG. 2.

[0041] As Figure 2 As shown in step S210, the medical text is encoded by using an encoding network to obtain a context vector sequence of the medical text.

[0042] For example, the encoding network can be a pre-trained language model such as BERT, BioBERT, ClinicalBERT model, etc., which serves as a shared foundation for all medical texts and is responsible for deep semantic encoding of the input medical text (such as the original medical history text of a tumor patient), obtaining the context-aware vector representation of each token, and thus obtaining the context vector sequence converted by each token of the corresponding medical text. For each medical text, the sequence length of the context vector sequence is the number of tokens. The concept of tokenization is simple, which divides continuous natural language text into finer processing units, i.e., tokens. The encoding network can further encode each token respectively, and can convert the natural language text into a numerical representation, thereby facilitating the processing and training of neural network models such as deep learning models.

[0043] In step S220, based on the target column topic of the medical text, an adapter to be activated is determined from a neural network model comprising a plurality of adapters, each of which corresponds to a column topic, and the activated adapter is used to inject information of the column topic of the medical text into the context vector sequence, to obtain an optimized feature vector.

[0044] Optionally, the neural network model can comprise a set of lightweight, pluggable sub-neural networks (such as multi-layer perceptron, specific attention layers or vectors (e.g. MOE mixed expert model)), and each adapter / sub-neural network corresponds to a specific column topic. As an example, the medical text can comprise medical record text of a tumor patient, at which time the plurality of adapters comprises a treatment adapter, an examination adapter and a TNM staging adapter corresponding to the column topics of treatment, examination and TNM staging respectively.

[0045] As described above, each adapter corresponds to a sub-neural network (such as multi-layer perceptron, specific attention layers or vectors (e.g. MOE mixed expert model)), and after the neural network model is trained and used for inference, if a new column topic (such as "gene detection") is subsequently required, only a new lightweight adapter needs to be trained for the column topic, without the need to retrain the entire neural network model, which greatly reduces the expansion cost and deployment difficulty.

[0046] According to an embodiment, each column topic has a corresponding topic representative vector, so based on the medical text of the target column topic (such as "drug treatment") currently required for information extraction, for example, by referring to an external control signal indicating the relevant information of each column topic or the indication information of the target column topic, the corresponding adapter is activated to transform the context vector sequence obtained after the medical text is encoded by the encoding network, to output a feature vector rich in column topic information, i.e. an optimized feature vector. That is, the feature vector processed by the adapter contains the information of the corresponding target column topic, for example, by injecting prior knowledge and topic preferences of a specific column topic into the context vector sequence output by the encoding network, which helps to optimize the subsequent information extraction process (such as entity recognition, relation extraction and structured text output process). For example, after learning, the "TNM staging adapter" will pay more attention to the words and context patterns related to tumor size, number of lymph nodes and metastatic sites.

[0047] Optionally, the indication information of the target column theme can be selection information input by the user. For example, model parameters of each different adapter can be stored after training and correspond to different identifiers respectively. The user inputs the identifier of the selected adapter through the input device. The selection information is converted into data information that can be recognized by the neural network model, so that the model can determine the current target column theme and activate the corresponding adapter. For example, the doctor can input the indication information of the corresponding column theme, i.e., the adapter, through the input interface of the terminal device 110.

[0048] In some other examples, the external control signal indicating the relevant information of each column theme can be a control vector, such as a theme representative vector of each column theme obtained by clustering, and the adapter to be activated is determined automatically based on the control vector. For example, each of the plurality of adapters corresponds to a theme representative vector, so that a numerical vector of the medical text can be obtained, and then the theme representative vector closest to the numerical vector is determined according to the text semantic similarity between the numerical vector and each theme representative vector, and the column theme of the medical text is determined according to the closest theme representative vector, so as to determine the selected adapter. As an example, a plurality of groups are obtained by grouping a plurality of reference medical texts, each group including reference medical texts having the same column theme; and an average vector is extracted from each group as a theme representative vector of the group, and corresponds to an adapter. For example, a plurality of clusters are obtained by clustering analysis on historical reference medical texts to form a cluster set. For example, an unsupervised clustering algorithm (such as K-Means, DBSCAN, or semantic clustering based on a pre-trained model such as BERT) can be used to cluster all reference medical texts, and a representative vector in the cluster is extracted to represent the theme connotation, i.e., to obtain a theme representative vector of each cluster. Each cluster in the cluster set includes texts having the same or similar theme or style, and an average vector is extracted from each cluster as a theme representative vector of the cluster.

[0049] For example, for the current medical text, the current medical text can be converted into a numerical vector, for example, using a TF-IDF or Sentence-BERT model, etc. Then, it is grouped into a corresponding group according to the text semantic similarity (such as cosine similarity, etc.), and the adapter to be activated is determined according to the corresponding group.

[0050] Optionally, in other embodiments, there can be more than one adapter that can be activated for a medical text, for example in the case of certain column topics, and different adapters can be assigned different weights. In this case, the final optimized feature vector can be obtained by processing the feature vectors of the medical text after the context vector sequence is processed by the two or more activated adapters respectively (for example by averaging or weighted processing).

[0051] In step S230, entity recognition is performed on the optimized feature vector, and the relationship types between each pair of entities in the recognized entities are predicted.

[0052] For example, in some implementations, the relationship between the entity pairs of the identified entities can be simply re-identified after all the entities are identified. Since the optimized feature vector has injected specific column topic related information, the accuracy of the identification and prediction can also be improved to some extent. However, this case is generally inefficient and there is still a possibility of identification error. Therefore, in other embodiments of the present application, entity recognition using an entity recognition model and extraction of relationship types between entities using a relationship extraction model are performed in parallel for the optimized feature vector.

[0053] The entity recognition model and the relationship extraction model can use the currently widely used models, and since the operations of the entity recognition model and the relationship extraction model are parallel in the embodiments of the present application, the entity recognition model and the relationship extraction model are considered to jointly constitute an integrated joint decoding network, and the integrated joint decoding network includes an entity recognition head and a relationship extraction head. The entity recognition head can use, for example, a pointer network or a conditional random field (CRF) decoder to decode all column topic related entities simultaneously based on the feature vector injected with the topic information of the column topic (i.e. the optimized feature vector), while the relationship extraction head can predict the relationship of the entity with other identified entities at the same time as the entity recognition head identifies an entity. In this way, through such a cascading decoding method, the decoding efficiency can be improved and the accuracy of the relationship types between the decoded entities can be improved.

[0054] Optionally, joint decoding can be performed by table filling. For example, an n x n matrix is constructed, where n is the sequence length corresponding to the optimized feature vector. The sequence length corresponding to the optimized feature vector can actually be considered as the sequence length of the context vector sequence or the number of word pieces. Then, each entity identified for the optimized feature vector is taken as the main diagonal element and the boundary of the matrix, and the relationship type between the currently identified entity and each previously identified entity predicted at the same time is taken as the non-diagonal element of the matrix.

[0055] For example, Figure 3AA schematic flowchart is shown for determining the type of relationship based on a table-filling method, which includes processes 1 to 6 in sequence, corresponding to reference numerals 301-306 respectively.

[0056] like Figure 3A As shown, after obtaining the optimized feature vector in process 1, an n×n relation matrix is ​​constructed in process 2. Then, joint prediction is initiated based on the relation table in process 3. In process 4, the entity type and boundary are predicted for the main diagonal cell element (i, j), for example, the entity type is B-Tumor. Alternatively, if no entity is identified for the current word (the part of the optimized feature vector corresponding to the word), the corresponding diagonal element is filled with a specific symbol (e.g., O) as the boundary. In process 5, the relation type between the current word i and the previously identified word j is predicted for the off-diagonal cell element (i, j), and the relation type between the currently identified entity (if the current word i corresponds to an entity) and the previously identified entity is predicted accordingly. For example, the relation type can be SizeOf, or if there is no relation, it can be represented as None. Then, in process 6, the relation types between all identified entities and the predicted entity pairs are combined to output the final result.

[0057] In step S240, based on the identified entities and the predicted relationship types, an information set with a predetermined structured format is output.

[0058] For example, the output is no longer isolated entities and relations, but directly forms a structured result set for the selected adapter's corresponding category topic. This results in highly structured, semantically consistent category topic data that can be directly imported into a database or applied to downstream tasks. For instance, for the category topic "Drug Treatment," a structured object like {Drug: Paclitaxel, Dosage: 175mg / m2, Frequency: Every three weeks, AND: [Carboplatin, AUC=5]} can be directly output.

[0059] Optionally, the predefined structured format can be JSON or other formats.

[0060] For example, as a concrete example, let's take the generation of an information set for the "TNM staging" section from a medical record text.

[0061] In this example, the doctor can, for example, through Figure 1 The terminal device 110 shown can input text or select the following medical record text from the stored historical text: "...microscopic examination revealed a tumor with a maximum diameter of 3.5 cm, infiltrating into the parietal pleura; 5 / 15 lymph nodes were detected with cancer metastasis; preoperative CT showed no signs of distant metastasis...".

[0062] After processing the medical record text and obtaining its topic representative vector (i.e., external control signal), the activation of the "TNM staging adapter" can be determined based on the topic representative vector.

[0063] The “TNM staging adapter” can obtain optimized feature vectors from the encoded context vector sequence of the medical record text, such as topic and preference information related to TNM staging.

[0064] Next, the entity recognition and relation extraction models jointly decode the optimized feature vector. For example, the entity recognition model simultaneously identifies the entities: tumor size: 3.5cm (T), lymph nodes: 5 / 15 (N), distant metastasis: none (M).

[0065] The relation extraction model, based on the table filling method, simultaneously predicts the following relations: (3.5cm, ->SizeOf->, Tumor), (5 / 15, ->PositiveFor->, Lymph Node), (None, ->NegativeFor->, Metastasis).

[0066] Structured output: Ultimately, structured JSON output is directly generated.

[0067] json

[0068] {

[0069] "T_stage": "T3",

[0070] "N_stage": "N2",

[0071] "M_stage": "M0",

[0072] "evidence": {

[0073] "T": "Tumor maximum diameter 3.5cm, infiltrating into the parietal pleura",

[0074] "N": "5 out of 15 lymph nodes were detected with cancer metastasis".

[0075] "M": Preoperative CT scan showed no signs of distant metastasis.

[0076] }

[0077] }

[0078] In contrast, if the traditional pipeline solution is adopted, i.e., the tasks of entity recognition and relation extraction are completely separated, the entity recognition model NER can correctly identify all entities, but the relation extraction model RE can mistakenly associate the "no" that should exist a relationship with the entity "distant transfer" with the entity "lymph node".

[0079] However, the embodiments of the present application can effectively avoid such errors and ensure the accurate matching of "T", "N" and "M" evidence by joint learning and focusing on the "TNM staging" topic (selecting a suitable adapter network through a topic representative vector).

[0080] Figure 3B A specific architecture diagram of the information extraction method for medical text according to the embodiments of the present application (for tumor medical record text) is shown.

[0081] For example, as shown in Figure 3B The original tumor medical record text is first input into the encoding network 31 (such as BERT or BioBERT), which encodes the original tumor medical record text, involving tokenization processing, and finally obtains a context vector sequence of the original tumor medical record text (the sequence length is the number of tokens). The context vector sequence can be provided to the neural network model 32 together with an external control signal, where the neural network model 32 can include a component-based column topic adapter library, such as a treatment adapter 32-1, an examination adapter 32-2, and a TNM staging adapter 32-3, etc. Each adapter corresponds to a lightweight sub-neural network, and other adapters can be additionally trained as needed to adapt to more column topics. In addition, the external control signal can be the topic representative vector of multiple clusters obtained by clustering analysis of historical reference medical texts, and according to the similarity between the numerical vector of the current medical record text and the topic representative vector of each cluster that has been clustered, determine the column topic to which the numerical vector belongs, for example, in Figure 3BIn the illustrated example, the column topic selected according to the external control signal is "TNM staging adapter". Or in other examples, the selected adapter can be specified by a user during inference. Then, the selected adapter can be activated so that the context vector sequence passing through the neural network model 32 can be injected with column topic-specific information (e.g. prior knowledge and topic preference) to obtain an information-enhanced optimized feature vector. For the optimized feature vector, the unified joint decoding network 33 (obtained by joint learning of NER and RE) can employ a pointer network or a conditional random field (CRF) decoder to simultaneously decode all column topic-related entities and, at the same time of identifying the entities, immediately predict the relationships between the currently identified entities and other identified entities, which can be achieved, for example, by a table filling method. That is, the entity recognition and relationship extraction processes share the underlying features and jointly infer. Then, based on the identified entities and relationship types, the output module 34 finally generates highly structured and semantically consistent column topic data, which can be directly stored in a database or applied to downstream tasks.

[0082] In summary, according to the information extraction method for medical text according to the embodiments of the present application, by designing modular column topic adapters, a topic adaptive mechanism is introduced, and the simultaneous optimization of entity recognition and relationship extraction is realized, so that the model can dynamically adjust its feature extraction focus according to the target column topic, thereby significantly improving the accuracy and semantic consistency of information extraction under different column topics.

[0083] In addition, according to the embodiments of the present application, by adopting the above scheme, the information set in the predetermined structured format is finally directly output based on the input medical text, and a new method of end-to-end integrated modeling is also realized.

[0084] As described above, the neural network model including multiple adapters, as well as the entity recognition model and the relationship extraction model are the core of the information extraction scheme according to the embodiments of the present application, and therefore according to another aspect of the present application, a training method of the neural network model, as well as the entity recognition model and the relationship extraction model is also provided.

[0085] In the present application, the neural network model, as well as the entity recognition model and the relationship extraction model are jointly trained.

[0086] For example, Figure 4 A flowchart of the joint training method according to the embodiments of the present application is shown.

[0087] As Figure 4 As shown in step S410, a training sample set is obtained, wherein each training sample in the training sample set includes an entity label and a relationship label between entities.

[0088] For example, each training sample can include historical medical text, and the historical medical text is also encoded by a network (e.g., BERT) to obtain a sequence of context vectors, and can include entity labels indicating all the real entities it includes, and relationship labels with the real relationships between these entities.

[0089] In step S420, the training sample set is divided to obtain a plurality of sample subsets, wherein each sample subset includes training samples with the same topic label (column topic).

[0090] For example, a clustering algorithm can be used to cluster each medical text included in the training sample set to obtain a plurality of training sample clusters. Each training sample cluster has the same topic label, i.e., a different column topic corresponding to a different adapter. In addition, each training sample cluster also has a topic representative vector accordingly.

[0091] The training sample set here can be the same as the plurality of reference medical texts mentioned earlier, or include a medical text set from other sources. For each training sample, the training samples under the topic label (column topic) to which the training sample belongs belong to the positive sample set of the training sample, and the training samples under other topic labels (column topics) belong to the negative sample set of the training sample.

[0092] For example, clustering the training sample set (such as K-Means, DBSCAN, or semantic clustering based on a pre-trained model such as BERT) can obtain a plurality of clusters, and as described earlier, each cluster can have a corresponding topic representative vector. All training samples in each cluster can be pooled using the corresponding adapter (sub-neural network), and after joint training as described later, an adapter dedicated to each column topic can be obtained.

[0093] In step S430, based on the positive sample set and the negative sample set of each training sample, contrastive learning is performed and a contrastive loss is determined as the first loss associated with the neural network model.

[0094] For example, the positive sample set of each training sample can include other training samples under the topic label (column topic) to which the training sample belongs, and the negative sample set can include training samples under other topic labels (column topics). For example, InfoNCE contrastive learning can be used to ultimately make training samples under the same column topic more clustered in the vector space, and training samples under different column topics more separated in the vector space, thereby further enhancing the topic discrimination and generalization ability of the model.

[0095] For example, the first loss function to obtain the first loss can be expressed in the following format:

[0096] (1)

[0097] where B is the training sample set, = Pool( ), i.e. the pooling vector of sample After using the adapter, the pooling vector, is the pooling vector of the positive sample under the same topic label (column topic) as sample i, is the pooling vector of the negative sample under the different topic label (column topic) as sample i, is the negative sample set of sample i; sim(·, ·) is a similarity calculation function, such as vector cosine similarity; is a temperature coefficient, used to adjust the sharpness of the distribution.

[0098] In step S440, based on the training optimization feature vector corresponding to each training sample and the training sample including an entity label, a span-based NER (Span-based NER) method is used to determine a second loss associated with the entity recognition model.

[0099] The Span-based NER method regards NER as a span classification task. Its core idea is to enumerate all possible text spans (Spans) and then directly judge whether each span belongs to a certain predefined entity type.

[0100] For example, a candidate span set is generated for the training optimization feature vector, and then for each candidate span, a feature representation is constructed, and then the span representation is input into a classifier to predict its category. The categories may include, for example: [O (non-entity), PER, LOC, ORG, MISC,...].

[0101] The classification loss can be represented as follows:

[0102] (2)

[0103] S is a candidate span set, represents one of the candidate spans span(s, e), s is the starting position, and e is the ending position. The length of the span is not more than to avoid too long meaningless spans. S can be all qualified spans, or "gold standard (only select real entities) + sampling (select part of negative samples)" to reduce the amount of calculation.

[0104] The logits (unnormalized score vector) output by the model for the candidate span span(s, e) is of length , represents the true class, and None represents that the span (s, e) is not an entity.

[0105] The integrated NER loss (i.e., the second loss function for obtaining the second loss) is represented as follows:

[0106] (3)

[0107] wherein, is the entity boundary loss, which is usually a loss that models the start / end position of an entity separately, such as predicting whether each position is the start / end of an entity. is a value between 0 and 1, which combines the information of “boundary positioning” and “span classification” to enable the model to learn both the boundary and the type of an entity.

[0108] In step S450, for each pair of entities identified in the entities of each training sample or each pair of entities corresponding to the entity label included, a third loss associated with the relation extraction model is determined based on the predicted relationship of the entity pair and the corresponding relationship label.

[0109] For example, the identified entity set is , and the relationship prediction is directional for each pair of entities The output relationship class probability is represented as , and the relationship loss is the sum of the cross-entropy of all entity pairs:

[0110] (4)

[0111] wherein, is the logits (unnormalized score vector) output by the model for the entity pair , and is the set of entity pairs used for training, which has two common choices: Gold entity pairs, i.e., pairs composed of annotated real entities (ensuring that the entities are correct and focusing on relationship learning); and predicted entity pairs, i.e., pairs composed of entities identified by the model (simulating the reasoning process for end-to-end training).

[0112] In step S460, based on the first loss, the second loss, and the third loss, a multi-task loss function is constructed to jointly train the neural network model, the entity recognition model, and the relation extraction model.

[0113] For example, the total loss can be represented as a weighted sum of the three partial losses, and thus the multi-task loss function can be represented as:

[0114] (5)

[0115] wherein, is a weight parameter, and is a value between 0 and 1.

[0116] In joint training, the neural network model and the entity recognition model and the relation extraction model can be alternately trained. Specifically, for different samples in the training sample set, the following steps are alternately performed: fixing the parameters of the neural network model, adjusting the parameters of the entity recognition model and the relation extraction model to minimize the total loss value of the loss function; and fixing the parameters of the entity recognition model and the relation extraction model, adjusting the parameters of the neural network model to minimize the total loss value of the loss function.

[0117] By the above-mentioned joint training of the three models, the corresponding column topic adapter can be selected or weighted for the training sample during training, and an adapter dedicated to the column topic can be generated. In addition, by using a multi-task loss function for joint optimization, these models are forced to learn a consistent representation that is beneficial to both entity recognition and relation extraction in addition to generating adapters. In addition, through integrated joint learning, entity recognition and relation extraction share underlying features and promote each other, fundamentally avoiding the error propagation problem of the pipeline architecture and ensuring the internal logical consistency of the finally generated column topic.

[0118] According to another aspect of the embodiments of the present application, an information extraction device for medical text is also provided.

[0119] Figure 5 An exemplary block diagram of an information extraction device according to embodiments of the present application is shown. Figure 5 The information extraction device shown can be or include a terminal device or a server as Figure 1 shown.

[0120] As Figure 5 shown, the information extraction device 500 can include an encoding module 510, an optimization module 520, an identification and prediction module 530, and an output module 540.

[0121] The encoding module 510 can be an encoding network as Figure 3B in the encoding network, and is configured to encode the medical text using the encoding network to obtain a context vector sequence of the medical text.

[0122] For example, the medical text can include a medical record text of a tumor patient.

[0123] The optimization module 520 can be Figure 3BThe neural network module 32 is configured to determine the adapter to be activated from a neural network model including multiple adapters based on the target column topic of the medical text, and to inject the information of the target column topic of the medical text into the context vector sequence using the activated adapter to obtain an optimized feature vector, wherein each of the multiple adapters corresponds to a column topic.

[0124] For example, in the case of a medical record of a cancer patient, multiple adapters could include treatment adapters, examination adapters, and TNM staging adapters, respectively corresponding to the column topics of treatment, examination, and TNM staging. Of course, depending on the specific type of medical text, many more types of adapters could exist to accommodate various column topics.

[0125] The identification and prediction module 530 can be Figure 3B The integrated joint decoding network 33 is configured to perform entity recognition on the optimized feature vector and predict the relationship type between individual entity pairs in the recognized entities.

[0126] For example, the identification and prediction module 530 can perform entity identification using an entity recognition model and relationship extraction using a relation extraction model in parallel on the optimized feature vector obtained from the optimization module 520. For example, for the obtained optimized feature vector, entities are decoded using an entity recognition model and a pointer network or conditional random field (CRF) decoder, and for each identified entity, the relationship between that entity and other identified entities is predicted using a relation extraction model. For example, the parallel operation of entity identification and relation extraction can be performed based on a table-filling method.

[0127] The output module 540 can be configured to output a set of information with a predetermined structured format based on the identified entities and the relationship type. For example, the predetermined structured format is JSON.

[0128] Optionally, each column topic has a corresponding topic representative vector. For example, the numerical vector of the medical text can be a context vector sequence obtained through an encoding network, or a vector representation obtained through other feature extraction methods. Correspondingly, the optimization module 520 can also be configured to: obtain the numerical vector of the medical text; and determine the closest topic representative vector of the numerical vector according to the text semantic similarity between the numerical vector and the topic representative vector corresponding to each column topic, and determine the target column topic of the medical text according to the closest topic representative vector. The topic representative vector corresponding to each column topic is obtained by: obtaining a plurality of groups by grouping a plurality of reference medical texts, each group including reference medical texts having the same column topic; and extracting an average vector for each group as the topic representative vector corresponding to the column topic of the group.

[0129] Optionally, in other embodiments, the information extraction apparatus 500 can further include a training module 550 for jointly training the neural network model, the entity recognition model and the relation extraction model.

[0130] For example, the training module 550 can be configured to: obtain a training sample set, wherein each training sample in the training sample set includes an entity label and a relationship label between entities; divide the training sample set to obtain a plurality of sample subsets, wherein each sample subset includes training samples having the same topic label (column topic); based on the positive sample set and the negative sample set of each training sample, perform contrastive learning and determine a contrastive loss as a first loss associated with the neural network model; based on the training optimization feature vector corresponding to each training sample and the entity label included in the training sample, determine a second loss associated with the entity recognition model using a span-based NER method; for each entity pair in the identified entities of each training sample or each entity pair corresponding to the included entity label, based on the predicted relationship of the entity pair and the corresponding relationship label, determine a third loss associated with the relation extraction model; and based on the first loss, the second loss and the third loss, construct a multi-task loss function to jointly train the neural network model, the entity recognition model and the relation extraction model.

[0131] In addition, each adapter corresponds to a sub-neural network, and after the neural network model is trained and used for inference process, if it is needed for a new column topic (such as "gene detection") in the future, the training module 550 can be configured to train a new lightweight adapter for the column topic, without the need to retrain the entire neural network model, which greatly reduces the expansion cost and deployment difficulty.

[0132] Further details of the training module 550 performing joint training can be found in the foregoing description of Figures 2 to 4 The foregoing description is described above and will not be repeated here.

[0133] According to the information extraction device for medical text, the modularized column theme adapter is designed, the theme self-adaptation mechanism is introduced, the synchronization optimization of entity recognition and relationship extraction is realized, the model can dynamically adjust the feature extraction focus according to the target column theme, and therefore the accuracy and semantic consistency of information extraction under different column themes are significantly improved. In addition, by means of the joint training of the three models, the corresponding column theme adapter can be selected or weighted for the training sample during training, and the adapter dedicated to the column theme can be generated. In addition, by using the multi-task loss function for joint optimization, the model is forced to learn the consistent representation beneficial to both entity recognition and relationship extraction in addition to generating the adapter.

[0134] Figure 5 Further details of the various modules in the device 500 can be found in the foregoing description of Figures 2-4 Therefore, the foregoing description will not be repeated here.

[0135] In addition, although the above modules are shown by way of example in Figure 5 It should be understood that the device 500 can be divided into more or fewer modules according to different functions, or each module can be divided into further more or fewer sub-modules. In some example embodiments, the modules or sub-modules thereof can be implemented by electronic hardware (for example, general-purpose processors, DSPs, ASICs, FPGAs or other programmable logic devices, discrete gates or transistor logic, discrete hardware components, etc.), computer software (for example, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), erasable programmable ROM (EPROM) or the like) or a combination of both.

[0136] According to another aspect of the present application, a computing device for implementing information extraction of medical text is also provided.

[0137] Figure 6 A structural block diagram of a computing device according to an embodiment of the present application is shown. Figure 6 The computing device shown can be or include a terminal device or a server as shown in Figure 1

[0138] Referring to Figure 6 ​The computing device 600 may include one or more processors 610 and one or more memories 620 connected to the processors 610. Both the processors 610 and the memories 620 may be connected via a bus 630. The computing device 600 can be any type of portable device (such as a smart camera, smartphone, tablet, etc.) or any type of stationary device (such as a desktop computer, server, etc.). For example, the computing device may be... Figure 1 The server shown. Computing devices may also include other modules, such as... Figure 6 The network interface 670, display screen 640, input device 650, and camera 660 shown are among the components.

[0139] Processor 610 can perform various actions and processes according to the computer program 60 and computer instruction set stored in memory 620. Specifically, processor 610 can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), off-the-shelf programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor can be a microprocessor or any conventional processor, and can be based on x86 architecture or ARM architecture.

[0140] Memory 620 stores computer-executable instructions that, when executed by processor 610, implement the aforementioned method for information extraction from medical text. Memory 620 may be volatile memory (e.g., internal memory 622) or non-volatile memory 621, or may include both volatile and non-volatile memory. Non-volatile memory 621 may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable categories of memory.

[0141] Further, the information extraction method for medical text according to the present application can be recorded in a non-transitory computer-readable recording medium. Specifically, according to the present application, a non-transitory computer-readable recording medium storing computer-executable instructions or a computer program, which, when executed by a processor, can cause the processor to perform the information extraction method for medical text as described above, can be provided.

[0142] It should be noted that the flowchart and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or combinations of hardware and software.

[0143] In general, the various example embodiments of the application can be implemented in hardware or special-purpose circuits, software, firmware, logic, or any combination thereof. Some aspects of the application can be implemented in hardware, while other aspects can be implemented in firmware or software which can be executed by a controller, microprocessor or other computing device, although the application is not limited thereto. While various aspects of the application have been set forth in the context of a flowchart, flow diagram, or other diagram, it will be appreciated that this is a non-limiting example of the many ways in which aspects of the application can be implemented, and that the functions indicated can be executed at different times in different sequences, or in parallel, depending on the circumstances. For example, a method can be implemented in hardware, software, or any combination thereof.

[0144] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

[0145] The foregoing is considered a description of the present application and is not to be considered as limiting. While several exemplary embodiments of the application have been described, it will be apparent to those of ordinary skill in the art that many modifications are possible without departing from the teachings of the present application. Accordingly, all such modifications are intended to be included within the scope of the present application as defined in the following claims. It is to be understood that the above description is considered that of the preferred embodiments of the application, and is not to be considered as limiting. Modifications of the disclosed embodiments, as well as other embodiments, are intended to be included within the scope of the claims. The application is defined by the claims and their equivalents.

Claims

1. A method for information extraction from medical text, characterized in that, include: The medical text is encoded using an encoding network to obtain a sequence of context vectors for the medical text. Based on the target column theme of the medical text, the adapter to be activated is determined from a neural network model including multiple adapters, and the activated adapter is used to inject the information of the target column theme of the medical text into the context vector sequence to obtain an optimized feature vector, wherein each of the multiple adapters corresponds to a column theme. Entity recognition is performed on the optimized feature vector, and the relationship type between each entity pair in the recognized entities is predicted; Based on the identified entities and the predicted relationship types, an information set with a predetermined structured format is output. Each section topic has a corresponding topic representative vector, and the information extraction method further includes: Obtain the numerical vector of the medical text; Based on the textual semantic similarity between the numerical vector and the topic representative vector corresponding to each column topic, the topic representative vector that is closest to the numerical vector is determined, and the target column topic of the medical text is determined based on the closest topic representative vector.

2. The information extraction method according to claim 1, characterized in that, The theme vector corresponding to each section's theme is obtained in the following way: Multiple groups were obtained by grouping multiple reference medical texts, and each group included reference medical texts with the same column theme; The average vector of each group is extracted as the theme representative vector corresponding to the column theme of the group.

3. The information extraction method according to claim 1, characterized in that, Entity recognition is performed on the optimized feature vector, and relationships between entities are predicted, including: For the optimized feature vector, entity recognition using the entity recognition model and the extraction of relationships between entities using the relationship extraction model are performed in parallel.

4. The information extraction method according to claim 3, characterized in that, Also includes: For the optimized feature vector, the entity is decoded using the entity recognition model and a pointer network or conditional random field (CRF) decoder. For each entity identified, a relation extraction model is used to predict the relationship between that entity and other identified entities.

5. The information extraction method according to claim 4, characterized in that, For each identified entity, the relationship between that entity and other identified entities is predicted using the relation extraction model, including: Construct an n×n matrix, where n is the sequence length corresponding to the optimized feature vector; Each entity identified for the optimized feature vector is used as the main diagonal element and boundary of the matrix, and the relationship type predicted for the currently identified entity with each previously identified entity is used as the off-diagonal element of the matrix.

6. The information extraction method according to claim 1, characterized in that, Also includes: Obtain a training sample set, wherein each training sample in the training sample set includes an entity label and a label relating the entities; The training sample set is divided into multiple sample subsets, each of which includes training samples with the same topic label. Based on the positive and negative sample sets for each training sample, contrastive learning is performed and a contrastive loss is determined as the first loss associated with the neural network model. Based on the training optimized feature vector corresponding to each training sample and the entity labels included in the training sample, the second loss associated with the entity recognition model for entity recognition is determined using the span-based NER method. For each entity pair in the entities identified by each training sample, or for each entity pair in the entities corresponding to the entity labels included, a third loss associated with the relation extraction model for relation type prediction is determined based on the predicted relation of the entity pair and the corresponding relation label. Based on the first loss, the second loss, and the third loss, a multi-task loss function is constructed to jointly train the neural network model, the entity recognition model, and the relation extraction model.

7. The information extraction method according to claim 6, characterized in that, The training sample set is divided into multiple sample subsets, including: A clustering algorithm is used to cluster the medical texts included in the training sample set to obtain multiple training sample clusters, each training sample cluster corresponding to a topic label; Specifically, for each training sample, training samples under the topic label to which the training sample belongs belong to the positive sample set of the training sample, and training samples under other topic labels belong to the negative sample set of the training sample.

8. The information extraction method according to claim 7, characterized in that, Constructing a multi-task loss function to jointly train the neural network model, the entity recognition model, and the relation extraction model includes: alternately performing the following steps for different training samples in the training sample set: With the parameters of the neural network model fixed, the parameters of the entity recognition model and the relation extraction model are adjusted to minimize the total loss value of the multi-task loss function. The parameters of the entity recognition model and the relation extraction model are fixed, and the parameters of the neural network model are adjusted with the goal of minimizing the total loss value of the multi-task loss function.

9. The information extraction method according to claim 1, characterized in that, The neural network model includes multiple sub-neural networks, each corresponding to an adapter. The information extraction method further includes: after training the neural network model, training an additional sub-neural network corresponding to the additional adapter, wherein the additional adapter corresponds to the new column topic.

10. The information extraction method according to claim 1, characterized in that, The predetermined structured format is JSON.

11. The information extraction method according to claim 1, characterized in that, The medical texts include the medical records of cancer patients. The multiple adapters include a treatment adapter, an examination adapter, and a TNM staging adapter, which correspond to the column themes of treatment, examination, and TNM staging, respectively.

12. An information extraction device for medical text, characterized in that, include: The encoding module is configured to encode the medical text using an encoding network to obtain a sequence of context vectors of the medical text; The optimization module is configured to: determine the adapter to be activated from a neural network model including multiple adapters based on the target column topic of the medical text, wherein each of the multiple adapters corresponds to a column topic; And by using the activated adapter, information about the target section topic of the medical text is injected into the context vector sequence to obtain an optimized feature vector; The identification and prediction module is configured to perform entity identification on the optimized feature vector and predict the relationships between individual entity pairs among the identified entities. The output module is configured to output an information set with a predetermined structured format based on the identified entities and the predicted relationship types. Each section topic has a corresponding topic representative vector, and the optimization module is further configured as follows: Obtain the numerical vector of the medical text; Based on the textual semantic similarity between the numerical vector and the topic representative vector corresponding to each column topic, the topic representative vector that is closest to the numerical vector is determined, and the target column topic of the medical text is determined based on the closest topic representative vector.

13. The information extraction device according to claim 12, characterized in that, It also includes a training module, configured as follows: Obtain a training sample set, wherein each training sample in the training sample set includes an entity label and a label relating the entities; The training sample set is divided into multiple sample subsets, each of which includes training samples with the same topic label. Based on the positive and negative sample sets for each training sample, contrastive learning is performed and a contrastive loss is determined as the first loss associated with the neural network model. Based on the training optimized feature vector corresponding to each training sample and the fact that the training sample includes entity labels, a second loss associated with the entity recognition model for entity recognition is determined using a span-based NER method. For each entity pair in the entities identified by each training sample, or for each entity pair in the entities corresponding to the entity labels included, a third loss associated with the relation extraction model for relation type prediction is determined based on the predicted relation of the entity pair and the corresponding relation label. Based on the first loss, the second loss, and the third loss, a multi-task loss function is constructed to jointly train the neural network model, the entity recognition model, and the relation extraction model.

14. A computing device, characterized in that, include: One or more processors; One or more memories having a computer program stored thereon, which, when executed by the one or more processors, causes the one or more processors to perform the information extraction method as described in any one of claims 1-11.

15. A non-transitory computer-readable storage medium, characterized in that, It stores a computer program that, when executed by one or more processors, causes the one or more processors to perform the information extraction method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Method and device for extracting structured information, equipment and computer storage medium

    CN110163257A

  • Text language association extraction method and system based on recurrent neural network

    CN111368542A

  • Entity relationship extraction and combination method and device, storage medium and equipment

    CN116189908A

  • Medical entity identification and relation extraction method based on deep learning

    CN119167938A

  • Text data subject-object association relation extraction method based on medical field features

    CN120296107A