Intelligent Medical Record Retrieval Method and Device Based on Historical Medical Record Association Mining

By constructing a medical record model and utilizing the self-attention mechanism of candidate perception, convolutional neural networks, and attention pooling mechanism, candidate medical records and patient history medical records are integrated, solving the problem that existing technologies cannot effectively utilize the dynamic correlation between patient medical records, and achieving high-quality medical record retrieval and assisted diagnosis.

CN115620918BActive Publication Date: 2026-11-17TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211317843.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-11-17
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

Existing technologies only consider the similarity of medical record texts, which cannot effectively utilize the dynamic relationships between patient medical records and make it difficult to model the characteristics of patient medical records from the patient's historical medical records and to screen relevant candidate medical records with high quality.

Method used

By constructing a medical record model, utilizing the self-attention mechanism of candidate perception, convolutional neural networks, and attention pooling mechanism, candidate medical records and patient history medical records are fused, a vectorized representation of patient history medical records is modeled, the matching results of candidate medical records are calculated, and relevant candidate medical records are retrieved.

Benefits of technology

It achieves accurate matching between candidate medical records and patients, improves the accuracy and applicability of medical record retrieval, and can better assist in diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115620918B_ABST
    Figure CN115620918B_ABST
Patent Text Reader

Abstract

This application relates to a method and apparatus for intelligent medical record retrieval based on historical medical record association mining. The method includes: modeling candidate medical records and the patient's historical medical records based on a constructed medical record model, constructing a vectorized representation of the medical records; fusing candidate medical records and the patient's historical medical records based on a candidate-aware self-attention mechanism, a candidate-aware convolutional neural network, and a candidate-aware attention pooling mechanism, modeling a vectorized representation of the patient's historical medical records; calculating the matching results of candidate medical records based on the vectorized representations of candidate medical records and the patient's historical medical records, and retrieving relevant candidate medical records. Embodiments of this application can integrate the current patient's treatment history and candidate medical records, incorporating the candidate medical records used for matching into the patient's historical medical record modeling, thereby achieving accurate matching between candidate medical records and patients and improving the accuracy and applicability of the retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical fields of medical record retrieval, natural language processing, and smart healthcare, and in particular to a method and device for intelligent medical record retrieval based on historical medical record association mining. Background Technology

[0002] Healthcare is an important part of improving people's livelihoods. The development of medical technology can improve people's quality of life and extend their lifespan. Due to my country's vast territory and large population, the demand for medical personnel is enormous. In addition, traditional medicine requires experienced doctors to deal with complex medical problems. However, the training cycle for professional medical personnel is long, and training a doctor often requires a lot of time and economic costs. Therefore, the problem of insufficient medical personnel and doctors' lack of clinical experience is an urgent issue to be addressed, especially in grassroots areas and impoverished regions.

[0003] To address the above issues, an effective approach is to inquire about the patient's medical history during diagnosis and search for similar cases in the medical record database. The final diagnosis is then made by referencing the diagnostic processes and treatment plans of these candidate cases. However, hospital medical record databases are typically large, making it difficult for doctors to manually search for similar records. Machine learning-based medical record retrieval technology is considered an effective solution. While machine learning-based medical record retrieval can generally be viewed as a text retrieval task, multiple historical medical records of a patient have dynamic relationships. Existing text retrieval methods only consider pairwise similarity between texts, failing to effectively utilize these relationships and thus hindering the effective mining of historical medical records. Summary of the Invention

[0004] This application provides a method and apparatus for intelligent medical record retrieval based on historical medical record association mining, in order to solve the problems in related technologies that only consider the similarity of medical record texts, cannot effectively utilize the dynamic associations between patient medical records, and are difficult to model the characteristics of patient medical records from the patient's historical medical records and screen relevant candidate medical records with high quality.

[0005] The first aspect of this application provides a method for intelligent medical record retrieval based on historical medical record association mining, comprising the following steps: modeling candidate medical records and the patient's historical medical records based on a constructed medical record model, and constructing a vectorized representation of the medical records; fusing the candidate medical records and the patient's historical medical records based on a candidate-aware self-attention mechanism, a candidate-aware convolutional neural network, and a candidate-aware attention pooling mechanism, and modeling a vectorized representation of the patient's historical medical records; and calculating the matching results of the candidate medical records based on the vectorized representations of the candidate medical records and the patient's historical medical records, and retrieving relevant candidate medical records.

[0006] Optionally, in one embodiment of this application, before modeling the candidate medical records and the patient's historical medical records based on the constructed medical record model, the method further includes: preprocessing the medical record text dataset of the historical medical records, filtering out texts that do not meet preset conditions, and converting the remaining texts into word sequences to obtain text data for modeling.

[0007] Optionally, in one embodiment of this application, the constructed medical record model models candidate medical records and the patient's historical medical records to construct a vectorized representation of the medical records, including: using a word embedding matrix to find the word vector representation of the text in the historical medical records, modeling the interaction between words based on a multi-head self-attention mechanism, modeling the contextual information using an attention pooling mechanism, calculating the importance weight of each word, and weighted summing to obtain the text representation of the medical records; based on the text representation, performing entity matching on the text of the medical records, finding the entity vector representation of the text based on an entity vector embedding matrix, modeling the interaction between entities based on a multi-head self-attention mechanism, modeling the entity contextual information using an attention pooling mechanism, calculating the importance weight of each entity, and weighted summing to obtain the entity representation of the medical records; and connecting the text representation of the medical records and the entity representation of the medical records to obtain the vectorized representation of the medical records.

[0008] Optionally, in one embodiment of this application, the step of employing a candidate-aware self-attention mechanism and a candidate-aware convolutional neural network to fuse the candidate medical records and the patient's historical medical records to model a vectorized representation of the patient's historical medical records includes: fusing the candidate medical records and the historical medical records based on a fused candidate self-attention network to model the long-term features of the patient's historical medical records; fusing the candidate medical records and the historical medical records based on a candidate-aware convolutional neural network to model the short-term features of the patient's historical medical records; and calculating the importance weight of each of the patient's historical medical records based on a candidate-aware attention pooling mechanism, combined with the candidate medical records, to obtain the final representation of the patient's historical medical records through weighted summation.

[0009] Optionally, in one embodiment of this application, obtaining the matching result of the candidate medical records based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records, and retrieving the relevant candidate medical records, includes: calculating the matching score of the candidate medical records based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records; sorting the candidate medical records according to the matching score, and retrieving the relevant candidate medical records.

[0010] A second aspect of this application provides a medical record intelligent retrieval device based on historical medical record association mining, comprising: a first modeling module, used to model candidate medical records and the patient's historical medical records based on a constructed medical record model, and construct a vectorized representation of the medical records; a second modeling module, used to fuse the candidate medical records and the patient's historical medical records based on a candidate-aware self-attention mechanism, a candidate-aware convolutional neural network, and a candidate-aware attention pooling mechanism, and to model a vectorized representation of the patient's historical medical records; and a retrieval module, used to calculate the matching results of the candidate medical records based on the vectorized representations of the candidate medical records and the vectorized representations of the patient's historical medical records, and to retrieve relevant candidate medical records.

[0011] Optionally, in one embodiment of this application, it further includes: a processing module, configured to preprocess the medical record text dataset of the historical medical records before modeling based on the candidate medical records and the patient's historical medical records using the preset medical record model, filter out text that does not meet the preset conditions, and convert the remaining text into word sequences to obtain text data for modeling.

[0012] Optionally, in one embodiment of this application, the first modeling module includes: a first acquisition unit, configured to use a word embedding matrix to find the word vector representation of the text in the historical medical record, model the interaction between words based on a multi-head self-attention mechanism, model the contextual information using an attention pooling mechanism, calculate the importance weight of each word, and sum them up to obtain the text representation of the medical record; a second acquisition unit, configured to perform entity matching on the text of the medical record based on the text representation, find the entity vector representation of the text based on an entity vector embedding matrix, model the interaction between entities based on a multi-head self-attention mechanism, model the entity contextual information using an attention pooling mechanism, calculate the importance weight of each entity, and sum them up to obtain the entity representation of the medical record; and a third acquisition unit, configured to connect the text representation of the medical record and the entity representation of the medical record to obtain the vectorized representation of the medical record.

[0013] Optionally, in one embodiment of this application, the second modeling module includes: a first modeling unit, configured to model the long-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records based on a fusion candidate self-attention network, and combining the candidate medical records; a second modeling unit, configured to model the short-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records based on a candidate-aware convolutional neural network; and a third modeling unit, configured to calculate the importance weight of each of the patient's historical medical records based on a candidate-aware attention pooling mechanism, and combine the candidate medical records to obtain the final representation of the patient's historical medical records by weighted summation.

[0014] Optionally, in one embodiment of this application, the retrieval module includes: a calculation unit, configured to calculate a matching score for the candidate medical records based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records; and a retrieval unit, configured to sort the candidate medical records according to the matching score and retrieve the relevant candidate medical records.

[0015] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the program to implement the intelligent medical record retrieval method based on historical medical record association mining as described in the above embodiments.

[0016] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described intelligent medical record retrieval method based on historical medical record association mining.

[0017] This application's embodiments can integrate the current patient's medical history and candidate medical records, incorporating the candidate medical records used for matching into the patient's historical medical record modeling. This achieves accurate matching between candidate medical records and patients, improving the accuracy and applicability of the retrieval. Therefore, it solves the problems in related technologies that only consider the similarity of medical record texts, cannot effectively utilize the dynamic relationships between patient medical records, and are difficult to model patient medical record characteristics from historical medical records and to screen relevant candidate medical records with high quality.

[0018] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0019] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0020] Figure 1 This is a flowchart illustrating an intelligent medical record retrieval method based on historical medical record association mining, according to an embodiment of this application.

[0021] Figure 2 This is a schematic diagram illustrating the principle of an intelligent medical record retrieval method based on historical medical record association mining according to an embodiment of this application;

[0022] Figure 3 This is a schematic diagram of the structure of an intelligent medical record retrieval device based on historical medical record association mining, according to an embodiment of this application.

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0024] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0025] The following description, with reference to the accompanying drawings, describes an intelligent medical record retrieval method and apparatus based on historical medical record association mining, according to embodiments of this application. Addressing the problems mentioned in the background section regarding related technologies that only consider textual similarity of medical records, failing to effectively utilize the dynamic relationships between patient medical records, and struggling to model patient medical record characteristics and effectively filter relevant candidate medical records from historical records, this application provides an intelligent medical record retrieval method based on historical medical record association mining. In this method, the current patient's treatment history and candidate medical records can be integrated, incorporating the candidate medical records used for matching into the patient's historical medical record modeling. This achieves accurate matching between candidate medical records and patients, improving the accuracy and applicability of the retrieval. Thus, it solves the problems of related technologies that only consider textual similarity of medical records, failing to effectively utilize the dynamic relationships between patient medical records, and struggling to model patient medical record characteristics and effectively filter relevant candidate medical records from historical records.

[0026] Specifically, Figure 1 This is a flowchart illustrating an intelligent medical record retrieval method based on historical medical record association mining, provided in an embodiment of this application.

[0027] like Figure 1 As shown, the intelligent medical record retrieval method based on historical medical record association mining includes the following steps:

[0028] In step S101, the candidate medical records and the patient's historical medical records are modeled based on the constructed medical record model to construct a vectorized representation of the medical records.

[0029] Machine learning-based medical record retrieval technology can generally be viewed as a text retrieval task, that is, by modeling the patient's historical medical records, it retrieves medical record content related to the current patient from a massive amount of medical records.

[0030] Although text retrieval is a relatively mature research field, most existing work only considers the similarity between pairs of medical record texts. However, there are dynamic relationships between multiple historical medical records of a patient, and existing text retrieval work cannot effectively utilize these relationships. The use of patient medical history is based on the following observations: First, patient medical history can be helpful for the current diagnosis and treatment. For patients seeking medical attention, there are often multiple medical records for different diseases, and some of these records may be relevant to the current consultation. These relevant records greatly assist in the diagnosis and the retrieval of similar medical records. Second, the short-term relevance of patient medical behavior helps infer the patient's main medical needs in the short term. For example, a patient's recent medical records may reflect their main symptoms in the near future. Therefore, the short-term relevance of patient medical records is crucial for screening relevant medical records. Third, the long-term correlation between patients' historical medical records provides rich information for modeling the patient's long-term medical history. For example, chronic diseases can be inferred from the patient's historical medical records. Modeling the patient's long-term medical history also greatly helps in screening relevant medical records. Therefore, understanding the patient's long-term and short-term medical history is very helpful for modeling the characteristics of patient medical records and screening relevant candidate medical records, and can help guide the modeling of the patient's long-term and short-term medical history.

[0031] The use of candidate medical records can be based on the following observations: First, candidate medical records are helpful for patient diagnosis. In traditional treatment, candidate medical records reflect the doctor's experience. In AI-assisted treatment, relevant candidate medical records can directly provide reference for auxiliary diagnosis. Second, for a specific medical record, the candidate medical record is only related to a certain disease of the patient and not to other medical histories. This relevance should be better utilized in the modeling process. In the traditional modeling of patient medical history, only the patient's medical history is used to model the overall situation of the patient's medical history, without utilizing the interaction between candidate medical records and different medical records of the patient. If candidate awareness can be achieved when modeling patient features, the matching degree between candidate medical records and patients can be better measured, and medical record retrieval can be completed with higher quality.

[0032] Therefore, based on the aforementioned background technology, which only considers the similarity of medical record texts and cannot effectively utilize the dynamic associations between patient medical records, making it difficult to model patient medical record characteristics from historical medical records and to screen relevant candidate medical records with high quality, this application proposes an intelligent medical record retrieval method based on historical medical record association mining. This method can integrate the current patient's treatment history and candidate medical records, integrating the candidate medical records used for matching into the patient's historical medical record modeling to achieve accurate matching between candidate medical records and patients. First, a candidate-aware self-attention network can be used to model the patient using candidate medical records as guidance. First, long-term features of patient medical records can be learned. Second, candidate-aware convolutional neural networks can be used to incorporate candidate medical records into the local behavioral context of patient medical records to learn short-term features of patient medical records. Third, candidate-aware attention networks can be used to aggregate patient medical records and construct patient representations based on patient medical records guided by candidate medical records by weighting their relevance to candidate medical records. In addition, a method of jointly modeling text and entities can be used to vectorize medical records and train them using negative sampling, thereby effectively utilizing patient medical records to better match candidate medical records.

[0033] In this embodiment, the candidate medical records and the patient's historical medical records are modeled based on the constructed medical record model, and the medical record text and entities are modeled based on the attention mechanism to construct a vectorized representation of the medical records.

[0034] In some embodiments, during the modeling stage of the medical record model, the medical record text and the entities contained in the medical record text can be modeled separately. For the medical record text, word embedding and entity embedding can be used to enhance the information representation of the text and entities. A multi-head self-attention mechanism is used to model the interactions between words and entities in the text, fully capturing the context and entity context in the medical record text. Attention pooling can be used to weight different texts to obtain the text representation of the medical record, and to weight different entities to obtain the entity representation of the medical record. Finally, the text representation and entity representation of the medical record are fused to obtain the final representation of the medical record. In the patient modeling stage of this application embodiment, a candidate-aware convolutional neural network, a candidate-aware self-attention mechanism, and a candidate-aware attention pooling mechanism can be used to fuse candidate medical records and patient history medical records to model the vectorized representation of the patient history medical records. Through this structure, the model can effectively capture local and global information, reduce the influence of a large number of non-standard spellings and synonyms in the medical record text, and model the interactions between words, while effectively accelerating the training and prediction speed.

[0035] Modeling medical record information in the embodiments of this application is very important for assisting diagnosis. Vectorizing the modeling representation of medical records helps to further process the medical records, retrieve relevant candidate medical records, and assist in diagnosis.

[0036] Optionally, in one embodiment of this application, before modeling candidate medical records and patient histories based on the constructed medical record model, the method further includes: preprocessing the medical record text dataset of historical medical records, filtering out texts that do not meet preset conditions, and converting the remaining texts into word sequences to obtain text data for modeling.

[0037] As one possible implementation, embodiments of this application can preprocess the medical record text dataset, use word embedding matrices to find the word vector representation of the text, use a multi-head self-attention mechanism to model the interaction between words, and use an attention pooling mechanism to model the contextual information, calculate the importance weight for each word, and sum the weighted values ​​to obtain the text representation of the medical record, perform entity matching on the medical record text, and filter out text that does not meet certain conditions. Embodiments of this application can also use a multi-head self-attention network after embedding, and use the multi-head self-attention mechanism to model the global information of the text and entities using the local context representation of the text and entities to obtain the global context representation of the text and entities.

[0038] This application embodiment can preprocess the medical record text dataset of historical medical records, filter out text that does not meet preset conditions, such as special symbols and clauses, and convert the remaining text into word sequences to obtain text data for modeling, thereby further achieving accurate matching of candidate medical records and patients, better matching of candidate medical records, and achieving more effective medical record retrieval.

[0039] It is understood that the statements and medical entities in the medical record text in the embodiments of this application are usually context-dependent. A word in the text may interact with multiple words. Therefore, the global context representation of the text and the interaction between words are very important for modeling the medical record text representation. Similarly, medical records often contain a large number of entities, and the large number of medical terms contained therein play a very important role in disease diagnosis. There are similar global interactions between multiple entities contained in the medical record text. Therefore, modeling the global context representation between entities and the interaction between entities is very important for representing medical records.

[0040] In one embodiment of this application, the constructed medical record model models candidate medical records and the patient's historical medical records to construct a vectorized representation of the medical records. This includes: using a word embedding matrix to find the word vector representation of the text in the historical medical records; modeling the interaction between words based on a multi-head self-attention mechanism; modeling the contextual information using an attention pooling mechanism; calculating the importance weight of each word; and weighted summing to obtain the text representation of the medical records. Based on the text representation, entity matching is performed on the text of the medical records; using an entity vector embedding matrix to find the entity vector representation of the text; modeling the interaction between entities based on a multi-head self-attention mechanism; modeling the contextual information of entities using an attention pooling mechanism; calculating the importance weight of each entity; and weighted summing to obtain the entity representation of the medical records. Finally, the text representation and the entity representation of the medical records are connected to obtain the vectorized representation of the medical records.

[0041] This application embodiment uses a word embedding matrix to find the word vector representation of the text in historical medical records, performs entity matching on the medical record text, uses an entity vector embedding matrix to find the entity vector representation of the text, uses a multi-head self-attention mechanism to model the interaction between entities, uses an attention pooling mechanism to model the entity context information, calculates the importance weight for each word, and obtains the final representation by weighted summation based on the calculated weights. The text representation and entity representation of the medical record are then connected to obtain the vectorized representation of the medical record.

[0042] This application embodiment finds the word vector representation of the text through a word vector embedding matrix, uses a multi-head self-attention mechanism to model the interaction between words, uses an attention pooling mechanism to model the contextual information, and calculates the importance weight for each word. For a medical record text sequence s = [w1, w2, ..., w M ], where M is the length of the text sequence; each word is embedded through a character embedding matrix. Mapped to a vector sequence Where V w It refers to the size of the vocabulary, D w It is the embedded dimension.

[0043] In a multi-head self-attention network, the representation vector m of the j-th text or entity generated by the i-th attention head. i,j Let H be the weighted sum of the vectors representing all words in H, calculated as follows:

[0044]

[0045]

[0046]

[0047] U i and Wi These are the projection parameters of the i-th self-attention head. The relative importance of the interaction between the j-th and k-th texts or entities is represented by the multi-head representation m of the j-th word. j It is the concatenation of representation vectors generated by h individual self-attention heads, ultimately resulting in the global context representation m of the text. j =[m 1,j ; 2,j ;…;m i,j ;…m h,j ].

[0048] Because medical record texts can be very noisy, with different words containing varying amounts of information, the attention pooling mechanism models the amount of contextual information, focusing on the information-rich context within the medical record text. The attention pooling network takes word representations as input and computes a weight α for each text segment that reflects its importance. i Finally, the weight α is calculated. i We perform a weighted summation on the global context representation of the text to obtain the final representation p of the medical record text. i .

[0049]

[0050]

[0051]

[0052] Furthermore, embodiments of this application can perform entity matching on medical record text, use entity vector embedding matrices to find entity vector representations of the text, use multi-head self-attention mechanisms to model interactions between entities, use attention pooling mechanisms to model the contextual information of entities, calculate importance weights for each entity, and weightedly sum the entity representations of the medical record. The medical record text contains an entity sequence e = [e1, e2, ..., e...]. N ], where N is the number of entities; each entity is embedded through an entity embedding matrix. Mapped to a vector sequence Where V e It is the size of the entity, D e It is the embedding dimension; similarly, the global context representation n of the entity is calculated. j =[n 1,j ; 2,j ;...; i,j ;…n h,j Furthermore, the final representation q of the entity is obtained through an attention pooling mechanism. i .

[0053] This application embodiment can connect the text representation and entity representation of a medical record to obtain the final representation of the medical record. The final representation of the medical record can be constructed using both the text representation and the entity representation. Each final representation of a medical record has a... i p is a representation of the medical record text i And entity representation q i The series connection, that is:

[0054] c i =[p i ;q i ]

[0055] In step S102, based on the candidate perception self-attention mechanism, the candidate perception convolutional neural network, and the candidate perception attention pooling mechanism, candidate medical records and the patient's historical medical records are fused to model the vectorized representation of the patient's historical medical records.

[0056] The embodiments of this application can model the long-term features of a patient's historical medical records by fusing candidate medical records and historical medical records based on a candidate-aware self-attention network; model the short-term features of a patient's historical medical records by fusing candidate medical records and historical medical records based on a candidate-aware convolutional neural network; and calculate the importance weight of each patient's historical medical records by combining candidate medical records based on an attention pooling mechanism based on candidate awareness, and obtain the final representation of the patient's historical medical records by weighted summation.

[0057] The self-attention mechanism in this application embodiment is an effective method for modeling global information interaction. The multi-head self-attention mechanism can construct a high-quality word context representation by jointly drawing the interaction between words and multiple words. Using the self-attention mechanism, the correlation between patient medical records can be modeled, and the different long-term conditions of patients can be modeled. The convolutional neural network in this application embodiment can model local interactions, fuse candidate medical record information to capture the local context between adjacent medical records, and effectively model the short-term medical history of patients. The attention pooling mechanism of candidate perception can be used to calculate the importance weight for each historical medical record of patients under the guidance of candidate medical records. The weighted summation based on the calculated weights is used to obtain the final representation of the patient's historical medical records, and the modeled patient's historical medical records are vectorized.

[0058] In some cases, different medical records of patients in the embodiments of this application can reflect different long-term conditions of the modeled patient. For example, the patient's first and fourth medical records are related to diabetes, while the third and eighth medical records are related to hypertension. When matching candidate medical records with the patient's condition, it is more advantageous to select medical records that are related to the candidate medical records. Therefore, the candidate-aware self-attention network, the candidate-aware convolutional neural network, and the candidate-aware attention pooling mechanism can utilize the relevant information of candidate medical records when modeling the patient's medical history, and better vectorize the patient's historical medical records for modeling.

[0059] Specifically, the self-attention mechanism in this application embodiment uses This represents the patient's N most recent medical records, using n c In representing candidate medical records, in a multi-head self-attention network, the first method used is... The attention score represents the interaction between the i-th and j-th medical records generated by the k-th self-attention head, and it is calculated as follows:

[0060]

[0061]

[0062] Among them, Q u It is a projection matrix. The attention score is calculated based on the projection parameters of the k-th self-attention head. This represents the relative importance between the i-th and j-th medical records. This represents the interaction between the i-th medical record and all other medical records.

[0063] Furthermore, it can be based on medical records and candidate medical records. i The correlation between the candidate perceptions is used to further obtain the attention scores.

[0064]

[0065] in It is a candidate medical record vector, Q c It is the projection matrix, calculated as follows. Attention scores representing candidate perceptions are derived from a combination of patient's original medical records and candidate medical record information.

[0066] Based on the obtained Attention weight coefficients can be learned

[0067]

[0068] Attention weight coefficient This represents the relative importance of the interaction between the j-th and k-th words learned by the k-th attention head. Furthermore, a weighted representation of the medical record can be obtained by calculating the medical record's significance.

[0069]

[0070] in, The projection parameters of the k-th self-attention head are calculated as follows: For the i-th case representation learned by the k-th attention head, the representation vectors generated by each individual self-attention head can be concatenated. The patient's global context representation I is calculated. k for:

[0071] I k =[I 1,k ; 2,k ;...; i,k ;...I K,k ]

[0072] Where K is the number of attention heads.

[0073] In this embodiment of the application, in addition to the patient's global medical history, the patient's short medical history is also very important for matching candidate medical records. The patient's short medical history can usually be effectively modeled from the local context between the patient's adjacent medical records. Similarly, when modeling the patient's short medical history, integrating candidate medical records into the patient's personal medical history may also better model the local interactions in the patient's medical records.

[0074] In this embodiment, a candidate-aware convolutional neural network is used to model local interactions. The convolutional neural network applies multiple filters to capture latent patterns between adjacent clicks and the local context of candidate messages. The convolution calculation method for the convolutional neural network with a sliding window size of 2h+1 is as follows:

[0075] s i =W c [c i-h ;…;c i ;…;c i+h ]

[0076] In this embodiment, candidate medical records are fused when modeling short-term features of a patient's historical medical records. The candidate medical records are fused during convolutional operations. The calculation method for the candidate perceptual convolutional neural network is as follows:

[0077] s i =W c [c i-h ;…;c i ;…;c i+h ;n c ]

[0078] Among them, W c The parameters of the filters in the candidate perceptual convolutional neural network are represented by s, which are calculated as follows. i This represents the local context of the i-th medical record. Based on a candidate perceptual convolutional neural network, the short-term feature representation of a patient's historical medical records is {s}. i}

[0079] In the embodiments of this application, the candidate-aware convolutional neural network can effectively model the short-term medical history of a patient from the local context between adjacent medical records, integrate candidate medical records into the patient's personal medical history, and better model the local interactions in the patient's medical records.

[0080] The embodiments of this application can employ a candidate-aware self-attention mechanism and a candidate-aware convolutional neural network to fuse candidate medical records and the patient's historical medical records. The candidate-aware attention pooling mechanism is used to model the amount of contextual information. Under the guidance of candidate medical records, importance weights are calculated for each of the patient's historical medical records, and a vectorized representation of the patient's historical medical records is modeled, thereby retrieving relevant candidate medical records more effectively.

[0081] In one embodiment of this application, a vectorized representation of the patient's historical medical records is modeled by fusing candidate medical records and the patient's historical medical records based on a candidate-aware self-attention mechanism, a candidate-aware convolutional neural network, and a candidate-aware attention pooling mechanism. This includes: fusing candidate medical records and historical medical records based on a candidate-aware self-attention network to model the long-term features of the patient's historical medical records; fusing candidate medical records and historical medical records based on a candidate-aware convolutional neural network to model the short-term features of the patient's historical medical records; and calculating the importance weight of each patient's historical medical records in conjunction with the candidate medical records using the candidate-aware attention pooling mechanism, and then weighted summing the weights to obtain the final representation of the patient's historical medical records.

[0082] This application uses a candidate-aware self-attention network to fuse candidate medical records and patient history medical records. Guided by the candidate medical records, it models the long-term characteristics of the patient's history medical records. The patient's long-term medical history can provide important information for modeling the patient's condition. Different patient medical records can model different long-term conditions. Self-attention mechanisms are an effective method for modeling global information interaction. Multi-head self-attention mechanisms construct high-quality word context representations by jointly drawing the interaction between words and multiple words. Multi-head self-attention mechanisms can be used first to model the correlation between patient medical records. This represents the patient's N most recent medical records, using n c In a multi-head self-attention network, candidate medical records can be used first. The attention score represents the interaction between the i-th and j-th medical records generated by the k-th self-attention head, and it is calculated as follows:

[0083]

[0084]

[0085] Among them, Q u It is a projection matrix. The attention score is calculated based on the projection parameters of the k-th self-attention head. This represents the relative importance between the i-th and j-th medical records. This represents the interaction between the i-th medical record and all other medical records.

[0086] Furthermore, it can be based on medical records and candidate medical records. i The correlation between the candidate perceptions is used to further obtain the attention scores.

[0087]

[0088] in, It is a candidate medical record vector, Q c It is the projection matrix, calculated as follows. Attention scores representing candidate perceptions are derived from a combination of patient's original medical records and candidate medical record information.

[0089] Based on the obtained Learning to obtain attention weight coefficients

[0090]

[0091] Attention weight coefficient This represents the relative importance of the interaction between the j-th and k-th words learned by the k-th attention head. Furthermore, a weighted representation of the medical record can be obtained by calculating the medical record's significance.

[0092]

[0093] in, The projection parameters of the k-th self-attention head are calculated as follows: For the i-th case representation learned by the k-th attention head, the representation vectors generated by each individual self-attention head can be concatenated. The patient's global context representation I is calculated. k for:

[0094] I k =[I 1,k ;I 2,k ;…;I i,k ;...I K,k ]

[0095] Where K is the number of attention heads.

[0096] This application uses a candidate-aware convolutional neural network to fuse candidate medical records and patient history medical records. Guided by candidate medical records, it models the short-term features of the patient's history medical records. Besides the patient's global medical history, the patient's short-term medical history is also crucial for matching candidate medical records. The patient's short-term medical history can often be effectively modeled from the local context between adjacent medical records. Similarly, when modeling the patient's short-term medical history, integrating candidate medical records into the patient's personal medical history may better model local interactions within the patient's medical records. Convolutional neural networks can model local interactions. By fusing candidate medical record information, a candidate-aware convolutional neural network can capture the local context between adjacent medical records. Multiple filters can be applied to capture potential patterns between adjacent clicks and the local context of candidate messages. The convolution calculation method for a convolutional neural network with a sliding window size of 2h+1 is as follows:

[0097] s i =W c [c i-h ;…;c i ;…;c i+h ]

[0098] To fuse candidate medical records when modeling short-term features of patient history, candidate medical records can be fused during convolutional operations. The computation method for a candidate perceptual convolutional neural network is as follows:

[0099] s i =W c [c i-h ;…;c i ;…;c i+h ;n c ]

[0100] Among them, W c The parameters of the filters in the candidate perceptual convolutional neural network are represented by s, which are calculated as follows. i This is the local context representation of the i-th medical record, yielding a short-term feature representation of the patient's medical history {s}. i}

[0101] This application uses a candidate-aware attention pooling mechanism to calculate the importance weight for each patient's historical medical record under the guidance of candidate medical records. The weighted summation of these weights yields the final representation of the patient's historical medical record. Since the importance of a patient's historical medical record to the matching degree of the modeling candidate medical records may vary, a candidate-aware attention network can be applied to simulate the importance of historical medical records based on their relevance to candidate medical records. This can be achieved by connecting the global and local contextual representations of the patient's historical medical record to obtain the representation m of the patient's historical medical record. i :

[0102] m i =P m[s i ;I i ]

[0103] Among them, P m It is a projection matrix; furthermore, a multilayer perceptron can be used to fuse patient history medical records. i and candidate records n c Furthermore, an attention pooling mechanism based on candidate perception is employed to calculate the attention weight α for the candidate perception of the i-th medical record. i :

[0104]

[0105] Where, f(m) i ,n c This indicates that a multilayer perceptron network is used to fuse patient history medical records. i and candidate records n c α i Let represent the attention weight of the candidate perception for the i-th medical record. Further, this is achieved by calculating the weight α. i We then perform a weighted summation of the patient's medical history to obtain the final representation of the patient's medical history as follows:

[0106]

[0107] In step S103, based on the vectorized representation of the candidate medical records and the vectorized representation of the patient's historical medical records, the matching results of the candidate medical records are calculated, and relevant candidate medical records are retrieved.

[0108] It is understood that, in the embodiments of this application, the matching score of candidate medical records can be calculated by combining the vectorized representation of the medical records obtained from modeling the medical records with the vectorized representation of the patient's historical medical records. The candidate medical records are then sorted according to the score to obtain the matching results of the candidate medical records. The matching candidate medical records can be retrieved according to the matching results.

[0109] Specifically, embodiments of this application can use a dot product method to calculate the matching score between the patient and the candidate medical record:

[0110]

[0111] In this embodiment, candidate medical records are sorted according to their matching scores, and matching candidate medical records are retrieved. A negative sampling technique is used to randomly sample multiple negative samples for each medical record, calculate the matching score for each, and employ BPR loss for model learning.

[0112]

[0113] Where H is the size of the training samples, and φ is the sigmoid function. and Representing the matching scores of the i-th positive and negative samples respectively, the loss function can be adjusted using the RMSProp (Root Mean Square Prop) optimizer. By optimizing the training model and matching the candidate medical records, relevant candidate medical records can be retrieved more effectively.

[0114] Optionally, in one embodiment of this application, obtaining matching results for candidate medical records based on the vectorized representation of the medical record and the vectorized representation of the patient's historical medical records, and retrieving relevant candidate medical records, includes: calculating the matching score of the candidate medical records based on the vectorized representation of the medical record and the vectorized representation of the patient's historical medical records; sorting the candidate medical records according to the matching score, and retrieving the matched relevant candidate medical records.

[0115] It is understood that the embodiments of this application can, based on the modeling method of medical record representation and patient representation, combined with the method of sorting candidate medical records according to matching scores and retrieving matching candidate medical records and candidate perceived patient historical medical record modeling, obtain the representation n of the candidate medical records. c Let and represent the patient's medical history, respectively. During screening, a matching score can be used to represent the relevance between candidate medical records and patient medical history. A higher matching score indicates a higher degree of matching. The matching score between patients and candidate medical records can be calculated using the dot product method.

[0116]

[0117] This application embodiment can sort candidate medical records according to their matching scores, retrieve matching candidate medical records, and during the training process, negative sampling techniques can be used to randomly sample multiple negative samples for each medical record, calculate the matching score for each, and use BPR (Bayesian Personalized Ranking) loss for model learning, that is:

[0118]

[0119] Where H is the size of the training samples, and φ is the sigmoid function. and These represent the matching scores of the i-th positive and negative samples, respectively. The loss function can be adjusted using the RMSProp optimizer. Optimize and train the model.

[0120] The embodiments of this application can calculate the matching score of candidate medical records based on the vectorized representation of medical records and patient history medical records, and sort the candidate medical records according to the matching score, thereby retrieving the matching and relevant candidate medical records, realizing more effective and high-quality medical record retrieval, and improving the accuracy and applicability of the retrieval.

[0121] Specifically, in combination Figure 2 As shown, an embodiment is used to illustrate in detail the working principle of the intelligent medical record retrieval method based on historical medical record association mining of this application.

[0122] like Figure 2 As shown, embodiments of this application include: a medical record model, a convolutional network for candidate perception, a self-attention network for candidate perception, and attention pooling for candidate perception.

[0123] Specifically, in the medical record model, this application embodiment uses a word vector embedding matrix to find the word vector representation of the text in the historical medical records, performs entity matching on the medical record text, uses an entity vector embedding matrix to find the entity vector representation of the text, uses a multi-head self-attention mechanism to model the interaction between entities, uses an attention pooling mechanism to model the entity context information, calculates the importance weight for each word, and obtains the final representation by weighted summation based on the calculated weights. Finally, the text representation and entity representation of the medical record are connected to obtain the vectorized representation of the medical record.

[0124] In this application embodiment, a candidate-aware self-attention network is used to model the long-term features of the patient's historical medical records, a candidate-aware convolutional neural network is used to model the short-term features of the patient's historical medical records, and a candidate-aware attention pooling mechanism is used to calculate the importance weight of each patient's historical medical records in combination with candidate medical records, and then the weighted sum is used to obtain the final representation of the patient's historical medical records.

[0125] The intelligent medical record retrieval method based on historical medical record association mining proposed in this application can integrate the current patient's treatment history and candidate medical records, incorporating the candidate medical records used for matching into the patient's historical medical record modeling. This achieves accurate matching between candidate medical records and patients, improving the accuracy and applicability of the retrieval. Therefore, it solves the problems in related technologies that only consider the similarity of medical record texts, cannot effectively utilize the dynamic associations between patient medical records, and are difficult to model patient medical record characteristics and screen relevant candidate medical records with high quality from the patient's historical medical records.

[0126] Next, referring to the accompanying drawings, we describe the intelligent medical record retrieval device based on historical medical record association mining proposed according to the embodiments of this application.

[0127] Figure 3 This is a block diagram of a medical record intelligent retrieval device based on historical medical record association mining, according to an embodiment of this application.

[0128] like Figure 3 As shown, the intelligent medical record retrieval device 10 based on historical medical record association mining includes: a first modeling module 100, a second modeling module 200, and a retrieval module 300.

[0129] Specifically, the first modeling module 100 is used to model candidate medical records and patients' historical medical records based on the constructed medical record model, and to construct a vectorized representation of the medical records.

[0130] The second modeling module 200 is used to model the vectorized representation of the patient's historical medical records by fusing candidate medical records and the patient's historical medical records based on the candidate-aware self-attention mechanism, the candidate-aware convolutional neural network, and the candidate-aware attention pooling mechanism.

[0131] The retrieval module 300 is used to calculate the matching results of candidate medical records and retrieve relevant candidate medical records based on the vectorized representation of candidate medical records and the vectorized representation of the patient's historical medical records.

[0132] Optionally, in one embodiment of this application, the retrieval device 10 of this application embodiment further includes a processing module.

[0133] The processing module is used to preprocess the historical medical record text dataset before modeling candidate medical records and patients' historical medical records based on the constructed medical record model. It filters out text that does not meet the preset conditions and converts the remaining text into word sequences to obtain text data for modeling.

[0134] Optionally, in one embodiment of this application, the first modeling module 100 includes: a first acquisition unit, a second acquisition unit, and a third acquisition unit.

[0135] The first acquisition unit is used to find the word vector representation of the text in the historical medical records using the word vector embedding matrix, and to model the interaction between words based on the multi-head self-attention mechanism, model the contextual information using the attention pooling mechanism, calculate the importance weight of each word, and obtain the text representation of the medical records by weighted summation.

[0136] The second acquisition unit is used to perform entity matching on the text of medical records based on text representation, find the entity vector representation of the text based on the entity vector embedding matrix, model the interaction between entities based on the multi-head self-attention mechanism, model the entity context information using the attention pooling mechanism, calculate the importance weight of each entity, and sum the entity representations of the medical records in a weighted manner.

[0137] The third acquisition unit is used to connect the text representation and entity representation of the medical record to obtain the vectorized representation of the medical record.

[0138] Optionally, in one embodiment of this application, the second modeling module 200 includes: a first modeling unit, a second modeling unit, and a third modeling unit.

[0139] The first modeling unit is used to model the long-term characteristics of a patient's historical medical records based on a fusion candidate self-attention network that integrates candidate medical records and historical medical records.

[0140] The second modeling unit is used to model the short-term features of a patient's historical medical records by fusing candidate medical records and historical medical records based on a candidate-aware convolutional neural network.

[0141] The third modeling unit is used for candidate-aware attention pooling mechanism, which combines candidate medical records to calculate the importance weight of each patient's historical medical records, and then sums them up to obtain the final representation of the patient's historical medical records.

[0142] Optionally, in one embodiment of this application, the retrieval module 300 includes a calculation unit and a retrieval unit.

[0143] The computation unit is used to calculate the matching score of candidate medical records based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records.

[0144] The retrieval unit is used to sort candidate medical records according to their matching scores and retrieve relevant candidate medical records.

[0145] It should be noted that the foregoing explanation of the embodiment of the intelligent medical record retrieval method based on historical medical record association mining also applies to the intelligent medical record retrieval device based on historical medical record association mining in this embodiment, and will not be repeated here.

[0146] The intelligent medical record retrieval device based on historical medical record association mining proposed in this application can integrate the current patient's treatment history and candidate medical records, and integrate the candidate medical records used for matching into the patient's historical medical record modeling, so as to achieve accurate matching between candidate medical records and patients, and improve the accuracy and applicability of retrieval. This solves the problems in related technologies that only consider the similarity of medical record text, cannot effectively utilize the dynamic associations between patient medical records, and are difficult to model patient medical record characteristics and screen relevant candidate medical records with high quality from the patient's historical medical records.

[0147] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include:

[0148] The memory 401, the processor 402, and the computer program stored on the memory 401 and capable of running on the processor 402.

[0149] When the processor 402 executes the program, it implements the intelligent medical record retrieval method based on historical medical record association mining provided in the above embodiments.

[0150] Furthermore, electronic devices also include:

[0151] Communication interface 403 is used for communication between memory 401 and processor 402.

[0152] The memory 401 is used to store computer programs that can run on the processor 402.

[0153] The memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0154] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0155] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.

[0156] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.

[0157] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described intelligent medical record retrieval method based on historical medical record association mining.

[0158] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0159] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0160] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0161] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0162] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0163] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0164] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0165] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for intelligent medical record retrieval based on historical medical record association mining, characterized in that, Includes the following steps: Based on the constructed medical record model, candidate medical records and patients' historical medical records are modeled to construct a vectorized representation of the medical records; Based on the candidate-aware self-attention mechanism, the candidate-aware convolutional neural network, and the candidate-aware attention pooling mechanism, the candidate medical records and the patient's historical medical records are fused to model a vectorized representation of the patient's historical medical records. as well as Based on the vectorized representation of the candidate medical records and the vectorized representation of the patient's historical medical records, the matching results of the candidate medical records are calculated, and relevant candidate medical records are retrieved. The process involves modeling candidate medical records and patients' historical medical records using the constructed medical record model, and constructing a vectorized representation of the medical records. This includes: using a word embedding matrix to find the word vector representations of the text in the historical medical records, modeling the interactions between words based on a multi-head self-attention mechanism, modeling the contextual information using an attention pooling mechanism, calculating the importance weight of each word, and weighted summing to obtain the text representation of the medical records; performing entity matching on the text of the medical records based on the text representation, finding the entity vector representations of the text based on an entity vector embedding matrix, modeling the interactions between entities based on a multi-head self-attention mechanism, modeling the contextual information of entities using an attention pooling mechanism, calculating the importance weight of each entity, and weighted summing to obtain the entity representation of the medical records; and concatenating the text representation and the entity representation of the medical records to obtain the vectorized representation of the medical records. The candidate-aware self-attention mechanism, candidate-aware convolutional neural network, and candidate-aware attention pooling mechanism, which fuse the candidate medical records and the patient's historical medical records, model a vectorized representation of the patient's historical medical records. This includes: modeling the long-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records using a fused candidate self-attention network; modeling the short-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records using a candidate-aware convolutional neural network; and calculating the importance weight of each of the patient's historical medical records using the candidate-aware attention pooling mechanism, and then weighted summing these weights to obtain the final representation of the patient's historical medical records. This also includes: sorting the candidate medical records according to their matching scores, retrieving matching candidate medical records, and during training, using negative sampling techniques to randomly sample multiple negative samples for each medical record, calculating the matching score for each, and using BPR loss for model learning, i.e.: in, It is the size of the training samples. It is the Sigmoid function. and represents the matching scores of the i-th positive sample and the i-th negative sample, respectively.

2. The method according to claim 1, characterized in that, Before modeling the candidate medical records and the patient's historical medical records based on the constructed medical record model, the following steps are also included: The historical medical record text dataset is preprocessed to filter out text that does not meet preset conditions, and the remaining text is converted into word sequences to obtain text data for modeling.

3. The method according to claim 1, characterized in that, The matching results of the candidate medical records are obtained based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records, and relevant candidate medical records are retrieved, including: Based on the vectorized representation of the medical record and the vectorized representation of the patient's historical medical records, the matching score of the candidate medical record is calculated; The candidate medical records are sorted according to the matching score, and the relevant candidate medical records are retrieved.

4. A medical record intelligent retrieval device based on historical medical record association mining, employing the medical record intelligent retrieval method based on historical medical record association mining as described in any one of claims 1-3, characterized in that, include: The first modeling module is used to model candidate medical records and patients' historical medical records based on the constructed medical record model, and to construct a vectorized representation of the medical records. The second modeling module is used to fuse the candidate medical records and the patient's historical medical records based on the candidate-aware self-attention mechanism, the candidate-aware convolutional neural network, and the candidate-aware attention pooling mechanism, and to model the vectorized representation of the patient's historical medical records. as well as The retrieval module is used to calculate the matching results of the candidate medical records based on the vectorized representation of the candidate medical records and the vectorized representation of the patient's historical medical records, and to retrieve relevant candidate medical records. The first modeling module includes: a first acquisition unit, configured to use a word embedding matrix to find the word vector representation of the text in the historical medical records, model the interaction between words based on a multi-head self-attention mechanism, model the contextual information using an attention pooling mechanism, calculate the importance weight of each word, and obtain the text representation of the medical records by weighted summation; a second acquisition unit, configured to perform entity matching on the text of the medical records based on the text representation, find the entity vector representation of the text based on an entity vector embedding matrix, model the interaction between entities based on a multi-head self-attention mechanism, model the entity contextual information using an attention pooling mechanism, calculate the importance weight of each entity, and obtain the entity representation of the medical records by weighted summation; and a third acquisition unit, configured to connect the text representation and the entity representation of the medical records to obtain the vectorized representation of the medical records. The second modeling module includes: a first modeling unit, used to model the long-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records based on a fusion candidate self-attention network, and combining them with candidate medical records; a second modeling unit, used to model the short-term features of the patient's historical medical records by fusing the candidate medical records and the historical medical records based on a candidate-aware convolutional neural network; and a third modeling unit, used to calculate the importance weight of each historical medical record of the patient based on a candidate-aware attention pooling mechanism, and combine it with the candidate medical records to obtain the final representation of the patient's historical medical records through weighted summation. This also includes: sorting the candidate medical records according to their matching scores, retrieving matching candidate medical records, and during training, using negative sampling techniques to randomly sample multiple negative samples for each medical record, calculating the matching score for each, and using BPR loss for model learning, i.e.: in, It is the size of the training samples. It is the Sigmoid function. and represents the matching scores of the i-th positive sample and the i-th negative sample, respectively.

5. The apparatus according to claim 4, characterized in that, Also includes: The processing module is used to preprocess the medical record text dataset of the historical medical records before modeling based on the candidate medical records and the patient's historical medical records using the medical record model, filter out text that does not meet preset conditions, and convert the remaining text into word sequences to obtain text data for modeling.

6. The apparatus according to claim 4, characterized in that, The retrieval module includes: A calculation unit is used to calculate the matching score of the candidate medical records based on the vectorized representation of the medical records and the vectorized representation of the patient's historical medical records; The retrieval unit is used to sort the candidate medical records according to the matching score and retrieve the relevant candidate medical records.

7. An electronic device, characterized in that, include: The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the intelligent medical record retrieval method based on historical medical record association mining as described in any one of claims 1-3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the intelligent medical record retrieval method based on historical medical record association mining as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Reference medical record search method and device based on structural medical record database

    CN104881463A

  • Personalized search system based on interactive matching

    CN112069399A