A data processing system for obtaining events in medical record text
By using multiple models and adjusting parameters in the medical record text processing system, the problems of complex rules and inaccurate event recognition in the prior art are solved, and high-accurate medical record text events and entity relationship acquisition are achieved.
Patent Information
- Application Number
- CN202410488594.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-04-23
AI Technical Summary
The prior art is complex when acquiring events in medical record texts, which reduces the efficiency of obtaining medical record entity relationships. When the types of medical record texts are diversified, it is difficult to accurately identify events, resulting in low accuracy of entity relationships.
A data processing system is adopted to obtain the target medical record text label of the medical record text to be selected, combine multiple models to obtain the entity and entity relationship in the medical record text, adjust the model parameters based on the sample data, and obtain events using different methods, which improves the accuracy of the event and entity relationship.
It improves the accuracy of events and the accuracy of entity relationships in medical record text, enhances the efficiency of obtaining entity relationships in medical record text, and has high industrial utilization value.
Smart Images

Figure CN118471528B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text processing, and in particular to a data processing system for acquiring events in medical record text. Background Art
[0002] With the continuous development of Internet technology, medical records have become electronic. Medical records are generated and stored as important documents for judging diseases, treatment processes and disease development status. These medical records contain rich event information, such as the occurrence, development, treatment process of the disease and changes in the patient's health status. Effectively extracting and utilizing this event information is of great significance for medical data analysis, disease monitoring, clinical decision support, etc.
[0003] In the prior art, the method for obtaining events in medical record text is: obtaining keywords in the medical record text, classifying the obtained keywords, matching the classified keywords with a preset verb list based on rules, obtaining event trigger words in the medical record text, and obtaining entities in the medical record text based on the event trigger words, thereby obtaining events in the medical record text.
[0004] In summary, the methods for obtaining events in medical record texts have the following problems: the rule formulation is complex, which reduces the efficiency of obtaining entity relationships in medical records; when the types of medical record texts are diversified, events in medical record texts cannot be accurately identified, resulting in low accuracy of entity relationships in the obtained medical record texts. Summary of the invention
[0005] In view of the above technical problems, the technical solution adopted by the present invention is: a data processing system for obtaining events in medical record texts, the system comprising: a plurality of first medical record text labels, a plurality of second medical record text labels, a processor and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented:
[0006] S100, obtaining a medical record text to be selected, wherein the medical record text to be selected is a medical record text of an event to be obtained.
[0007] S200, based on the medical record text to be selected, obtain a target medical record text label corresponding to the medical record text to be selected, wherein the target medical record text label is a text type corresponding to the medical record text to be selected obtained based on the content and structure corresponding to several titles in the medical record text to be selected.
[0008] S300, when the target medical record text label is consistent with the first medical record text label, a target triple list corresponding to the selected medical record text is obtained, wherein the target triple list includes a plurality of target triples, wherein the target triple is obtained in S300 by the following steps:
[0009] S301, according to the medical record text to be selected, obtaining a list of entities to be selected corresponding to the medical record text to be selected and a list of tags to be selected corresponding to the list of entities to be selected.
[0010] S302: According to the list of entities to be selected and the list of tags to be selected, a first entity relationship graph to be selected corresponding to the list of entities to be selected is obtained.
[0011] S303: According to the to-be-selected entity list, obtain a second to-be-selected entity relationship list corresponding to the to-be-selected entity list.
[0012] S304, according to the first candidate entity relationship graph and the second candidate entity relationship list, obtain a target triple list corresponding to the candidate medical record text, wherein the target triple list includes a plurality of target triples, and the target triples include two connected candidate entities obtained from the first candidate entity relationship graph and the connection relationship corresponding to the two candidate entities and two candidate entities obtained from the second candidate entity relationship list and the entity relationship labels corresponding to the two candidate entities.
[0013] S400, based on the target triple list, obtaining a target event list corresponding to the medical record text to be selected, wherein the target event list includes a plurality of target events, and the target event is a target triple obtained from the target triple list.
[0014] S500, when the target medical record text label is consistent with the second medical record text label, obtain a target event list corresponding to the medical record text to be selected, wherein the target event list includes several target events, and the target events are obtained by inputting the medical record text to be selected into the event extraction model.
[0015] Compared with the prior art, the present invention has obvious beneficial effects. By means of the above technical solution, the data processing system for obtaining events in medical record text provided by the present invention can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:
[0016] The present invention is a data processing system for obtaining events in medical record texts. The system includes: a plurality of first medical record text labels, a plurality of second medical record text labels, a processor, and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: obtaining a medical record text to be selected, obtaining a target medical record text label corresponding to the medical record text to be selected based on the medical record text to be selected, when the target medical record text label is consistent with the first medical record text label, obtaining a target triple list corresponding to the medical record text to be selected, based on the target triple list, obtaining a target event list corresponding to the medical record text to be selected, when the target medical record text label is consistent with the second medical record text label, obtaining the medical record text to be selected Corresponding target event list, the present invention adopts different methods to obtain events in medical record text based on the text type corresponding to the medical record text, so that the accuracy of the events in the obtained medical record text is higher. At the same time, multiple models are combined to obtain entities in the medical record text, and the parameters of each model are continuously adjusted based on sample data, which improves the accuracy of obtaining entities in the medical record text, thereby making the accuracy of obtaining entity relationships higher. The trained model is used to obtain the entity relationship in the medical record text. Based on the matching situation in the model training process, the parameters of the model are adjusted in different ways, which improves the accuracy of obtaining the entity relationship of the medical record text, thereby improving the accuracy of obtaining events in the medical record text.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart implemented when a processor of a data processing system for acquiring events in a medical record text executes a computer program provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0021] Example
[0022] This embodiment provides a data processing system for obtaining events in medical record texts, the system comprising: a plurality of first medical record text labels, a plurality of second medical record text labels, a processor, and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: Figure 1 As shown:
[0023] S100, obtaining a medical record text to be selected, wherein the medical record text to be selected is a medical record text of an event to be obtained.
[0024] S200, based on the medical record text to be selected, obtain a target medical record text label corresponding to the medical record text to be selected, wherein the target medical record text label is a text type corresponding to the medical record text to be selected obtained based on the content and structure corresponding to several titles in the medical record text to be selected.
[0025] Specifically, those skilled in the art know that any method of obtaining text type based on text title structure and content in the prior art falls within the protection scope of the present invention and will not be described in detail herein.
[0026] S300, when the target medical record text label is consistent with the first medical record text label, obtain a target triple list corresponding to the medical record text to be selected, wherein the target triple list includes a plurality of target triples.
[0027] Specifically, the first medical record text label is the type of medical record text involved in the process node of treating the user when the user's body has abnormalities, for example: first medical record text labels such as physical signs, examinations, and medication.
[0028] Specifically, the system also includes N preset entity tags, wherein the preset entity tags are tags corresponding to pre-set entities, wherein the tags corresponding to the entities are tags corresponding to words that characterize the user's physical state. Those skilled in the art know that the preset entity tags can be set according to actual needs, which all fall within the protection scope of the present invention and will not be repeated here, for example: preset entity tags such as inspection methods and observation results.
[0029] Specifically, in S300, the target triplet is obtained through the following steps:
[0030] S301, according to the medical record text to be selected, obtaining a list of entities to be selected corresponding to the medical record text to be selected and a list of tags to be selected corresponding to the list of entities to be selected.
[0031] Specifically, S301 also includes the following steps:
[0032] S3011, obtain the initial feature vector list A corresponding to the medical record text to be selected = {A1, ..., A i , ..., A n}, A i =(A i1 , ..., A ij , ..., A im ), A i is the initial feature vector corresponding to the i-th character in the medical record text to be selected, A ij A i The bit value of the jth bit in , j = 1...m, m is the dimension of the initial feature vector, i = 1...n, n is the number of text characters in the medical record text to be selected.
[0033] Specifically, the initial feature vector is a feature vector generated by concatenating vectors generated based on content information and position information corresponding to text characters in the selected medical record text. Those skilled in the art know that any method in the prior art for converting text into a vector based on content information and position information of the text falls within the scope of protection of the present invention and will not be repeated here.
[0034] Furthermore, m=m1+m2, wherein m1 is the dimension of a vector generated based on content information corresponding to text characters in the medical record text to be selected, and m2 is the dimension of a vector generated based on position information corresponding to text characters in the medical record text to be selected.
[0035] Preferably, the value of m1 is 128.
[0036] Preferably, the value of m2 is 64.
[0037] Specifically, the medical record text to be selected is the medical record text of the entity to be obtained and the label corresponding to the entity.
[0038] S3012, input A into the preset CNN model, and obtain the intermediate feature vector list B corresponding to the medical record text to be selected = {B1, ..., B i , ..., B n}, B i =(B i1 , ..., B ir , ..., B is ), B i is the intermediate feature vector corresponding to the i-th character in the medical record text to be selected, B ir For B i The bit value of the rth bit in , r = 1 ... s, s is the dimension of the intermediate feature vector, wherein s is obtained by the following steps in S3012:
[0039] S30121, obtaining a first candidate parameter η1 corresponding to a preset CNN model, wherein the first candidate parameter η1 is the number of types corresponding to the convolution kernel in the preset CNN model.
[0040] Specifically, in S30121, η1 is obtained by the following steps:
[0041] S1, obtaining a sample medical record text set, wherein the sample medical record text set includes a plurality of sample medical record texts, and the sample medical record texts are medical record texts used to mark entities.
[0042] S2, obtaining a sample entity set according to the sample medical record text set, wherein the sample entity set includes a plurality of sample entities, and the sample entities are entities marked in the sample medical record text.
[0043] S3, according to the sample entity set, obtain a first sample quantity list and a second sample quantity list corresponding to the sample entity type list F = {F1, ..., F t , ..., F f}, where F t is the second sample quantity corresponding to the t-th sample entity type, t=1…f, and f is the number of second sample quantities in the second sample quantity list.
[0044] Specifically, the sample entity type list includes several sample entity types, wherein the sample entity type is an entity type classified based on the number of text characters corresponding to the sample entity, which can be understood as: sample entities with 2 text characters are classified into one category, such as skin, chest tube, number, etc.
[0045] Specifically, the first sample quantity list includes a plurality of first sample quantities, wherein the first sample quantity is the number of text characters corresponding to the sample entity.
[0046] Specifically, the second sample quantity is the quantity of sample entities corresponding to each sample entity type in the sample entity set.
[0047] S4, according to F, obtain a list of entity types to be selected E = {E1, ..., E v ,……,E b} and E corresponding to the third sample quantity list E 0 ={E 0 1, ..., E 0 v ,……,E 0 b}, E v is the vth entity type to be selected, E 0 v For E v The corresponding third sample quantity, v=1...b, b is the number of entity types to be selected, where, is the maximum integer not exceeding (α×f), where α is a preset percentage.
[0048] Specifically, the entity type to be selected is the sample entity type obtained from the sample entity type list and corresponding to the first α second sample quantities after sorting the second sample quantities in F in descending order.
[0049] Furthermore, the third sample quantity is the first sample quantity corresponding to the entity type to be selected obtained from the first sample quantity list.
[0050] Specifically, the value range of α is 80% to 90%. Those skilled in the art know that α can be selected according to actual needs, which falls within the protection scope of the present invention and will not be described in detail here.
[0051] S5, according to E 0 , get the fourth sample quantity list E 1 ={E 1 1, ..., E 1 u ,……,E 1 w}, E 1 u is the uth fourth sample quantity, u=1...w, w=b, wherein the fourth sample quantity is the 0 The third sample number in is the third sample number after re-sorting in ascending order.
[0052] S6, when E 1 There is E 1 u -E 1 u-1≠1, then α=α-α0, and S4-S5 are repeatedly executed until the preset loop termination condition is met, wherein the preset loop termination condition is: E 1 u -E 1 u-1 =1, α0 is the preset parameter threshold, E 1 u-1 is the (u-1)th fourth sample quantity.
[0053] Specifically, the value range of α0 is 0.1 to 0.5, wherein those skilled in the art know that α0 can be selected according to actual needs, all of which fall within the protection scope of the present invention and will not be described in detail here.
[0054] S7, when E 1 u -E 1 u-1 When η1=1, η1=b is obtained.
[0055] As described above, based on the relevant sample data involved in the sample entities in the sample medical record text set, the parameters of the preset CNN model are continuously adjusted to obtain the feature vectors of the corresponding dimensions of the selected medical record text, and the type of convolution kernel in the preset CNN model is determined based on the number of text characters corresponding to the entities in the sample medical record text to ensure that the size corresponding to the convolution kernel is consistent, thereby improving the accuracy of obtaining entities and entity labels in the medical record text.
[0056] S30123, according to η1, obtain a second candidate parameter η2 corresponding to the preset CNN model, wherein the second candidate parameter η2 meets the following conditions:
[0057] m / η1<η2≤(m×μ) / η1 and η2=a×M, where μ is a preset parameter, a is the number of attention heads in the preset Transformer, and M is any positive integer.
[0058] Specifically, the second candidate parameter η2 is the number of convolution kernels of each type in the preset CNN model.
[0059] Specifically, the value range of μ is 5 to 301, wherein those skilled in the art know that μ can be selected according to actual needs, all of which fall within the protection scope of the present invention and will not be described in detail here.
[0060] As mentioned above, the second candidate parameter corresponding to the preset CNN model is set within the corresponding range to avoid the situation where the dimension of the feature vector corresponding to the candidate medical record text output by the model is small due to the parameter being too small, resulting in the inability to obtain comprehensive information, making it difficult to find a good solution during the training process, and making it difficult for the model to converge. At the same time, it is avoided that the dimension of the feature vector corresponding to the candidate medical record text output by the model is large due to the model parameters being too large, resulting in a reduction in the model's operating efficiency, so that the accuracy of the entities and entity labels in the medical record text is higher.
[0061] S30125, according to η1 and η2, obtain the dimension s of the intermediate feature vector, wherein the dimension s of the intermediate feature vector meets the following conditions:
[0062] s=2×η1×η2.
[0063] S3013, input B into the preset Transformer model, and obtain a list of candidate feature vectors C corresponding to the candidate medical record texts = {C1, ..., C i , ..., C n}, C i =(C i1 , ..., C ih , ..., C ig ), C i is the candidate feature vector corresponding to the i-th character in the candidate medical record text, C ih C i The bit value of the hth bit in , h = 1...g, g is the dimension of the feature vector to be selected, where g meets the following conditions:
[0064] g=(N+1)×4, where N is the number of preset entity tags.
[0065] S3014, according to C, obtain a list of candidate entities corresponding to the medical record text to be selected and a list of candidate labels corresponding to the list of candidate entities, wherein the list of candidate entities includes a number of candidate entities, the candidate entities are entities in the medical record text to be selected identified by combining a preset CNN model and a preset Transformer model, and the list of candidate labels includes a number of candidate labels, the candidate labels are preset entity labels to which the candidate entities are classified.
[0066] Specifically, those skilled in the art know that any method in the prior art that combines the CNN model and the Transformer model to obtain entities in the text and the corresponding labels of the entities falls within the protection scope of the present invention and will not be described in detail here.
[0067] S302: According to the list of entities to be selected and the list of tags to be selected, a first entity relationship graph to be selected corresponding to the list of entities to be selected is obtained.
[0068] Specifically, in S302, the first entity relationship diagram to be selected is obtained through the following steps:
[0069] S3021, input the list of entities to be selected and the list of labels to be selected into the preset neural network model, and obtain the intermediate entity relationship diagram corresponding to the medical record text to be selected, wherein the intermediate entity relationship diagram is a tree structure diagram of the relationship between the entities to be selected and the entities to be selected constructed based on the list of entities to be selected, and the intermediate entity relationship diagram includes a root node to be selected, several child nodes to be selected, and several edges to be selected.
[0070] Specifically, in S3021, the intermediate entity relationship diagram is obtained through the following steps:
[0071] S30211, when a candidate entity in the candidate entity list does not depend on any candidate entity in the candidate entity list except the candidate entity itself, the candidate child node corresponding to the candidate entity is connected to the candidate root node, and the connection direction between the candidate child node corresponding to the candidate entity and the candidate root node is that the candidate root node points to the candidate child node corresponding to the candidate entity.
[0072] Specifically, the candidate root node is a node set by itself, wherein those skilled in the art know that any method of setting a symbol to represent a node in the prior art falls within the protection scope of the present invention and will not be described in detail herein. For example, -1 is used to represent the candidate root node.
[0073] Specifically, the to-be-selected sub-node includes a to-be-selected entity and a to-be-selected label corresponding to the to-be-selected entity.
[0074] Specifically, the edge to be selected represents a connection relationship between entities to be selected.
[0075] S30213: When a candidate entity in the candidate entity list is dependent on a candidate entity other than the candidate entity in the candidate entity list, a candidate sub-node corresponding to the candidate entity is connected with a candidate sub-node corresponding to the dependent candidate entity.
[0076] S30215: Connect the to-be-selected root node with the to-be-selected child node and connect the to-be-selected child node with the to-be-selected child node to form a to-be-selected edge, so as to obtain a first to-be-selected entity relationship graph.
[0077] Specifically, in S3021, the preset neural network model is obtained through the following steps:
[0078] S11, according to the key medical record text set, obtain the key entity list set U corresponding to the key medical record text set = {U1, ..., U d , ..., U z} and the key tag list set corresponding to the key entity list set, U dis the dth key entity list, d=1...z, and z is the number of key entity lists.
[0079] Specifically, the key medical record text set includes several key medical record texts, and the key medical record texts are medical record texts used to train the initial neural network model.
[0080] Specifically, the key tag list set includes several key tag lists.
[0081] Furthermore, each key medical record text corresponds to a key entity list, and each key entity list corresponds to a key tag list.
[0082] Furthermore, the method for acquiring the key entity list is consistent with the method for acquiring the candidate entity list, and the method for acquiring the key tag list is consistent with the method for acquiring the candidate tag list.
[0083] S12, input U and the key tag list set into the first neural network model to obtain the key entity relationship graph corresponding to U.
[0084] Specifically, the key entity relationship diagram is a tree structure diagram of the relationship between key entities constructed based on the key entity list.
[0085] Furthermore, the method for acquiring the key entity relationship diagram is consistent with the method for acquiring the intermediate entity relationship diagram.
[0086] Specifically, those skilled in the art know that the neural network can be selected according to actual needs, which falls within the protection scope of the present invention and will not be described in detail here.
[0087] S13, according to the key relationship diagram, obtain the key parameter ζ corresponding to the first neural network model, where ζ meets the following conditions:
[0088] σ 0 d It is the number of two key entities in the key entity relationship graph corresponding to the d-th key medical record text and the number of two key entities in the real entity relationship graph corresponding to the d-th key medical record text that are consistent and the number of relationships between the two key entities in the real entity relationship graph corresponding to the d-th key medical record text.
[0089] S14, continuously adjust the key parameter ζ until ζ≤ζ 0 To obtain the preset neural network model, where ζ 0 is the preset key parameter threshold.
[0090] Specifically, 0The value range of is 0.1 to 0.3, and those skilled in the art know that it can be adjusted according to actual needs. 0 The selection of all falls within the protection scope of the present invention and will not be repeated here.
[0091] S3023, processing the intermediate entity relationship graph based on the preset rule list to obtain a first entity relationship graph to be selected, wherein the preset rule list includes a plurality of preset rules, and the preset rules are rules set based on semantic information of the to-be-selected entity and information included in the to-be-selected label corresponding to the to-be-selected entity, and the first to-be-selected entity relationship graph is an intermediate entity relationship graph after determining the connection direction between the to-be-selected sub-node corresponding to the to-be-selected entity and the dependent to-be-selected entity in the intermediate entity relationship graph based on the preset rule list on the basis of the intermediate entity relationship graph.
[0092] Specifically, for example: classify the candidate labels, different types of candidate labels have different priority orders, and the priority order is: attribute < auxiliary class < location class < detection content class < pathological manifestation class < treatment class < diagnosis class < examination method class. The lower priority depends on the higher priority, that is, when the priority corresponding to a candidate label is lower than the priority corresponding to another candidate label, then in the candidate entity relationship diagram, the candidate child node corresponding to this candidate label points to the candidate child node corresponding to another candidate label.
[0093] As described above, multiple models are combined to obtain entities in medical record texts, and the parameters of each model are continuously adjusted based on sample data, which improves the accuracy of obtaining entities in medical record texts, thereby making the accuracy of obtaining entity relationships higher. The model is combined with rules and presented in the form of a graph, which improves the efficiency of obtaining entity relationships in medical record texts. The entities in the medical record texts are processed by first using the model and then using rules set based on feature information such as semantic information of the entities in the medical record text, so that the accuracy of the obtained medical record text entity relationship graph is higher.
[0094] S303: According to the to-be-selected entity list, obtain a second to-be-selected entity relationship list corresponding to the to-be-selected entity list.
[0095] Specifically, the preset entity relationship label is a pre-set label for the relationship between entities, wherein the label for the relationship between entities is a label for the correspondence between words that characterize the user's physical state. Those skilled in the art know that the preset entity relationship labels can be set according to actual needs, which all fall within the protection scope of the present invention and will not be repeated here, for example: entity relationship labels such as occurrence location and confirmed relationship.
[0096] In a specific embodiment, in S303, the second candidate entity relationship list is obtained through the following steps:
[0097] S3031, according to the candidate medical record text set, obtaining a first candidate label list set corresponding to the candidate medical record text set, wherein the candidate medical record text set includes a plurality of candidate medical record texts.
[0098] Specifically, the candidate medical record text set includes a plurality of candidate medical record texts, wherein the candidate medical record texts are medical record texts including preset entity relationship labels between entities.
[0099] Specifically, the first candidate label list set includes several first candidate label lists, wherein each candidate medical record text corresponds to a first candidate label list, and the first candidate label list includes several first candidate labels, and the first candidate label is a preset entity relationship label corresponding to two entities that actually exist in each candidate medical record text.
[0100] S3032, according to the candidate medical record text set, obtaining a candidate entity list set corresponding to the candidate medical record text set, wherein the candidate entity list set includes a plurality of candidate entity lists, and the candidate entity list includes a plurality of candidate entities.
[0101] Specifically, the method for obtaining the candidate entity is consistent with the method for obtaining the above-mentioned entity to be selected, and can refer to steps S3011 to S3014.
[0102] S3033, input the candidate entity list set into the initial neural network model to obtain a second candidate label list set, wherein the second candidate label list set includes several second candidate label lists, the second candidate label list includes several second candidate labels, and the second candidate labels are preset entity relationship labels corresponding to two candidate entities in each candidate entity list obtained based on the initial neural network model.
[0103] S3034: Obtain target parameters θ corresponding to the initial neural network model according to the first candidate label list set and the second candidate label list set.
[0104] Specifically, in S3304, θ is obtained through the following steps:
[0105] S30341, according to the first candidate label list set, obtain a first target quantity list Y corresponding to the preset entity relationship label list = {Y1, ..., Y α , ..., Y β},Y α is the first target number corresponding to the αth preset entity relationship tag, α=1...β, wherein the first target number is the number of each preset entity relationship tag included in the first candidate tag list set.
[0106] S30343, according to the second candidate label list set, obtain a second target quantity list R corresponding to the preset entity relationship label list = {R1, ..., R α , ..., R β},R α is the second target number corresponding to the αth preset entity relationship tag, wherein the second target number is the number of each preset entity relationship tag included in the second candidate tag list set.
[0107] S30345: According to the sample medical record text set, obtain a third target quantity list P corresponding to the preset entity relationship label list = {P1, ..., P α , ..., P β},P α is the third target number corresponding to the αth preset entity relationship label, wherein the third target number is the number of each preset entity relationship label included in the sample medical record text, the sample medical record text set includes several sample medical record texts, and the sample medical record text is the medical record text used to label entities.
[0108] S30347, obtain θ according to Y, R and P, where θ meets the following conditions:
[0109]
[0110] S3035, continuously adjusting the target parameter θ until a preset target condition is met to obtain a target entity relationship model, wherein the preset target condition is: θ≤θ 0 ,θ 0 is the preset target parameter threshold.
[0111] Specifically, θ 0 The value range of θ is 0.1 to 0.3, wherein those skilled in the art know that θ can be adjusted according to actual needs. 0 The selection of all falls within the protection scope of the present invention and will not be repeated here.
[0112] S3036, input the list of candidate entities into the target entity relationship model, and obtain a second list of candidate entity relationships corresponding to the medical record text to be selected, wherein the second list of candidate entity relationships includes a plurality of second candidate entity relationships, and the second candidate entity relationships include a preset entity relationship label matched based on the target entity relationship model and two candidate entities corresponding to the preset entity label matched.
[0113] In another specific embodiment, in S303, the second entity relationship list to be selected is obtained through the following steps:
[0114] S331, according to the candidate medical record text set, obtaining a candidate entity list set corresponding to the candidate medical record text set, wherein the candidate entity list set includes a plurality of candidate entity lists, and the candidate entity list includes a plurality of candidate entities.
[0115] Specifically, the method for acquiring the candidate entity is consistent with the method for acquiring the candidate entity in the above embodiment.
[0116] S332, input the candidate entity list set into the initial neural network model, obtain a second candidate label list set and a second candidate priority list G={G1, ..., G x , ..., G p}, G x is the second candidate priority corresponding to the x-th second candidate tag, x=1...p, and p is the number of second candidate priorities.
[0117] Specifically, the second candidate tag list set includes several second candidate tag lists, the second candidate tag list includes several second candidate tags, and the second candidate tags are preset entity relationship tags corresponding to two candidate entities in each candidate entity list obtained based on the initial neural network model.
[0118] Furthermore, the second candidate priority is a degree of matching between the relationship between the candidate entities and the candidate entities obtained based on the initial neural network model and a preset entity relationship label.
[0119] S333, when ε / p ≥ F 0 When , the first processing method is used to obtain the key parameter γ corresponding to the initial neural network model, where ε is the number of second candidate priorities in G that are not 1, and F 0 is the preset priority threshold.
[0120] Specifically, F 0 The value range of F is 0.5 to 0.7, wherein those skilled in the art know that F can be adjusted according to actual needs. 0 The selection of all falls within the protection scope of the present invention and will not be repeated here.
[0121] Specifically, in S333, γ is obtained by the following steps:
[0122] S3331, according to the candidate medical record text set, obtaining a first candidate label list set corresponding to the candidate medical record text set, wherein the candidate medical record text set includes a plurality of candidate medical record texts.
[0123] Specifically, the candidate medical record text set includes a plurality of candidate medical record texts, wherein the candidate medical record texts are medical record texts including preset entity relationship labels between entities.
[0124] Specifically, the first candidate label list set includes several first candidate label lists, wherein each candidate medical record text corresponds to a first candidate label list, and the first candidate label list includes several first candidate labels, and the first candidate label is a preset entity relationship label corresponding to two entities that actually exist in each candidate medical record text.
[0125] Specifically, the preset entity relationship label is a pre-set label for the relationship between entities, wherein the label for the relationship between entities is a label for the correspondence between words that characterize the user's physical state. Those skilled in the art know that the preset entity relationship labels can be set according to actual needs, which all fall within the protection scope of the present invention and will not be repeated here, for example: entity relationship labels such as occurrence location and confirmed relationship.
[0126] S3332, input the candidate entity list set into the initial neural network model to obtain a second candidate label list set, wherein the second candidate label list set includes several second candidate label lists, the second candidate label list includes several second candidate labels, and the second candidate labels are preset entity relationship labels corresponding to two candidate entities in each candidate entity list obtained based on the initial neural network model.
[0127] Specifically, those skilled in the art know that any method in the prior art for obtaining labels by performing model training based on a neural network model falls within the protection scope of the present invention and will not be described in detail here, such as neural network models such as the PCNN model.
[0128] S3333: According to the first candidate label list set, obtain a first target quantity list Y corresponding to the preset entity relationship label list = {Y1, ..., Y α , ..., Y β},Y α is the first target number corresponding to the αth preset entity relationship tag, α=1...β, wherein the first target number is the number of each preset entity relationship tag included in the first candidate tag list set.
[0129] S3334: According to the second candidate label list set, obtain a second target quantity list R corresponding to the preset entity relationship label list = {R1, ..., R α , ..., R β},R α is the second target number corresponding to the αth preset entity relationship tag, wherein the second target number is the number of each preset entity relationship tag included in the second candidate tag list set.
[0130] S3335, obtain γ according to Y and R, where γ meets the following conditions:
[0131]
[0132] S334, when ε / p<F 0 When , the second processing method is used to obtain the key parameter γ corresponding to the initial neural network model.
[0133] Specifically, the method for obtaining γ in step S334 is consistent with the method for obtaining θ in the above embodiment.
[0134] S335, continuously adjusting the key parameter γ until a preset target condition is met to obtain a target entity relationship model, wherein the preset target condition is: γ≤γ 0 , γ 0 is the preset key parameter threshold.
[0135] S336, input the list of candidate entities into the target entity relationship model, and obtain a second list of candidate entity relationships corresponding to the medical record text to be selected, wherein the second list of candidate entity relationships includes a plurality of second candidate entity relationships, and the second candidate entity relationships include a preset entity relationship label matched based on the target entity relationship model and two candidate entities corresponding to the preset entity label matched.
[0136] As mentioned above, multiple models are combined to obtain entities in medical record texts, and the parameters of each model are continuously adjusted based on sample data, which improves the accuracy of obtaining entities in medical record texts, thereby making the accuracy of obtaining entity relationships higher. Based on the matching situation during model training, different methods are used to adjust the parameters of the model to improve the accuracy of obtaining entity relationships in medical record texts.
[0137] S304, according to the first candidate entity relationship graph and the second candidate entity relationship list, obtain a target triple list corresponding to the candidate medical record text, wherein the target triple list includes a plurality of target triples, and the target triples include two connected candidate entities obtained from the first candidate entity relationship graph and the connection relationship corresponding to the two candidate entities and two candidate entities obtained from the second candidate entity relationship list and the entity relationship labels corresponding to the two candidate entities.
[0138] S400, based on the target triple list, obtaining a target event list corresponding to the medical record text to be selected, wherein the target event list includes a plurality of target events, and the target event is a target triple obtained from the target triple list.
[0139] S500, when the target medical record text label is consistent with the second medical record text label, obtain a target event list corresponding to the medical record text to be selected, wherein the target event list includes several target events, and the target events are obtained by inputting the medical record text to be selected into the event extraction model.
[0140] Specifically, those skilled in the art know that any method of extracting events from text using any event extraction model in the prior art falls within the protection scope of the present invention and will not be described in detail herein.
[0141] Specifically, the target event includes a trigger word and an argument, wherein the argument is an element involved in the occurrence of the event and is composed of entities in the medical record text to be selected.
[0142] Specifically, the second medical record text label is a type of medical record text corresponding to a feature of the user that is different from the user and is unrelated to the process nodes involved in handling the user when the user has physical abnormalities, such as second medical record text labels such as smoking history, menstrual history, and allergy history.
[0143] As described above, based on the text type corresponding to the medical record text, different methods are used to obtain events in the medical record text, so that the accuracy of the events in the obtained medical record text is higher. At the same time, multiple models are combined to obtain entities in the medical record text, and the parameters of each model are continuously adjusted based on sample data, which improves the accuracy of obtaining entities in the medical record text, thereby making the accuracy of obtaining entity relationships higher. The trained model is used to obtain entity relationships in the medical record text. Based on the matching situation during the model training process, the parameters of the model are adjusted in different ways, which improves the accuracy of obtaining entity relationships in the medical record text, thereby improving the accuracy of obtaining events in the medical record text.
[0144] Specifically, after step S500, the following steps are also included:
[0145] S600, obtaining an initial medical record text set, wherein the initial medical record text set includes a plurality of initial medical record texts, and the initial medical record texts are medical record texts obtained from a preset database.
[0146] Specifically, those skilled in the art know that the database for obtaining medical record texts can be selected according to actual needs, all of which fall within the protection scope of the present invention and will not be described in detail here.
[0147] S700, obtaining an intermediate medical record text set based on an initial medical record text set, wherein the intermediate medical record text set includes a plurality of intermediate medical record texts, and the intermediate medical record texts are initial medical record texts corresponding to each user obtained from the initial medical record text set.
[0148] Specifically, it can be understood that: the intermediate medical record text set is obtained by splitting the initial medical record text set into a multi-dimensional data set corresponding to a number of patients according to the user, ie, patient dimension.
[0149] Specifically, the data format corresponding to the intermediate medical record text is the JSON format. Those skilled in the art know that any method of converting text into the JSON data format in the prior art falls within the protection scope of the present invention and will not be described in detail here.
[0150] S800, obtaining an intermediate event knowledge graph corresponding to the intermediate medical record text set according to the intermediate medical record text set, wherein the intermediate event knowledge graph includes a plurality of intermediate triples.
[0151] Specifically, the method for acquiring the intermediate triplet is consistent with the method for acquiring the target triplet in step S304.
[0152] S1100, obtaining a disease database according to a preset intermediate rule list and an intermediate event knowledge graph, wherein the disease database includes content data included in processing nodes involved in the disease.
[0153] Specifically, the preset intermediate rule list includes several preset intermediate rules, wherein the preset intermediate rules are rules for judging entities in the intermediate event knowledge graph based on the characteristics of the disease type.
[0154] As mentioned above, combining the NLP system with rules can more accurately understand and parse the data in the medical record text, improve the accuracy and efficiency of obtaining the disease database. The NLP system can provide understanding and analysis of medical record text data, and provide the rule engine with richer and more accurate information, so that the accuracy of obtaining the disease database is higher.
[0155] The present embodiment is a data processing system for obtaining events in a medical record text. The system includes: a plurality of first medical record text labels, a plurality of second medical record text labels, a processor, and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: obtaining a medical record text to be selected, obtaining a target medical record text label corresponding to the medical record text to be selected based on the medical record text to be selected, when the target medical record text label is consistent with the first medical record text label, obtaining a target triple list corresponding to the medical record text to be selected, based on the target triple list, obtaining a target event list corresponding to the medical record text to be selected, when the target medical record text label is consistent with the second medical record text label, obtaining the medical record text to be selected Corresponding target event list, this embodiment adopts different methods to obtain events in the medical record text based on the text type corresponding to the medical record text, so that the accuracy of the events in the obtained medical record text is higher. At the same time, multiple models are combined to obtain entities in the medical record text, and the parameters of each model are continuously adjusted based on sample data, which improves the accuracy of obtaining entities in the medical record text, thereby making the accuracy of obtaining entity relationships higher. The trained model is used to obtain the entity relationship in the medical record text. Based on the matching situation in the model training process, the parameters of the model are adjusted in different ways, which improves the accuracy of obtaining the entity relationship of the medical record text, thereby improving the accuracy of obtaining events in the medical record text.
[0156] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A data processing system for obtaining events in medical record text, characterized in that: The system includes: a plurality of first medical record text labels, a plurality of second medical record text labels, a processor, and a memory storing a computer program. When the computer program is executed by the processor, the following steps are implemented: S100, obtaining a medical record text to be selected, wherein the medical record text to be selected is a medical record text of an event to be obtained; S200, obtaining a target medical record text label corresponding to the medical record text to be selected according to the medical record text to be selected, wherein the target medical record text label is a text type corresponding to the medical record text to be selected obtained based on the content and structure corresponding to several titles in the medical record text to be selected; S300, when the target medical record text label is consistent with the first medical record text label, a target triple list corresponding to the selected medical record text is obtained, wherein the target triple list includes a plurality of target triples, wherein the target triple is obtained in S300 by the following steps: S301, according to the medical record text to be selected, obtaining a list of entities to be selected corresponding to the medical record text to be selected and a list of tags to be selected corresponding to the list of entities to be selected; S302, acquiring a first to-be-selected entity relationship graph corresponding to the to-be-selected entity list according to the to-be-selected entity list and the to-be-selected label list; S303, according to the to-be-selected entity list, obtaining a second to-be-selected entity relationship list corresponding to the to-be-selected entity list; S304, according to the first candidate entity relationship graph and the second candidate entity relationship list, obtain a target triple list corresponding to the candidate medical record text, wherein the target triple list includes a plurality of target triples, and the target triples include two connected candidate entities obtained from the first candidate entity relationship graph and the connection relationship corresponding to the two candidate entities and two candidate entities obtained from the second candidate entity relationship list and the entity relationship labels corresponding to the two candidate entities; S400, based on the target triple list, obtaining a target event list corresponding to the medical record text to be selected, wherein the target event list includes a plurality of target events, and the target event is a target triple obtained from the target triple list; S500, when the target medical record text label is consistent with the second medical record text label, obtain a target event list corresponding to the medical record text to be selected, wherein the target event list includes several target events, and the target events are obtained by inputting the medical record text to be selected into the event extraction model.
2. The data processing system for obtaining events in medical record text according to claim 1, characterized in that: The first medical record text label is the type of medical record text involved in the process node of treating the user when the user has physical abnormalities.
3. The data processing system for obtaining events in medical record text according to claim 1, characterized in that: The system also includes N preset entity tags, wherein the preset entity tags are tags corresponding to pre-set entities, wherein the tags corresponding to the entities are tags corresponding to words representing the user's physical state.
4. The data processing system for obtaining events in medical record text according to claim 3, characterized in that: S301 also includes the following steps: S3011, obtain the initial feature vector list A corresponding to the medical record text to be selected = {A1, ..., A i , ..., A n }, A i =(A i1 , ..., A ij , ..., A im ), A i is the initial feature vector corresponding to the i-th character in the medical record text to be selected, A ij A i The j-th bit value in , j = 1 ... m, m is the dimension of the initial feature vector, i = 1 ... n, n is the number of characters in the medical record text to be selected; S3012, input A into the preset CNN model, and obtain the intermediate feature vector list B corresponding to the medical record text to be selected = {B1, ..., B i , ..., B n }, B i =(B i1 , ..., B ir , ..., B is ), B i is the intermediate feature vector corresponding to the i-th character in the medical record text to be selected, B ir For B i The rth bit value in , r = 1...s, s is the dimension of the intermediate feature vector; S3013, input B into the preset Transformer model, and obtain a list of candidate feature vectors C corresponding to the candidate medical record texts = {C1, ..., C i , ..., C n }, C i =(C i1 , ..., C ih , ..., C ig ), C i is the candidate feature vector corresponding to the i-th character in the candidate medical record text, C ih C i The bit value of the hth bit in , h = 1...g, g is the dimension of the feature vector to be selected, where g meets the following conditions: g = (N + 1) × 4, N is the number of preset entity tags; S3014, according to C, obtain a list of candidate entities corresponding to the medical record text to be selected and a list of candidate labels corresponding to the list of candidate entities, wherein the list of candidate entities includes a number of candidate entities, the candidate entities are entities in the medical record text to be selected identified by combining a preset CNN model and a preset Transformer model, and the list of candidate labels includes a number of candidate labels, the candidate labels are preset entity labels to which the candidate entities are classified.
5. The data processing system for obtaining events in medical record text according to claim 1, characterized in that: In S302, the first entity relationship diagram to be selected is obtained through the following steps: S3021, inputting the list of entities to be selected and the list of labels to be selected into a preset neural network model, obtaining an intermediate entity relationship graph corresponding to the medical record text to be selected, wherein the intermediate entity relationship graph is a tree structure graph of the relationship between the entities to be selected and the entities to be selected constructed based on the list of entities to be selected, and the intermediate entity relationship graph includes a root node to be selected, a plurality of child nodes to be selected, and a plurality of edges to be selected; S30213, when a candidate entity in the candidate entity list is dependent on a candidate entity other than the candidate entity in the candidate entity list, connecting a candidate subnode corresponding to the candidate entity to a candidate subnode corresponding to the dependent candidate entity; S30215: Connect the to-be-selected root node with the to-be-selected child node and connect the to-be-selected child node with the to-be-selected child node to form a to-be-selected edge, so as to obtain a first to-be-selected entity relationship graph.
6. The data processing system for obtaining events in medical record text according to claim 1, characterized in that: In S303, the second entity relationship list to be selected is obtained through the following steps: S3031, according to the candidate medical record text set, obtaining a first candidate label list set corresponding to the candidate medical record text set, wherein the candidate medical record text set includes a plurality of candidate medical record texts; S3032, according to the candidate medical record text set, obtaining a candidate entity list set corresponding to the candidate medical record text set, wherein the candidate entity list set includes a plurality of candidate entity lists, and the candidate entity list includes a plurality of candidate entities; S3033, inputting the candidate entity list set into the initial neural network model to obtain a second candidate label list set, wherein the second candidate label list set includes a plurality of second candidate label lists, the second candidate label list includes a plurality of second candidate labels, and the second candidate labels are preset entity relationship labels corresponding to two candidate entities in each candidate entity list obtained based on the initial neural network model; S3034, obtaining a target parameter θ corresponding to the initial neural network model according to the first candidate label list set and the second candidate label list set; S3035, continuously adjusting the target parameter θ until a preset target condition is met to obtain a target entity relationship model, wherein the preset target condition is: θ≤θ 0 ,θ 0 is the preset target parameter threshold; S3036, input the list of candidate entities into the target entity relationship model, and obtain a second list of candidate entity relationships corresponding to the medical record text to be selected, wherein the second list of candidate entity relationships includes a plurality of second candidate entity relationships, and the second candidate entity relationships include a preset entity relationship label matched based on the target entity relationship model and two candidate entities corresponding to the preset entity label matched.
Citation Information
Patent Citations
Data structuring method and device, computer equipment and storage medium
CN113094477A
Data-driven method for extracting information from electronic medical record
CN113628705A