Quality control model training method, quality control method, device, equipment and program product
By using quality control models in the electronic medical record quality control system, combining medical terms and structured knowledge of electronic medical record, the quality control model is optimized, and the problem of complex quality control rules and inconsistent terms in the electronic medical record quality control system has been solved, and electronics has been improved Medical record data quality and accuracy of analysis results.
Patent Information
- Application Number
- CN202411250490.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-10
AI Technical Summary
The existing electronic medical record quality control system has problems such as complex disassembly of quality control rules, inconsistent medical terminology, and incomplete quality control scope, resulting in poor quality control data quality and affecting the accuracy of data analysis and utilization results.
The training method of the quality control model is adopted, and the basic quality control model is obtained by obtaining pre-trained basic quality control models, combining the multi-dimensional embedding vectors of medical terms and directed graph structures of electronic medical records, adjusting model parameters, and optimizing using graph convolutional neural networks and self-attention mechanisms The quality control model enables it to better learn medical terminology and structured knowledge of electronic medical records.
Improve the accuracy and effectiveness of electronic medical record quality control, improve the timeliness, completeness, consistency, logical accuracy and term standardization of electronic medical record descriptions, comprehensively improve the quality of electronic medical record, and enhance the reliability of data. and share utilization value.
Smart Images

Figure CN119108064A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of natural language processing, and in particular, to a quality control model training method, an electronic medical record quality control method, a quality control model training device, an electronic medical record quality control device, an electronic device, and a computer program product. Background Art
[0002] With the deep integration of health care services and information technology, massive amounts of health care data have emerged, becoming an important basic strategic resource. The open sharing, deep mining and wide application of medical and health big data need to be further promoted.
[0003] One of the core contents of medical and health big data is electronic medical records. The quality of medical record data of various medical institutions varies greatly, and the data reliability is insufficient. The resulting bias in data analysis and utilization results has hindered the advantages of data elements. With the continuous growth of medical knowledge and the sharp increase in medical data, the traditional electronic medical record quality control system, through experts disassembling quality control rules and solving them point by point through customized rules, has problems such as complex quality control rule disassembly, inconsistent medical terminology, one-sided quality control rules, and incomplete quality control scope.
[0004] In view of this, there is an urgent need in this field for a method that can solve the quality control problem of electronic medical records.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a quality control model training method, an electronic medical record quality control method, a quality control model training device, an electronic medical record quality control device, an electronic device and a computer program product, thereby at least being able to solve the quality control problem of electronic medical records to a certain extent.
[0007] According to a first aspect of the present disclosure, a method for training a quality control model is provided, comprising:
[0008] Obtaining a pre-trained basic quality control model, wherein the basic quality control model includes a text pre-training layer and a structure pre-training layer;
[0009] Acquire medical terms from a medical corpus, and obtain corresponding multi-dimensional embedding vectors according to the medical terms;
[0010] Adjusting the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term;
[0011] Acquire the electronic medical records of historical patients, and obtain the directed graph structure of the electronic medical records based on the medical information in the electronic medical records;
[0012] The model parameters in the text pre-training layer and the structure pre-training layer are adjusted according to the directed graph structure of the electronic medical record to obtain the quality control model.
[0013] In an exemplary embodiment of the present disclosure, obtaining a corresponding multi-dimensional embedding vector according to the medical term includes:
[0014] Obtaining a corresponding word embedding vector according to the medical term;
[0015] Obtaining a fragment embedding vector corresponding to the medical term according to the phrase fragment in which the medical term is located;
[0016] Obtaining a position embedding vector corresponding to the medical term according to the position information of the medical term in the complete sentence;
[0017] Matching the medical term with a medical knowledge graph to obtain an entity category of the medical term, and obtaining a category embedding vector corresponding to the medical term according to the entity category;
[0018] The corresponding multi-dimensional embedding vector of the medical term is obtained according to the word embedding vector, the fragment embedding vector, the position embedding vector and the category embedding vector.
[0019] In an exemplary embodiment of the present disclosure, obtaining the directed graph structure of the electronic medical record according to the medical information in the electronic medical record includes:
[0020] Acquire single medical visit information in the electronic medical record, and obtain an undirected graph structure of the single medical visit according to various entities in the single medical visit information;
[0021] The undirected graph structure of the single medical visit is mapped into the medical knowledge graph, and the directed graph structure of the electronic medical record is obtained according to the topological structure of each entity.
[0022] In an exemplary embodiment of the present disclosure, adjusting the model parameters in the text pre-training layer and the structure pre-training layer according to the directed graph structure of the electronic medical record to obtain the quality control model includes:
[0023] Based on the transition probabilities between each type of entity in the electronic medical record, construct an initialized transition probability matrix;
[0024] Obtaining an entity node matrix according to the directed graph structure of the electronic medical record, and inputting the entity node matrix and the initialized transition probability matrix into the graph convolutional neural network;
[0025] In the graph convolutional neural network, the entity node matrix is iterated based on a self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer.
[0026] In an exemplary embodiment of the present disclosure, constructing an initialized transition probability matrix based on the transition probabilities between each type of entity in the electronic medical record includes:
[0027] Traversing various entities in the electronic medical record, and obtaining the number of occurrences of the entity corresponding to each pair of nodes in the transition probability matrix in the electronic medical record;
[0028] Determine the transition probability between each entity in the electronic medical record according to the number of occurrences;
[0029] The transition probability of each row in the transition probability matrix is normalized, and an initialized transition probability matrix is obtained according to the normalized transition probability.
[0030] In an exemplary embodiment of the present disclosure, the iterating the entity node matrix based on the self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer includes:
[0031] Obtaining a query vector matrix, a key vector matrix and a numerical vector matrix according to the entity node matrix and the trainable parameter matrix;
[0032] Acquire medical prior knowledge, and convert the medical prior knowledge into a prior knowledge matrix according to the query vector matrix and the key vector matrix;
[0033] Iterating the entity node matrix based on the prior knowledge matrix and the transition probability matrix;
[0034] Based on the model loss in the iterative process, the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer are updated.
[0035] According to a second aspect of the present disclosure, a quality control method for an electronic medical record is provided, comprising:
[0036] Acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data;
[0037] Adjusting the model parameters in the quality control model according to the electronic medical record quality control data to obtain a target quality control model, wherein the quality control model is obtained by the above-mentioned quality control model training method;
[0038] The target prompt information is input into the target quality control model to obtain the quality control result of the electronic medical record quality control data.
[0039] In an exemplary embodiment of the present disclosure, adjusting the model parameters in the quality control model according to the electronic medical record quality control data to obtain the target quality control model includes:
[0040] Obtaining mask task data according to the electronic medical record quality control data, and obtaining mask prompt information according to the mask task data;
[0041] Inputting the mask prompt information into the quality control model to obtain a plurality of mask prediction results of the mask positions in the mask task data;
[0042] Obtaining a plurality of prediction task data according to the mask task data and the plurality of mask prediction results;
[0043] Searching the medical corpus based on the prediction task data to obtain similar corpus data of the prediction task data, and obtaining an expanded corpus set based on the similar corpus data;
[0044] The model parameters in the quality control model are adjusted based on the expanded corpus set to obtain a target quality control model.
[0045] According to a third aspect of the present disclosure, a training device for a quality control model is provided, comprising:
[0046] A pre-trained model acquisition module is used to acquire a pre-trained basic quality control model, wherein the basic quality control model includes a text pre-training layer and a structure pre-training layer;
[0047] An embedding vector acquisition module, used to acquire medical terms from a medical corpus and obtain corresponding multi-dimensional embedding vectors according to the medical terms;
[0048] A first layer parameter adjustment module, used for adjusting the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term;
[0049] A directed graph structure acquisition module is used to acquire the electronic medical records of historical patients and obtain the directed graph structure of the electronic medical records according to the medical information in the electronic medical records;
[0050] The second layer parameter adjustment module is used to adjust the model parameters in the text pre-training layer and the structure pre-training layer according to the directed graph structure of the electronic medical record to obtain the quality control model.
[0051] According to a fourth aspect of the present disclosure, there is provided a quality control device for an electronic medical record, comprising:
[0052] A target data acquisition module is used to acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data;
[0053] A target model determination module, used for adjusting the model parameters in the quality control model according to the electronic medical record quality control data to obtain a target quality control model, wherein the quality control model is obtained by the above-mentioned quality control model training method;
[0054] The quality control result determination module is used to input the target prompt information into the target quality control model to obtain the quality control result of the electronic medical record quality control data.
[0055] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned quality control model training methods by executing the executable instructions.
[0056] According to a sixth aspect of the present disclosure, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the training method of the quality control model described in any one of the above items is implemented.
[0057] The exemplary embodiments of the present disclosure may have the following beneficial effects:
[0058] In the training method of the quality control model of the example implementation method of the present disclosure, a pre-trained basic quality control model is obtained, including a text pre-training layer and a structure pre-training layer, and then the first layer of training is performed according to the multi-dimensional embedding vector of the medical terminology, and then the second layer of training is performed according to the directed graph structure of the electronic medical record. The training method of the quality control model in the example implementation method of the present disclosure, on the one hand, optimizes the pre-trained basic quality control model through fine-tuning of the medical terminology system and the electronic medical record, so that the quality control model fully learns the medical terminology knowledge and the structured knowledge of the electronic medical record, which can solve the problem of inconsistent description language and non-intercommunication of semantics in the electronic medical record record, and improve the accuracy and effectiveness of the quality control of the electronic medical record text; on the other hand, by realizing intelligent semantic quality control of the electronic medical record, the timeliness, completeness, consistency, logical accuracy, rationality of diagnosis and treatment, and terminology standardization of the electronic medical record text description can be improved, and the quality of the electronic medical record can be comprehensively improved, and the reliability of the electronic medical record data and the value of data sharing and utilization can be enhanced.
[0059] In the quality control method for electronic medical records of the example implementation of the present disclosure, the parameters in the quality control model are fine-tuned through specific task data, and the quality control of the electronic medical records is performed using the fine-tuned quality control model. After the model is deployed, the quality control model can be continuously adjusted to adapt to new data and tasks, thereby maintaining the robustness and adaptability of the model.
[0060] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0062] Figure 1 A schematic diagram showing the research process of electronic medical record quality control based on a large model is shown;
[0063] Figure 2 A schematic diagram showing a flow chart of a method for training a quality control model according to an exemplary embodiment of the present disclosure;
[0064] Figure 3 A schematic diagram of a process of obtaining a multi-dimensional embedding vector according to medical terms according to an exemplary embodiment of the present disclosure is shown;
[0065] Figure 4 A schematic diagram showing a process of obtaining a directed graph structure of an electronic medical record according to an exemplary embodiment of the present disclosure;
[0066] Figure 5 A schematic diagram of a process of adjusting model parameters according to a directed graph structure in an exemplary embodiment of the present disclosure is shown;
[0067] Figure 6 A schematic diagram of a process for constructing an initialized transition probability matrix according to an exemplary embodiment of the present disclosure is shown;
[0068] Figure 7 A schematic diagram of a process for updating model parameters based on a self-attention mechanism according to an exemplary embodiment of the present disclosure is shown;
[0069] Figure 8 A schematic diagram showing a flow chart of a quality control method for electronic medical records according to an exemplary embodiment of the present disclosure;
[0070] Fig. 9 A schematic diagram of a process for adjusting model parameters in a quality control model to obtain a target quality control model according to an exemplary embodiment of the present disclosure is shown;
[0071] Fig.10 A block diagram of a training device for a quality control model according to an exemplary embodiment of the present disclosure is shown;
[0072] Fig.11 A block diagram of a quality control device for electronic medical records according to an exemplary embodiment of the present disclosure is shown;
[0073] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0074] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0075] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0076] In some related embodiments, large-scale pre-trained models can extract key information from large and complex medical literature, medical records, and imaging data, assist doctors in making accurate diagnoses and formulating individualized treatment plans, and provide medical management departments with new medical quality control methods. In the development of electronic medical record semantic quality control technology for medical quality control, technologies or methods such as natural language processing, knowledge graphs, deep learning, and large-scale pre-trained models have been valued and applied, especially large-scale pre-trained models have demonstrated their superior performance in semantic processing tasks. Building large models in the medical vertical field is a challenging research that aims to improve the efficiency of medical information processing and understanding through technologies such as deep learning and natural language processing.
[0077] Figure 1 The figure shows a schematic diagram of the research process of electronic medical record quality control based on the big model. Figure 1 As shown in the figure, the research on building big models in the medical vertical field faces many challenges:
[0078] (1) Electronic medical record description languages are not unified and semantics are not interoperable between hospitals. By extracting information from electronic medical records, medical entities that are semantically associated with the medical entities in the information to be processed are obtained from the preset medical knowledge graph, and the rules are run to obtain the quality control results of the electronic medical records. This method does not standardize medical entities, and differences in medical record terminology among doctors will lead to failures in medical record quality control.
[0079] (2) There is a lack of effective integration between machine models and real-world patient diagnosis and treatment data. Based on the error correction knowledge base at the data center end, natural language processing technology is used to perform error detection for medical record data quality control. The error correction rule base that this method relies on is mostly derived from standard documents in practice. There is a lack of dynamic update of rules, and it is difficult to dynamically identify the connotation and logic errors of various types of medical records.
[0080] (3) The accuracy and effectiveness of large-scale pre-trained models applied to electronic medical record text analysis are insufficient. Large-scale pre-trained models (such as the LLM large language model) have demonstrated their advantages in natural language processing, but these pre-trained models are based on statistical modeling methods, lack medical knowledge and medical reasoning rule training, and lack interpretable deep understanding of medical applications and logical reasoning capabilities. Therefore, it is difficult for the model to accurately perform semantic recognition of Chinese medical texts, cannot obtain a global solution space that describes diagnosis and treatment activities, and is difficult to integrate with the actual clinical diagnosis and treatment decision-making process. In addition, machine learning quality control models can train machine learning models for specific quality control points in medical records, and multiple groups of machine learning models can solve each quality control point one by one, but there are still problems such as difficulty in annotating machine learning corpora.
[0081] Based on the above problems, this example implementation first provides a training method for a quality control model. Figure 2 As shown, the training method of the above quality control model may include the following steps:
[0082] Step S210: Obtain a pre-trained basic quality control model, where the basic quality control model includes a text pre-training layer and a structure pre-training layer.
[0083] Step S220: Obtain medical terms from the medical corpus, and obtain corresponding multi-dimensional embedding vectors based on the medical terms.
[0084] Step S230: Adjust the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term.
[0085] Step S240: Obtain the electronic medical records of historical patients, and obtain the directed graph structure of the electronic medical records based on the medical information in the electronic medical records.
[0086] Step S250. Adjust the model parameters in the text pre-training layer and the structure pre-training layer according to the directed graph structure of the electronic medical record to obtain a quality control model.
[0087] In the training method of the quality control model of the example implementation method of the present disclosure, a pre-trained basic quality control model is obtained, including a text pre-training layer and a structure pre-training layer, and then the first layer of training is performed according to the multi-dimensional embedding vector of the medical terminology, and then the second layer of training is performed according to the directed graph structure of the electronic medical record. The training method of the quality control model in the example implementation method of the present disclosure, on the one hand, optimizes the pre-trained basic quality control model through fine-tuning of the medical terminology system and the electronic medical record, so that the quality control model fully learns the medical terminology knowledge and the structured knowledge of the electronic medical record, which can solve the problem of inconsistent description language and non-intercommunication of semantics in the electronic medical record record, and improve the accuracy and effectiveness of the quality control of the electronic medical record text; on the other hand, by realizing intelligent semantic quality control of the electronic medical record, the timeliness, completeness, consistency, logical accuracy, rationality of diagnosis and treatment, and terminology standardization of the electronic medical record text description can be improved, and the quality of the electronic medical record can be comprehensively improved, and the reliability of the electronic medical record data and the value of data sharing and utilization can be enhanced.
[0088] Next, combine Figures 3 to 7 The above steps of this exemplary embodiment are described in more detail.
[0089] In step S210, a pre-trained basic quality control model is obtained, where the basic quality control model includes a text pre-training layer and a structure pre-training layer.
[0090] In this example implementation, the pre-trained basic quality control model refers to a pre-trained model that can complete basic quality control tasks, such as a pre-trained model with a BERT (Bidirectional Encoder Representation from Transformers) model as the basic framework. On the basis of the basic quality control model, by fine-tuning the parameters of the text pre-training layer and the structure pre-training layer, the general learning ability of the quality control model can be improved and the effectiveness of quality control can be improved. Among them, the text pre-training layer is used to learn medical terminology knowledge, and the structure pre-training layer is used to learn the structural knowledge of electronic medical records. The structure pre-training layer can be a graph convolutional neural network.
[0091] In step S220, medical terms are obtained from a medical corpus, and corresponding multi-dimensional embedding vectors are obtained according to the medical terms.
[0092] In this example implementation, medical terms can be obtained from a medical corpus, and multi-dimensional information representation can be performed on the medical terms to improve the word embedding method of the original pre-trained language model.
[0093] In this example implementation, Figure 3 As shown in the figure, obtaining the corresponding multi-dimensional embedding vector according to the medical terminology may include the following steps:
[0094] Step S310: Obtain corresponding word embedding vectors according to medical terms.
[0095] The first word embedding method is Token Embeddings, which is the embedding of the word itself. The corresponding word embedding vector is obtained according to the medical term itself, denoted as E tok .
[0096] Step S320: Obtain a fragment embedding vector corresponding to the medical term according to the phrase fragment where the medical term is located.
[0097] The second word embedding method is Segment Embeddings, that is, fragment embedding. From the medical corpus, we can obtain the phrase fragments where the medical terms are located. According to the fragments where the medical terms are located, we can get the corresponding fragment embedding vector, which is denoted as E seq .
[0098] Step S330: Obtain the position embedding vector corresponding to the medical term according to the position information of the medical term in the complete sentence.
[0099] The third word embedding method is Position Embeddings, which is position embedding. The complete sentence containing the medical term can be obtained from the medical corpus. By obtaining the position information of the medical term in the complete sentence, a vector representation is learned at each position to encode the sequence order information, which is recorded as E. pos .
[0100] Step S340. Match the medical term with the medical knowledge graph to obtain the entity category of the medical term, and obtain the category embedding vector corresponding to the medical term based on the entity category.
[0101] In addition to the above three word embedding methods, medical terms can also be matched with existing medical knowledge graphs to semantically enhance the information integrated into the knowledge graph. By obtaining all entity types of the input medical terms, category embedding is performed according to the entity type, which can be expressed as the product of the one-hot encoding input and the embedding matrix.
[0102] Step S350. Obtain the corresponding multi-dimensional embedding vector of the medical term according to the word embedding vector, the fragment embedding vector, the position embedding vector and the category embedding vector.
[0103] The final encoded multi-dimensional information representation can be expressed as:
[0104]
[0105] Among them, O typeIndicates the position of the input medical term in the entity category set, and then performs one-hot encoding; Represents the corresponding embedding parameter matrix to be trained; S is the dimension of the root dictionary and the dimension of the entity category set, and H is the embedding dimension.
[0106] In addition, the corresponding multidimensional embedding vector of the medical term can be obtained according to any embedding vectors among the word embedding vector, the fragment embedding vector, the position embedding vector and the category embedding vector. The corresponding multidimensional embedding vector of the medical term can also be obtained by combining other types of embedding vectors. This is not specifically limited in the present example implementation.
[0107] In this example implementation, the features of meta-words and term graph adjacent entities are incorporated into the embedding vector of the original input text, and the graph neighbor node information corresponding to the input text entity is combined to construct an entity-neighbor hybrid attention model, and the encoded semantic representation is obtained through model denoising.
[0108] In step S230, the model parameters in the text pre-training layer are adjusted according to the multi-dimensional embedding vector corresponding to the medical term.
[0109] After obtaining the multi-dimensional embedding vector corresponding to the medical term, the model parameters in the text pre-training layer are adjusted according to the vector so that the text pre-training layer can fully learn the medical term knowledge.
[0110] In step S240, the electronic medical records of historical patients are obtained, and the directed graph structure of the electronic medical records is obtained according to the medical consultation information in the electronic medical records.
[0111] In this example implementation, a graph structure can be used to represent structured electronic medical records and learn the implicit structure of electronic medical records, wherein the graph structure is a nonlinear data structure and can include an undirected graph structure and a directed graph structure. All edges in the undirected graph structure have no directionality, while the edges in the directed graph structure have directionality. In addition, other types of graph structures can also be used to represent structured electronic medical records, such as a hybrid graph structure or a weighted graph structure, etc., which are not specifically limited in this example implementation.
[0112] In this example implementation, Figure 4 As shown, the directed graph structure of the electronic medical record is obtained according to the medical information in the electronic medical record, which may specifically include the following steps:
[0113] Step S410: Obtain single medical visit information in the electronic medical record, and obtain an undirected graph structure of the single medical visit based on various entities in the single medical visit information.
[0114] For the structured electronic medical record of the same patient, the tth visit will have corresponding information on examinations, diagnoses, tests, treatments, medications, etc. Different types of information in the same visit can be used as entity nodes to form an undirected graph structure for a single visit. Specifically, the diagnosis set for a single visit can be expressed as: The corresponding treatment set can be expressed as The corresponding test result set can be expressed as where d (t) 、m (t) 、r (t) Represents the number of diagnoses, treatments, and test results.
[0115] Step S420. Map the undirected graph structure of a single medical visit into the medical knowledge graph, and obtain the directed graph structure of the electronic medical record based on the topological structure of each entity.
[0116] Since the information of electronic medical records can only abstract corresponding nodes and undirected associations, the directional causal relationship or medical logical relationship between nodes cannot be intuitively obtained. Therefore, this example implementation introduces a triple structure similar to the knowledge graph, summarizes the topological structure of all entities involved in the electronic medical records, and obtains directed graph structure information guided by medical knowledge paths. The patient's single electronic medical record information can be mapped to the full graph to form a corresponding path and generate the graph structure of the medical record. This process naturally incorporates the causal relationship of medical decision-making or disease progression, providing implicit information representation for subsequent models in medical record quality control tasks.
[0117] In this example implementation, the directed graph structure of the electronic medical record can further integrate the logical relationship between clinical decision-making and disease progression in the electronic medical record, build a global graph structure based on the medical knowledge graph, map the patient's medical record text to the graph structure, form a single sub-path, and combine the underlying encoded medical record information representation to perform self-supervised pre-training of the model to construct a graph convolution transformer neural network. This process will naturally learn the relationship between various indicators and diagnosis and treatment decisions during the patient's multiple diagnosis and treatment processes, so as to serve the final downstream medical quality control tasks.
[0118] In step S250, the model parameters in the text pre-training layer and the structure pre-training layer are adjusted according to the directed graph structure of the electronic medical record to obtain a quality control model.
[0119] In this example implementation, the structure pre-training layer is a graph convolution transformer neural network. Based on the graph structure electronic medical records under the constraints of the medical knowledge graph, a graph convolution transformer neural network is constructed to fully learn the diagnosis and treatment decision-making knowledge contained in the electronic medical records. The graph information of the electronic medical record can be used for path learning and transformation, thereby improving the decision-making effect of the model for downstream similar clinical tasks.
[0120] The directed graph structure information corresponding to the electronic medical record will be stored in the form of an adjacency matrix as part of the input of the subsequent network model. For structured electronic medical records of patients with multiple visits, the graph structure in the real diagnosis and treatment scenario can be mined and completed through self-supervision, and the clinical diagnosis and treatment pathways in the structured electronic medical records can be better abstracted and represented. In the medical diagnosis and treatment decision-making process, the diagnosis results and treatment methods of patients' multiple visits have a certain correlation in the time dimension, which integrates the actual decision-making process of doctors.
[0121] In this example implementation, Figure 5 As shown, the model parameters in the text pre-training layer and the structure pre-training layer are adjusted according to the directed graph structure of the electronic medical record to obtain a quality control model, which may specifically include the following steps:
[0122] Step S510: Based on the transition probabilities between each type of entity in the electronic medical record, an initialized transition probability matrix is constructed.
[0123] Based on the existing medical knowledge graph, we can construct the initial transition probability matrix P∈[0.0.1.0] |c|×|c| , represents the pairwise transition probability between all diagnosis, examination, and inspection nodes.
[0124] In this example implementation, Figure 6 As shown, based on the transition probabilities between each entity in the electronic medical record, an initialized transition probability matrix is constructed, which can specifically include the following steps:
[0125] Step S610: traverse various entities in the electronic medical record, and obtain the number of occurrences of the entity corresponding to each pair of nodes in the transition probability matrix in the electronic medical record.
[0126] By traversing all existing structured electronic medical records, we can obtain the number of times each pair of nodes in the matrix P appears in the actual medical record and record it.
[0127] Step S620: Determine the transition probability between each type of entity in the electronic medical record according to the number of occurrences.
[0128] According to the number of times each pair of nodes in the matrix P appears in the actual medical records, the transition probability between the nodes can be obtained.
[0129] Step S630: Normalize the transition probability of each row in the transition probability matrix, and obtain an initialized transition probability matrix according to the normalized transition probability.
[0130] Normalize each row of information to ensure that the sum of each row is 1, thereby initializing the transition probability matrix P. An example of the transition probability matrix P is shown in the following table:
[0131]
[0132] Where E represents a known existing relationship.
[0133] Step S520. Obtain an entity node matrix based on the directed graph structure of the electronic medical record, and input the entity node matrix and the initialized transition probability matrix into the graph convolutional neural network.
[0134] Based on the existing medical knowledge graph, we can generate a strong confidence jump probability relationship between nodes. For example, a treatment node can be associated with a diagnosis node, but not with some other treatment nodes. Therefore, we can construct an adjacency matrix of the mask matrix Mask for subsequent attention mechanism generation. For node jumps that conform to medical logic, the inter-node transition probability is set to 0. For node relationships that do not conform to the transition conditions from a medical logic perspective, the transition probability can be manually set to negative infinity.
[0135] Step S530. In the graph convolutional neural network, the entity node matrix is iterated based on the self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer.
[0136] In the graph convolutional neural network, the node relationships in the graph structure can be restored to the maximum extent based on the mask matrix Mask and the conditional probability matrix P. In addition, based on the graph structure initialized by the existing knowledge graph, more node relationships are expanded.
[0137] In the process of building a graph convolutional Transformer network, it is important to note that The mask matrix Mask and the conditional probability matrix P maintain the same dimension |c|×|c|, where |c| is the sum of the number of all nodes.
[0138] In this example implementation, Figure 7 As shown, the entity node matrix is iterated based on the self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer. Specifically, the following steps may be included:
[0139] Step S710. Obtain a query vector matrix, a key vector matrix and a numerical vector matrix according to the entity node matrix and the trainable parameter matrix.
[0140] In Transformer, Q, K, and V are three input representation vectors used in the self-attention mechanism, where Q represents the query vector, K represents the key vector, and V represents the numerical vector. These three vectors can be obtained from the input entity node matrix C through linear transformation. Among them, the entity node matrix C is obtained by pre-training the encoding mapping of the input graph node adjacency matrix.
[0141] Step S720: Obtain medical prior knowledge, and convert the medical prior knowledge into a prior knowledge matrix according to the query vector matrix and the key vector matrix.
[0142] Obtaining the medical prior knowledge M based on strong confidence can be converted into a prior knowledge matrix:
[0143]
[0144] in, d is The total number of columns.
[0145] Step S730: Iterate the entity node matrix based on the prior knowledge matrix and the transition probability matrix.
[0146] Add the self-attention mechanism to iterate the entity node matrix C:
[0147]
[0148]
[0149] Among them, W j is the trainable parameter of the j-th convolution,
[0150] Step S730. Based on the model loss in the iterative process, update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer.
[0151] The model loss in the iterative process can include error terms and regularization terms, and the final loss function L is:
[0152]
[0153]
[0154]
[0155] Among them, L pred is the error term, is the regularization term, D KL represents the KL divergence.
[0156] Based on the above regularized loss function, the model optimization process does not want the graph convolutional neural network to rely on the existing probability matrix P, but tends to update the value of the probability matrix P. Therefore, using KL divergence as the evaluation criterion, if too much information is integrated from j-1 convolutions, the loss after j convolutions will be amplified.
[0157] Based on the above optimization goals, self-supervised model learning can be performed on structured electronic medical records without specific task annotations, and clinical treatment pathway knowledge can be implicitly learned based on the medical record text information represented by the knowledge graph information and the electronic medical record pathway graph structure mapped with clinical knowledge.
[0158] On the other hand, this exemplary embodiment also provides a quality control method for electronic medical records. Figure 8 As shown, the quality control method of the electronic medical record may include the following steps:
[0159] Step S810: Acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data.
[0160] The target quality control task is a specific quality control task, such as classification, sequence labeling and other tasks.
[0161] In terms of fine-tuning management of large models, effective prompt management tools can be used to guide the model to learn knowledge of specific tasks or fields, thereby improving the performance and generalization ability of the model. Based on the quality control data of electronic medical records, the target prompt information corresponding to the target quality control task can be obtained.
[0162] Step S820: Adjust the model parameters in the quality control model according to the electronic medical record quality control data to obtain the target quality control model.
[0163] Among them, the quality control model is obtained through the training method of the above quality control model.
[0164] Considering that after pre-training on a large amount of medical texts in multiple fields, the model may not be able to fully learn the semantic content of downstream tasks during the fine-tuning stage. In order to ensure the performance of the model in the field of electronic medical record semantic quality control tasks, the scene information and prompt information can be integrated into the fine-tuning stage of the pre-trained model, where the scene information is the scene information under the target quality control task. The prompt information can be added using an unlabeled domain data set, and similar scene corpora of the original corpus can be screened based on the language model. The language model can be further fine-tuned for the domain corpus to ensure that the pre-trained model data is closer to the distribution of downstream electronic medical record semantic quality control task data, thereby completing the scene-customized downstream task prediction.
[0165] Supervised fine-tuning management is a key link in the continuous optimization of large models. By setting up supervised fine-tuning tools, researchers can continuously adjust the model through supervised learning after the model is deployed to adapt to new data and tasks, thereby maintaining the robustness and adaptability of the model.
[0166] Step S830: Input the target prompt information into the target quality control model to obtain the quality control results of the electronic medical record quality control data.
[0167] Finally, the target prompt information is input into the fine-tuned target quality control model to obtain the quality control results of the electronic medical record quality control data for a specific task.
[0168] In this example implementation, Fig. 9 As shown, the model parameters in the quality control model are adjusted according to the electronic medical record quality control data to obtain the target quality control model, which may specifically include the following steps:
[0169] Step S910: Obtain mask task data according to the electronic medical record quality control data, and obtain mask prompt information according to the mask task data.
[0170] For the input electronic medical record quality control data x to be predicted, the underlying pre-trained model can be used to build a language model mask self-supervision task to predict the token (label) at the mask position.
[0171] Step S920: Input the mask prompt information into the quality control model to obtain multiple mask prediction results of the mask positions in the mask task data.
[0172] Input the mask prompt information into the quality control model, O = M (Prompt (x)), and you can get the top-|O|, that is, the first |O| results. Among them, O = {o1,...o |o|} is the result of top–|O| actual predictions.
[0173] Step S930: Obtain multiple prediction task data according to the mask task data and multiple mask prediction results.
[0174] Fill the predicted result to the position to be predicted in the input text x, and generate new prediction task data Q = {q1,...q |O|}.
[0175] Step S940: Search the medical corpus based on the prediction task data to obtain similar corpus data to the prediction task data, and obtain an expanded corpus set based on the similar corpus data.
[0176] For the obtained data Q, ES (ElasticSearch, search engine solution) can be used for retrieval, or other similar text retrieval methods, to match the corpus in the entire medical text data library, retrieve the top-k similar queries, and define the query data set after the retrieval as D p , D p That is, the expanded corpus that currently needs to be predicted for the domain task.
[0177] Step S950: Adjust the model parameters in the quality control model based on the expanded corpus set to obtain the target quality control model.
[0178] This part of the corpus can participate in a new round of fine-tuning of the underlying pre-trained language model of the model, so as to obtain the target quality control model that incorporates the semantic quality control task information of electronic medical records.
[0179] For specific downstream case semantic quality control tasks, the pre-trained model can also be fine-tuned by combining conditional random fields (CRF), fully connected layers combined with SoftMax and other probabilistic mapping methods. Vector database management is another important aspect, especially for large-scale models. Through efficient vector database management, model parameters can be retrieved and updated more quickly, training efficiency can be improved, and the time cost of model tuning can be reduced.
[0180] In the quality control method for electronic medical records of the example implementation of the present disclosure, the parameters in the quality control model are fine-tuned through specific task data, and the quality control of the electronic medical records is performed using the fine-tuned quality control model. After the model is deployed, the quality control model can be continuously adjusted to adapt to new data and tasks, thereby maintaining the robustness and adaptability of the model.
[0181] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0182] It should be noted that the data involved in this disclosure (including but not limited to patient information, medical terms, etc.) are all information authorized by the user or fully authorized by all parties.
[0183] Furthermore, the present disclosure also provides a training device for a quality control model. Fig.10As shown, the training device of the quality control model may include a pre-training model acquisition module 1010, an embedding vector acquisition module 1020, a first layer parameter adjustment module 1030, a directed graph structure acquisition module 1040 and a second layer parameter adjustment module 1050. Among them:
[0184] The pre-trained model acquisition module 1010 can be used to acquire a pre-trained basic quality control model, where the basic quality control model includes a text pre-training layer and a structure pre-training layer;
[0185] The embedding vector acquisition module 1020 may be used to acquire medical terms from a medical corpus and obtain corresponding multi-dimensional embedding vectors according to the medical terms;
[0186] The first layer parameter adjustment module 1030 may be used to adjust the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term;
[0187] The directed graph structure acquisition module 1040 can be used to acquire the electronic medical records of historical patients and obtain the directed graph structure of the electronic medical records according to the medical consultation information in the electronic medical records;
[0188] The second layer parameter adjustment module 1050 can be used to adjust the model parameters in the text pre-training layer and the structure pre-training layer according to the directed graph structure of the electronic medical record to obtain a quality control model.
[0189] In some exemplary embodiments of the present disclosure, the embedding vector acquisition module 1020 may include a word embedding vector acquisition unit, a segment embedding vector acquisition unit, a position embedding vector acquisition unit, a category embedding vector acquisition unit, and a multi-dimensional embedding vector determination unit.
[0190] The word embedding vector acquisition unit can be used to obtain corresponding word embedding vectors according to medical terms;
[0191] The segment embedding vector obtaining unit may be used to obtain the segment embedding vector corresponding to the medical term according to the phrase segment where the medical term is located;
[0192] The position embedding vector acquisition unit can be used to obtain the position embedding vector corresponding to the medical term according to the position information of the medical term in the complete sentence;
[0193] The category embedding vector acquisition unit can be used to match the medical term with the medical knowledge graph to obtain the entity category of the medical term, and obtain the category embedding vector corresponding to the medical term according to the entity category;
[0194] The multi-dimensional embedding vector determination unit can be used to obtain the corresponding multi-dimensional embedding vector of the medical term according to the word embedding vector, the fragment embedding vector, the position embedding vector and the category embedding vector.
[0195] In some exemplary embodiments of the present disclosure, the directed graph structure acquisition module 1040 may include an undirected graph structure acquisition unit and a directed graph structure determination unit.
[0196] The undirected graph structure acquisition unit can be used to acquire single visit information in the electronic medical record, and obtain the undirected graph structure of the single visit according to various entities in the single visit information;
[0197] The directed graph structure determination unit can be used to map the undirected graph structure of a single medical visit into the medical knowledge graph, and obtain the directed graph structure of the electronic medical record according to the topological structure of each entity.
[0198] In some exemplary embodiments of the present disclosure, the second layer parameter adjustment module 1050 may include a transition probability matrix construction unit, an entity node matrix input unit, and a neural network iteration unit.
[0199] in:
[0200] The transition probability matrix construction unit can be used to construct an initialized transition probability matrix based on the transition probabilities between various entities in the electronic medical record;
[0201] The entity node matrix input unit can be used to obtain the entity node matrix according to the directed graph structure of the electronic medical record, and input the entity node matrix and the initialized transition probability matrix into the graph convolutional neural network;
[0202] The neural network iteration unit can be used in a graph convolutional neural network to iterate the entity node matrix based on the self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer.
[0203] In some exemplary embodiments of the present disclosure, the transition probability matrix construction unit may include an entity occurrence number determination unit, an entity transition probability determination unit, and a transition probability normalization unit.
[0204] in:
[0205] The entity occurrence number determination unit can be used to traverse various entities in the electronic medical record and obtain the occurrence number of the entity corresponding to each pair of nodes in the transition probability matrix in the electronic medical record;
[0206] The entity transition probability determination unit can be used to determine the transition probability between each entity in the electronic medical record according to the number of occurrences;
[0207] The transition probability normalization unit can be used to normalize the transition probability of each row in the transition probability matrix, and obtain an initialized transition probability matrix according to the normalized transition probability.
[0208] In some exemplary embodiments of the present disclosure, the neural network iteration unit may include an attention matrix determination unit, a priori knowledge matrix determination unit, an entity node matrix iteration unit, and a model loss determination unit.
[0209] The attention matrix determination unit can be used to obtain a query vector matrix, a key vector matrix and a value vector matrix according to the entity node matrix and the trainable parameter matrix;
[0210] The prior knowledge matrix determination unit can be used to obtain medical prior knowledge and convert the medical prior knowledge into a prior knowledge matrix according to the query vector matrix and the key vector matrix;
[0211] The entity node matrix iteration unit can be used to iterate the entity node matrix based on the prior knowledge matrix and the transition probability matrix;
[0212] The model loss determination unit can be used to update parameters in the transition probability matrix and model parameters in the text pre-training layer and the structure pre-training layer based on the model loss in the iteration process.
[0213] Furthermore, the present disclosure also provides a quality control device for electronic medical records. Fig.11 As shown, the quality control device may include a target data acquisition module 1110, a target model determination module 1120, and a quality control result determination module 1130. Among them:
[0214] The target data acquisition module 1110 can be used to acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data;
[0215] The target model determination module 1120 can be used to adjust the model parameters in the quality control model according to the electronic medical record quality control data to obtain the target quality control model, wherein the quality control model is obtained by the above-mentioned quality control model training method;
[0216] The quality control result determination module 1130 can be used to input the target prompt information into the target quality control model to obtain the quality control result of the electronic medical record quality control data.
[0217] In some exemplary embodiments of the present disclosure, the target model determination module 1120 may include a mask data acquisition unit, a mask prediction result determination unit, a prediction task data determination unit, an expanded corpus set acquisition unit, and a target quality control model determination unit. Among them:
[0218] The mask data acquisition unit can be used to obtain mask task data according to the electronic medical record quality control data, and obtain mask prompt information according to the mask task data;
[0219] The mask prediction result determination unit may be used to input the mask prompt information into the quality control model to obtain a plurality of mask prediction results for the mask positions in the mask task data;
[0220] The prediction task data determination unit may be used to obtain a plurality of prediction task data according to the mask task data and a plurality of mask prediction results;
[0221] The expanded corpus set acquisition unit can be used to search in the medical corpus based on the prediction task data, obtain similar corpus data of the prediction task data, and obtain the expanded corpus set based on the similar corpus data;
[0222] The target quality control model determination unit can be used to adjust the model parameters in the quality control model based on the expanded corpus set to obtain the target quality control model.
[0223] The specific details of each module / unit in the above-mentioned quality control model training device and electronic medical record quality control device have been described in detail in the corresponding method embodiment part and will not be repeated here.
[0224] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0225] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present disclosure is shown.
[0226] It should be noted that Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0227] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203. Various programs and data required for system operation are also stored in the RAM 1203. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0228] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0229] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present disclosure are executed.
[0230] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the training method of the quality control model is implemented.
[0231] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.
[0232] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.
[0233] The code of the computer program can be written in one or more programming languages. Programming languages such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).
[0234] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program is run on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device may execute) the method steps of various exemplary embodiments of the present disclosure, such as the training method of the quality control model described above.
[0235] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0236] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules described above can be concretized in one module. Conversely, the features and functions of one module described above can be further divided into multiple modules to be concretized.
[0237] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0238] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A training method for a quality control model, characterized in that: include: Obtaining a pre-trained basic quality control model, wherein the basic quality control model includes a text pre-training layer and a structure pre-training layer; Acquire medical terms from a medical corpus, and obtain corresponding multi-dimensional embedding vectors according to the medical terms; Adjusting the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term; Acquire the electronic medical records of historical patients, and obtain the directed graph structure of the electronic medical records based on the medical information in the electronic medical records; The model parameters in the text pre-training layer and the structure pre-training layer are adjusted according to the directed graph structure of the electronic medical record to obtain the quality control model.
2. The training method of the quality control model according to claim 1, characterized in that: The step of obtaining a corresponding multi-dimensional embedding vector according to the medical term includes: Obtaining a corresponding word embedding vector according to the medical term; Obtaining a fragment embedding vector corresponding to the medical term according to the phrase fragment in which the medical term is located; Obtaining a position embedding vector corresponding to the medical term according to the position information of the medical term in the complete sentence; Matching the medical term with a medical knowledge graph to obtain an entity category of the medical term, and obtaining a category embedding vector corresponding to the medical term according to the entity category; The corresponding multi-dimensional embedding vector of the medical term is obtained according to the word embedding vector, the fragment embedding vector, the position embedding vector and the category embedding vector.
3. The training method of the quality control model according to claim 1, characterized in that: The step of obtaining the directed graph structure of the electronic medical record according to the medical information in the electronic medical record includes: Acquire single medical visit information in the electronic medical record, and obtain an undirected graph structure of the single medical visit according to various entities in the single medical visit information; The undirected graph structure of the single medical visit is mapped into the medical knowledge graph, and the directed graph structure of the electronic medical record is obtained according to the topological structure of each entity.
4. The training method of the quality control model according to claim 1, characterized in that: The structure pre-training layer is a graph convolutional neural network, and the model parameters in the text pre-training layer and the structure pre-training layer are adjusted according to the directed graph structure of the electronic medical record to obtain the quality control model, including: Based on the transition probabilities between each type of entity in the electronic medical record, construct an initialized transition probability matrix; Obtaining an entity node matrix according to the directed graph structure of the electronic medical record, and inputting the entity node matrix and the initialized transition probability matrix into the graph convolutional neural network; In the graph convolutional neural network, the entity node matrix is iterated based on a self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer.
5. The training method of the quality control model according to claim 4, characterized in that: The step of constructing an initialized transition probability matrix based on the transition probabilities between each type of entity in the electronic medical record comprises: Traversing various entities in the electronic medical record, and obtaining the number of occurrences of the entity corresponding to each pair of nodes in the transition probability matrix in the electronic medical record; Determine the transition probability between each entity in the electronic medical record according to the number of occurrences; The transition probability of each row in the transition probability matrix is normalized, and an initialized transition probability matrix is obtained according to the normalized transition probability.
6. The training method of the quality control model according to claim 4, characterized in that: The iterating the entity node matrix based on the self-attention mechanism to update the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer includes: Obtaining a query vector matrix, a key vector matrix and a numerical vector matrix according to the entity node matrix and the trainable parameter matrix; Acquire medical prior knowledge, and convert the medical prior knowledge into a prior knowledge matrix according to the query vector matrix and the key vector matrix; Iterating the entity node matrix based on the prior knowledge matrix and the transition probability matrix; Based on the model loss in the iterative process, the parameters in the transition probability matrix and the model parameters in the text pre-training layer and the structure pre-training layer are updated.
7. A quality control method for electronic medical records, characterized in that: include: Acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data; Adjust the model parameters in the quality control model according to the electronic medical record quality control data to obtain a target quality control model, wherein the quality control model is obtained by the quality control model training method according to any one of claims 1 to 6; The target prompt information is input into the target quality control model to obtain the quality control result of the electronic medical record quality control data.
8. The quality control method of electronic medical records according to claim 7, characterized in that: The step of adjusting the model parameters in the quality control model according to the electronic medical record quality control data to obtain the target quality control model includes: Obtaining mask task data according to the electronic medical record quality control data, and obtaining mask prompt information according to the mask task data; Inputting the mask prompt information into the quality control model to obtain a plurality of mask prediction results of the mask positions in the mask task data; Obtaining a plurality of prediction task data according to the mask task data and the plurality of mask prediction results; Searching the medical corpus based on the prediction task data to obtain similar corpus data of the prediction task data, and obtaining an expanded corpus set based on the similar corpus data; The model parameters in the quality control model are adjusted based on the expanded corpus set to obtain a target quality control model.
9. A training device for a quality control model, characterized in that: include: A pre-trained model acquisition module is used to acquire a pre-trained basic quality control model, wherein the basic quality control model includes a text pre-training layer and a structure pre-training layer; An embedding vector acquisition module, used to acquire medical terms from a medical corpus and obtain corresponding multi-dimensional embedding vectors according to the medical terms; A first layer parameter adjustment module, used for adjusting the model parameters in the text pre-training layer according to the multi-dimensional embedding vector corresponding to the medical term; A directed graph structure acquisition module is used to acquire the electronic medical records of historical patients and obtain the directed graph structure of the electronic medical records according to the medical information in the electronic medical records; The second layer parameter adjustment module is used to adjust the model parameters in the text pre-training layer and the structure pre-training layer according to the directed graph structure of the electronic medical record to obtain the quality control model.
10. A quality control device for electronic medical records, characterized in that: include: A target data acquisition module is used to acquire the electronic medical record quality control data in the target quality control task, and obtain the target prompt information corresponding to the target quality control task according to the electronic medical record quality control data; a target model determination module, configured to adjust model parameters in a quality control model according to the electronic medical record quality control data to obtain a target quality control model, wherein the quality control model is obtained by the quality control model training method according to any one of claims 1 to 6; The quality control result determination module is used to input the target prompt information into the target quality control model to obtain the quality control result of the electronic medical record quality control data.
11. An electronic device, characterized in that: include: processor; as well as A memory for storing one or more programs, which, when executed by the processor, enables the processor to implement the training method of the quality control model as described in any one of claims 1 to 6 and the quality control method of the electronic medical record as described in any one of claims 7 to 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the training method of the quality control model according to any one of claims 1 to 6 and the quality control method of the electronic medical record according to any one of claims 7 to 8 are implemented.
Citation Information
Cited By
Electronic medical record data governance method based on Agent mechanism and related device
CN119864117A
