Medical record connotation quality control method and device, storage medium and equipment

By combining a hybrid expert model (MoE) with gated networks and expert networks for medical record content quality control, and training from general to specialized methods, the problems of high accuracy and cost of medical record content quality control methods are solved, achieving efficient and low-cost medical record content quality control results.

CN121306383APending Publication Date: 2026-01-09ANHUI IFLYHEALTH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511489616.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing methods for quality control of medical records are either inaccurate or costly, failing to achieve the desired quality control results.

Method used

A hybrid expert model (MoE) is used to train the quality control model for medical record content. First, general capabilities are trained on general domain documents, and then specialized training is performed using grouped medical domain medical records. Quality control processing is carried out using gating networks and expert networks, quality control query instructions are generated and weighted summation is performed, and the model parameters are optimized using the cross-entropy loss function.

Benefits of technology

It effectively improved the quality control accuracy and efficiency of the medical record content quality control model, reduced training and quality control costs, and improved the accuracy and efficiency of quality control results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121306383A_ABST
    Figure CN121306383A_ABST
Patent Text Reader

Abstract

The invention discloses a medical record connotation quality control method and device, a storage medium and equipment, and the method comprises the steps: firstly, carrying out the universal capability training of an initial medical record connotation quality control model through employing a sample document of a universal field under the condition that parameters of a gating network are frozen and all expert network parameters are shared; obtaining a medical record connotation quality control model with a universal capability; then grouping different documents and cue words in the sample medical records on the basis of homogenization characteristics of the medical record documents to obtain grouped sample medical records and cue words; then, under the condition that parameters of a gating network and parameters of all expert networks are activated, specialized training of all experts is carried out on the medical record connotation quality control model with the universal ability through the grouped sample medical records and cue words, and a medical record connotation quality control model with the specialized ability is obtained; therefore, when the medical record content quality control model is utilized to perform quality control processing on the target medical record, the accuracy of the quality control result and the quality control efficiency can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of medical technology, and in particular to a method, apparatus, storage medium and device for quality control of medical record content. Background Technology

[0002] Medical records are crucial documents in a patient's treatment process, containing a wealth of medical information such as admission diagnoses, treatment plans, and laboratory reports. The "content" of a medical record refers to the deeper meaning and value inherent in the record, encompassing not only basic patient information and objective records of the treatment process, but also reflecting the quality of medical actions, the logic of clinical reasoning, and the professional competence of the medical team. However, due to the availability of numerous templates for electronic medical records, practical applications suffer from issues such as inaccurate descriptions and copy-pasting, potentially leading to omissions, non-standard recording, and data inconsistencies. This not only reduces the quality of the electronic medical record's content but may also pose medical risks. Therefore, effective quality control of the content of electronic medical records is necessary.

[0003] Currently, existing methods for quality control of medical record content typically fall into three categories: The first is traditional manual quality control, which is not only time-consuming and labor-intensive but also susceptible to subjective human factors, potentially leading to inconsistent standards and omissions. The second is a quality control method based on Natural Language Processing (NLP). While this method can detect specific quality control items based on rules, it struggles to generalize to all quality control items, resulting in relatively low accuracy and a lack of interpretability. The third is a quality control method based on Large Language Models (LLMs). However, this method requires individual supervised fine-tuning of each quality control item, leading to high costs. Therefore, these existing methods for quality control of medical record content are either inaccurate or costly, failing to achieve the desired quality control results. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, storage medium, and device for quality control of the content of medical records, which can improve the accuracy of quality control of the content of electronic medical records and reduce the cost of quality control, thereby achieving the desired quality control effect.

[0005] This application provides a method for quality control of medical record content, including:

[0006] Obtain the target medical records to be quality controlled;

[0007] Using the target medical record and prompt words, a quality control inquiry instruction is generated and input into a pre-trained medical record content quality control model for quality control processing to obtain the quality control result corresponding to the target medical record;

[0008] The medical record content quality control model includes a gating network and an expert network; the training method of the medical record content quality control model is as follows:

[0009] Obtain sample documents, and while freezing the parameters of the gating network and sharing all the parameters of the expert network, use the sample documents to train the initial medical record content quality control model to obtain a medical record content quality control model with general capabilities; the sample documents are documents in a general domain.

[0010] Obtain sample medical records, and based on the homogeneity of the medical record documents, group the different documents and prompt words in the sample medical records to obtain the grouped sample medical records and prompt words;

[0011] With the parameters of the gating network and all the expert networks activated, the grouped sample medical records and prompts are used to perform specialized training on the medical record content quality control model with general capabilities for each expert, thereby obtaining the medical record content quality control model with specialized capabilities.

[0012] In one possible implementation, the step of generating a quality control inquiry instruction using the target medical record and prompt words, inputting it into a pre-trained medical record content quality control model for quality control processing, and obtaining the quality control result corresponding to the target medical record includes:

[0013] Using the target medical record and prompt words, a quality control inquiry instruction is generated and input into the gating network of a pre-trained medical record content quality control model. This process filters out k expert networks in the model that perform quality control on the target medical record and determines the weight values ​​corresponding to the k expert networks; where k is a positive integer greater than 0.

[0014] The target medical record is subjected to quality control processing using the k expert networks to obtain k initial quality control results; and the k initial quality control results and the weight values ​​corresponding to the k expert networks are used to perform weighted summation to obtain the final quality control result corresponding to the target medical record.

[0015] In one possible implementation, the step of using the grouped sample medical records and prompts to perform specialized training on the general-capability medical record content quality control model for each expert, thereby obtaining a specialized-capability medical record content quality control model, includes:

[0016] Using the grouped sample medical records and prompts, sample quality control query instructions are generated and input into the general-purpose medical record content quality control model. The target loss function is calculated using the different expert network weights output by the gating network in the model. The model parameter updates are stopped once the target loss function meets a preset condition, thus training a specialized medical record content quality control model. The target loss function is used to constrain the update of model parameters, thereby improving the gating network's ability to route input medical records to the expert network most likely skilled in processing such documents, based on the document type and structural features.

[0017] In one possible implementation, the target loss function is the cross-entropy loss function.

[0018] In one possible implementation, the method further includes:

[0019] Obtain verified medical records;

[0020] Using the verification medical record and prompt words, a verification quality control query instruction is generated, which is then input into the medical record content quality control model to predict the verification quality control result corresponding to the verification medical record.

[0021] When the verification quality control result is inconsistent with the actual quality control result corresponding to the verification medical record, the verification medical record is used again as the sample medical record, and the quality control model of the medical record is updated.

[0022] In one possible implementation, the gated network includes a feedforward neural network, a KeepTopk function, and a Softmax function; the expert network is a trainable feedforward neural network.

[0023] This application also provides a medical record content quality control device, including:

[0024] The first acquisition unit is used to acquire the target medical records to be quality controlled.

[0025] The quality control unit is used to generate quality control inquiry instructions using the target medical record and prompt words, and input them into a pre-trained medical record content quality control model for quality control processing to obtain the quality control result corresponding to the target medical record; wherein, the medical record content quality control model includes a gating network and an expert network;

[0026] The second acquisition unit is used to acquire sample documents, and, with the parameters of the gated network frozen and all the expert network parameters shared, to train the initial medical record content quality control model with general capabilities using the sample documents, thereby obtaining a medical record content quality control model with general capabilities; the sample documents are documents in a general domain.

[0027] The third acquisition unit is used to acquire sample medical records and, based on the homogeneity of the medical record documents, group the different documents and prompt words in the sample medical records to obtain the grouped sample medical records and prompt words.

[0028] The training unit is used to perform specialized training on the general-capable medical record content quality control model for each expert using the grouped sample medical records and prompt words, while activating the parameters of the gating network and the parameters of all the expert networks, so as to obtain the medical record content quality control model with specialized capabilities.

[0029] In one possible implementation, the quality control unit includes:

[0030] The input subunit is used to generate quality control inquiry instructions using the target medical record and prompt words, input them into the gating network of the pre-trained medical record content quality control model, filter out k expert networks in the model to perform quality control on the target medical record, and determine the weight values ​​corresponding to the k expert networks; where k is a positive integer greater than 0.

[0031] The quality control subunit is used to perform quality control processing on the target medical record using the k expert networks respectively, to obtain k initial quality control results; and to perform a weighted summation using the k initial quality control results and the weight values ​​corresponding to the k expert networks to obtain the final quality control result corresponding to the target medical record.

[0032] In one possible implementation, the training unit is specifically used for:

[0033] Using the grouped sample medical records and prompts, sample quality control query instructions are generated and input into the general-purpose medical record content quality control model. The target loss function is calculated using the different expert network weights output by the gating network in the model. The model parameter updates are stopped once the target loss function meets a preset condition, thus training a specialized medical record content quality control model. The target loss function is used to constrain the update of model parameters, thereby improving the gating network's ability to route input medical records to the expert network most likely skilled in processing such documents, based on the document type and structural features.

[0034] In one possible implementation, the target loss function is the cross-entropy loss function.

[0035] In one possible implementation, the device further includes:

[0036] The fourth acquisition unit is used to acquire and verify medical records;

[0037] The input unit is used to generate a verification quality control query instruction using the verification medical record and prompt words, input it into the medical record connotation quality control model, and predict the verification quality control result corresponding to the verification medical record;

[0038] The update unit is used to update the quality control model of the medical record by reusing the verification medical record as the sample medical record when the verification quality control result is inconsistent with the actual quality control result corresponding to the verification medical record.

[0039] In one possible implementation, the gated network includes a feedforward neural network, a KeepTopk function, and a Softmax function; the expert network is a trainable feedforward neural network.

[0040] This application embodiment also provides a medical record content quality control device, including: a processor, a memory, and a system bus;

[0041] The processor and the memory are connected via the system bus;

[0042] The memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the above-described implementations of the medical record content quality control method.

[0043] This application also provides a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described implementations of the medical record content quality control method.

[0044] This application also provides a computer program product, which, when run on a terminal device, causes the terminal device to execute any of the above-described methods for quality control of medical record content.

[0045] This application provides a method, apparatus, storage medium, and device for quality control of medical record content. First, a target medical record to be quality controlled is acquired. Then, using the target medical record and prompts, a quality control query instruction is generated and input into a pre-trained medical record content quality control model for quality control processing, resulting in a quality control result corresponding to the target medical record. The medical record content quality control model includes a gating network and an expert network. The training method of the medical record content quality control model includes: first, acquiring sample documents, and then, with the parameters of the gating network frozen and all expert network parameters shared, using the sample documents to analyze the initial medical record content. The quality control model is trained to have general capabilities, resulting in a medical record content quality control model with general capabilities. The sample documents are documents from a general domain. Then, sample medical records are obtained, and based on the homogeneity of medical record documents, different documents and prompt words in the sample medical records are grouped to obtain grouped sample medical records and prompt words. Then, with the parameters of the gating network and all expert networks activated, the grouped sample medical records and prompt words are used to conduct specialized training for each expert on the medical record content quality control model with general capabilities, resulting in a medical record content quality control model with specialized capabilities.

[0046] As can be seen, since this application first trains the initial medical record content quality control model (such as a hybrid expert model) with general capabilities using sample documents from a general domain, and then trains it with specialized capabilities using grouped sample medical records, it obtains a medical record content quality control model with specialized capabilities. This not only reduces the training cost of the model (and indirectly reduces the quality control cost), but also effectively improves the quality control accuracy and efficiency of the trained medical record content quality control model. Therefore, when using this medical record content quality control model to perform quality control processing on the target medical records to be controlled, it can effectively improve the accuracy and efficiency of the quality control results, and thus achieve the ideal quality control effect. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A flowchart illustrating a method for quality control of medical record content provided in an embodiment of this application;

[0049] Figure 2 This is a schematic diagram of the structure of the medical record content quality control model provided in the embodiments of this application;

[0050] Figure 3 A schematic diagram illustrating the composition of a medical record content quality control device provided in this application embodiment;

[0051] Figure 4 This is a schematic diagram of the structure of a medical record content quality control device provided in an embodiment of this application. Detailed Implementation

[0052] With the accelerated informatization of medical institutions, Electronic Medical Records (EMRs) have been widely adopted in hospitals. EMRs assist medical staff in writing and retrieving information, improving work efficiency. The "content" of a medical record refers to the deeper meaning and value contained within it. This includes not only the patient's basic information and the objective record of the treatment process, but also reflects the quality of medical actions, the logic of clinical thinking, and the professional competence of the medical team. The core of the medical record's content is patient-centered, achieving effective transmission of medical information, traceability of medical actions, controllable medical quality, and support for medical practice and management through standardized and professional recording.

[0053] However, with the increasing application of electronic medical records, some quality issues have also emerged. For example, because electronic medical records have many templates available, in practice, there are instances of incorrect descriptions and copy-pasting of content, leading to potential omissions, non-standard recording, and inconsistencies. This not only reduces the intrinsic quality of electronic medical records but may also lead to medical risks. Therefore, improving the quality control of medical record content has become one of the key points for medical institutions to improve the level of medical care.

[0054] Traditionally, quality control of medical record content is performed manually, which is not only time-consuming and labor-intensive but also susceptible to subjective human factors, potentially leading to inconsistent standards and omissions in inspection. With the continuous advancement of artificial intelligence technology, Natural Language Processing (NLP) and Large Language Modeling (LLM) are increasingly being used in quality control of medical record content, improving the efficiency and accuracy of quality control.

[0055] Natural Language Processing (NLP) technology can automatically parse and understand the text data recorded by medical staff in medical records, extracting key information. Large Language Modeling (LLM) further enhances the intelligence of this process. Through training with a large amount of clinical data, LLM can automatically verify and review important information in medical records, identifying potential errors or omissions. Based on existing knowledge bases, they can provide targeted suggestions and supplements to ensure the completeness and accuracy of medical record content.

[0056] Specifically, the two most commonly used methods for intelligent quality control of electronic medical records are as follows:

[0057] The first method is a quality control approach based on Natural Language Processing (NLP).

[0058] This method utilizes Natural Language Processing (NLP) technology to analyze and process unstructured text data in electronic medical records. First, based on different document types (such as admission diagnoses, treatment plans, and laboratory reports), NLP techniques such as entity recognition and syntactic analysis are used to structure the text content. Entity recognition technology is applied to extract key information units from the text, typically including disease names, medical procedures, drug names, and time points. Syntactic analysis, by analyzing the grammatical structure and inter-word dependencies, reveals deep logical relationships and causal connections within the medical records, thereby aiding in understanding complex medical expressions and identifying potential ambiguities and vagueness in the text. Based on this, information verification is performed using a medical knowledge base rule system to ensure that the extracted information conforms to current medical standards.

[0059] It is evident that while this method can detect specific quality control items based on rules, it is difficult to generalize to all quality control items, resulting in relatively low accuracy of the quality control results and a lack of interpretability.

[0060] The second method is a quality control approach based on large-scale language models (LLM).

[0061] This method utilizes massive datasets to pre-train a large-scale language model (LLM), leveraging its powerful language understanding and generation capabilities. Fine-tuning with specific medical datasets allows the LLM to learn rich medical knowledge. Furthermore, different instructions can be designed for different quality control items to help the large model understand specific tasks, thereby improving the accuracy of quality control. Due to its powerful text generation capabilities, the LLM provides interpretability to its quality control results, greatly facilitating review by medical personnel. This method deeply understands the complex language structures in medical records and offers flexibility in application across diverse medical scenarios.

[0062] It is evident that using LLM for intrinsic quality control in this method requires individual monitoring and fine-tuning of each quality control item, resulting in high costs.

[0063] Therefore, existing quality control methods for the content of medical records are either inaccurate or costly, failing to achieve the desired quality control effect. There is an urgent need for a quality control solution that can improve quality control efficiency while significantly reducing costs, thereby enhancing the quality control effect on the content of electronic medical records.

[0064] To address the aforementioned deficiencies, this application provides a method for quality control of medical record content. First, a target medical record to be quality controlled is obtained. Then, using the target medical record and prompts, a quality control query instruction is generated and input into a pre-trained medical record content quality control model for quality control processing, yielding the quality control result corresponding to the target medical record. The medical record content quality control model includes a gating network and an expert network. The training method for the medical record content quality control model includes: first, obtaining sample documents, and then, with the parameters of the gating network frozen and all expert network parameters shared, training the initial medical record content quality control model for general capabilities using the sample documents, resulting in a medical record content quality control model with general capabilities; the sample documents are documents in a general domain. Next, sample medical records are obtained, and based on the homogeneity characteristics of the medical record documents, different documents and prompts in the sample medical records are grouped, resulting in grouped sample medical records and prompts. Then, with the parameters of the gating network and all expert networks activated, the grouped sample medical records and prompts are used to perform specialized training on the medical record content quality control model with general capabilities for each expert, resulting in a medical record content quality control model with specialized capabilities.

[0065] As can be seen, since this application first trains the initial medical record content quality control model (such as a hybrid expert model) with general capabilities using sample documents from a general domain, and then trains it with specialized capabilities using grouped sample medical records, it obtains a medical record content quality control model with specialized capabilities. This not only reduces the training cost of the model (thereby reducing the quality control cost), but also effectively improves the quality control accuracy and efficiency of the trained medical record content quality control model. Therefore, when using this medical record content quality control model to perform quality control processing on the target medical records to be controlled, it can effectively improve the accuracy and efficiency of the quality control results, thereby achieving the ideal quality control effect.

[0066] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0067] First Embodiment

[0068] See Figure 1 This is a flowchart illustrating a method for quality control of medical record content provided in this embodiment. The method includes the following steps:

[0069] S101: Obtain the target medical records to be quality controlled.

[0070] In this embodiment, any electronic medical record used for quality control according to this embodiment is defined as the target medical record to be quality controlled. It should be noted that this embodiment does not limit the language type of the target medical record. For example, the target medical record can be a Chinese medical record or an English medical record, etc. This embodiment also does not limit the length of the target medical record. For example, the target medical record can be a sentence text or a paragraph text, etc. This embodiment also does not limit the type of disease to which the target medical record belongs. For example, the target medical record can be a medical record with a diagnosis of glaucoma or a medical record with a diagnosis of acute pneumonia, etc.

[0071] Once the target medical records to be quality controlled are obtained, the subsequent step S102 can be executed to achieve accurate quality control of the target medical records, thereby improving the quality control effect.

[0072] S102: Using the target medical record and prompt words, generate quality control inquiry instructions, input them into the pre-trained medical record content quality control model for quality control processing, and obtain the quality control results corresponding to the target medical record; wherein, the medical record content quality control model includes a gating network and an expert network.

[0073] In this embodiment, it should be noted that, in order to effectively improve the accuracy of quality control for target medical records and reduce costs to achieve the desired quality control effect, this application adopts a key branch of LLM, the "Mixture of Experts (MoE)", as the basic model (i.e., the initial medical record content quality control model mentioned later). It pre-uses sample documents from general domains and sample cases from the medical field as training data to perform a two-stage progressive training of the MoE, enhancing its general and specialized capabilities. This allows for significant reduction in computational resources and power consumption (i.e., lower training cost compared to other LLM methods) while maintaining model performance through operations such as sparse activation, parallelization, and parameter specialization during training. This results in a higher-performance model for medical record content quality control tasks, ensuring that the trained medical record content quality control model not only possesses general basic capabilities but also allows its various expert networks to focus on different branches of the medical field for quality control processing, thereby achieving a specialized quality control effect.

[0074] Based on this, after obtaining the target medical record to be quality controlled through step S101, the content of the target medical record can be integrated into a prompt to generate a quality control inquiry instruction. This generated instruction is then input into a pre-trained medical record content quality control model for quality control processing, predicting the quality control result of the target medical record. Furthermore, this application does not limit the specific content of the quality control result; for example, the result may include, but is not limited to, quality control conclusions and reasons for quality control of the target medical record. The representation method of the quality control conclusion is also not limited and can be set according to actual conditions and empirical values. For example, a quality control score can be used as the conclusion, such as a score of 98 for the target medical record, indicating good quality. Alternatively, "Excellent, Good, Average, Pass, Fail" can be used as the conclusion, such as "Excellent." Corresponding reasons are given to explain the obtained quality control conclusion.

[0075] It should also be noted that, in order to improve the efficiency and accuracy of quality control for electronic medical records (MoE), this application pre-uses a large number of sample documents from general domains and sample cases from the medical field as training data to perform two-stage progressive training on MoE to improve its general and specialized capabilities. This results in the construction of a MoE quality control model with better quality control performance. Furthermore, this application does not limit the specific network structure of the MoE quality control model; it can be selected and set according to actual conditions. A preferred implementation is that the pre-constructed MoE quality control model can include, but is not limited to, gating networks and expert networks. The gating network can include, but is not limited to, feed-forward networks, the KeepTopk function, and the Softmax function. The expert network can be, but is not limited to, a trainable feed-forward network, such as... Figure 2 As shown.

[0076] In this way, after training the general capabilities using sample documents, and then using the grouped sample medical records for specialized training to obtain the medical record content quality control model, the quality control accuracy and efficiency of the model can be effectively improved. Thus, when using this medical record content quality control model to perform quality control on target medical records, the accuracy and efficiency of the quality control results can be effectively improved.

[0077] Specifically, one possible implementation is that the process of "using the target medical record and prompt words to generate quality control inquiry instructions, inputting them into a pre-trained medical record content quality control model for quality control processing, and obtaining the quality control result corresponding to the target medical record" in step S102 may include the following steps S1021-S1022:

[0078] S1021: Using the target medical record and prompt words, generate quality control inquiry instructions, input them into the gating network of the pre-trained medical record content quality control model, filter out k expert networks in the model to perform quality control on the target medical record, and determine the weight values ​​corresponding to the k expert networks; k is a positive integer greater than 0.

[0079] In this implementation, after obtaining the target medical record to be quality controlled in step S101, a quality control inquiry instruction can be generated by combining the target medical record and prompt words. Then, each character in this quality control inquiry instruction is used as input to the gating network of the pre-trained medical record content quality control model for expert network allocation processing, such as... Figure 2 As shown, the most reasonable k expert networks for quality control of the target medical records in the model are selected (i.e., the number of expert networks selected for activation in the gating network is k), and the weight values ​​corresponding to these k expert networks are determined for subsequent steps S1022. The value of k is not limited and can be determined by the KeepTopk function in the gating network based on the situation and experience. It only needs to be a positive integer greater than 0, thereby effectively reducing computational load, improving efficiency, and reducing noise.

[0080] S1022: Use k expert networks to perform quality control processing on the target medical record to obtain k initial quality control results; and use the weight values ​​of the k initial quality control results and the k expert networks to perform weighted summation to obtain the final quality control result corresponding to the target medical record.

[0081] In this implementation, step S1021 selects k expert networks in the model to perform quality control on the target medical records. After determining the weight values ​​of each of these k expert networks, the model further performs quality control processing on the target medical records using each of the k expert networks, obtaining k quality control results output by these k expert networks, which serve as k initial quality control results. Then, these k initial quality control results and the weight values ​​of each of the k expert networks are used for weighted summation, and the resulting sum (which can be represented by y) is used as the hidden layer representation of the model output (the specific content is not limited, such as a JSON-formatted text combining quality control conclusions and reasons, etc.). Figure 2 As shown, this method is used to determine the final quality control result corresponding to the target medical record more quickly and accurately. The specific calculation formula for the hidden layer representation (y) output by the model is as follows:

[0082]

[0083] Where k represents the number of expert networks selected and activated by the gating network in the medical record quality control model to perform quality control processing on the target medical record; Let i represent the gating weight of the i-th expert network, where i is a positive integer greater than 0 and not greater than k; This represents the output of the i-th expert network.

[0084] Next, this embodiment will describe in detail the training and validation / update processes of the medical record content quality control model. The specific training process may include the following steps A1-A3:

[0085] Step A1: Obtain sample documents, and with the parameters of the gated network frozen and all expert network parameters shared, use the sample documents to train the initial medical record content quality control model to obtain a medical record content quality control model with general capabilities; wherein, the sample documents are documents in the general domain.

[0086] It should be noted that, in order to effectively improve the accuracy of quality control for target medical records and reduce costs to achieve the desired quality control effect, this application adopts a "Hybrid Expert Model (MoE)" as the basic model. The reason for using the MoE model is that by combining multiple expert models, a large sparse model can be formed. Due to the specialized and complex nature of medical record content, effectively parsing and processing the information within it is extremely challenging. However, grouping and assigning different experts to train different documents is clearer and more effective. Therefore, the applicant found that the MoE model is very suitable for quality control of medical record content in the medical field. Furthermore, the MoE model can train a higher-performance model while significantly reducing computational resources and power consumption. However, current designs of hybrid expert models mostly focus on load balancing, neglecting the specialized learning of each expert layer, resulting in a lack of specialization in the MoE model. To solve this problem and improve the model's professional performance, this application trains a hybrid expert model for quality control of medical record content based on the ontological properties of medical record documents. Especially considering the homogeneity of medical records, this application groups medical records and prompts into groups as learning data for each expert. Furthermore, to improve the accuracy of the gating network, this application utilizes the cross-entropy loss function as the target loss function to enhance the accuracy of expert network allocation when processing quality control instructions within medical records. Thus, thanks to the sparsity of the hybrid expert model, quality control of medical records can be achieved more economically, efficiently, and accurately.

[0087] Specifically, in this embodiment, in order to construct the medical record content quality control model, a lot of preparatory work is required in advance, namely, the collection of a large number of documents in general domains. For example, multi-source data (such as Wikipedia) documents in various general domains can be sampled proportionally, such as simple general data news, dialogues, etc., as sample documents to train the general capabilities of the medical record content quality control model, so as to obtain a medical record content quality control model with general capabilities, which is then used to execute the subsequent step A3 in order to achieve the final training of the medical record content quality control model.

[0088] It should be noted that since the basic capability learning stage of the model is mainly aimed at the general capabilities of the expert network, the differentiation between experts is not pursued. Therefore, this application chooses to freeze the parameters of the gating network layer and share the parameters of all expert networks. Under this case, the general capabilities of the initial medical record content quality control model are trained using the collected data to obtain a medical record content quality control model with general capabilities.

[0089] The initial medical record quality control model has no fixed structure and can be set according to actual conditions and experience. For example, it can be based on the Transformer's decoder layer, replacing the feedforward neural network in each decoder layer with a MoE model consisting of one gating network and n (the specific value is not limited and can be any positive integer greater than 0) expert networks. Each expert network can be a trainable feedforward neural network; while the gating network can consist of a feedforward neural network, a KeepTopk function (or a topk function), and a Softmax function, responsible for selecting the most reasonable expert combination for each input character, such as... Figure 2 As shown.

[0090] Step A2: Obtain sample medical records and, based on the homogeneity of the medical record documents, group the different documents and prompts in the sample medical records to obtain the grouped sample medical records and prompts.

[0091] It should be noted that after obtaining a general-purpose medical record content quality control model through step A1, in order to further improve the professional quality control capabilities of the medical record content quality control model, a lot of preparatory work is required in advance. That is, a large number of medical documents need to be collected. For example, multi-source data (such as Wikipedia) documents in the medical field can be sampled proportionally, as well as complex professional data such as medical papers, as sample medical records to train the professional capabilities of the medical record content quality control model.

[0092] Furthermore, the applicant discovered through experiments that randomly concatenating documents to construct fixed-length training instances often results in insufficient specialization of the expert networks in the trained model. Therefore, this application chooses to apply existing or future similar data batch processing techniques. Based on the homogeneity of medical records, different documents and prompts in the sample medical records are first grouped to obtain grouped sample medical records and prompts. Then, text within each group is concatenated to form batches, which are input into the model for training. This allows each expert network in the model to focus on different branches of medical specialties, achieving a specialized learning effect for the model.

[0093] Here is an example of an input document:

[0094] Chief complaint: Abdominal pain, diarrhea and vomiting for 1 day.

[0095] Chief complaint: High blood pressure for 5 years, and worsening dizziness for 1 week.

[0096] Present Illness: One day ago, the patient experienced intermittent colicky pain in the upper middle abdomen after consuming contaminated food. The pain was non-radiating, accompanied by nausea and vomiting three times, which were non-projectile, and the vomitus consisted of gastric contents. Subsequently, watery stools occurred 5-6 times daily, without mucus, blood, or tenesmus. Symptoms did not improve after self-administering "XXXX". Since the onset of illness, there has been no fever, no rash, decreased urine output, and a feeling of weakness. The patient had not sought medical attention before and is now presenting for further diagnosis and treatment.

[0097] Present Illness: Five years ago, the patient was found to have elevated blood pressure (160 / 95 mmHg) during a physical examination. He had no headaches or blurred vision and did not take medication regularly. In the past week, he has experienced dizziness after exertion, described as a feeling of lightheadedness, without vertigo, nausea, or vomiting. His self-measured blood pressure fluctuates between 150-170 / 90-100 mmHg. He occasionally experiences palpitations but no chest pain or paroxysmal nocturnal dyspnea. He has not monitored his blood pressure recently and has not taken any antihypertensive medication.

[0098] This example is a document from the <Medical History and Chief Complaint> group. By inputting this group of documents into the model in the same batch, the professional capabilities of the <Medical History and Chief Complaint> expert group can be enhanced.

[0099] The specific grouping of different documents and prompts in the sample medical records is shown in Table 1 below:

[0100]

[0101] Table 1

[0102] Step A3: With the parameters of the gating network and all expert networks activated, the medical record content quality control model with general capabilities is trained by each expert using the grouped sample medical records and prompts to obtain a medical record content quality control model with specialized capabilities.

[0103] It should be noted that a primary goal of training the medical record content quality control model using step A3 is to enable the gating network in the model to learn to route the input medical records to the expert network most likely adept at handling that type of document, based on the document type and structural features. Specifically, for model input and routing, this application generates sample quality control query instructions by combining the grouped sample medical records obtained in step A2 with the corresponding prompts, and then inputs these instructions into the model. For example, an instruction containing documents with "chief complaint" and "present illness" would be grouped into the "medical history and chief complaint" group for batch training.

[0104] In terms of gating network learning, during the initial training phase, the gating network begins to learn to recognize the underlying patterns of documents from different groups. For example, when the input document sequence contains typical fields such as "chief complaint:" or "present illness history:", or when the document presents a narrative structure of "time-symptom-sign", the gating network tends to allocate higher gating weights to a few specific expert networks.

[0105] For the initial specialization of expert networks, due to the high homogeneity of document data within the same batch (e.g., all being "test reports"), expert networks frequently activated by this batch of document data will prioritize learning and optimizing the parameters related to such documents. For example, one expert network may become more adept at parsing and encoding numerical values, units, and reference ranges in "test reports," while another expert network may be more adept at processing procedural and operational descriptions in "surgical records."

[0106] Building on this foundation, the next goal is to enable the expert network to further optimize the quality control logic and rules for specific types of documents, thereby becoming an "expert" in that quality control field.

[0107] The specific implementation methods are as follows: 1) Task instruction-driven: Prompt words act as the teacher here. For example, for the "lab report" group, the prompt word example used in this application could be: "Please check whether there are any abnormal indicators in this lab report and determine whether their correlation with the primary diagnosis has been fully discussed in the medical record." This instruction clearly indicates the quality control task. 2) Deep differentiation of expert capabilities: The expert network processing "lab reports" must not only understand the text during training, but also learn how to detect outliers, associate them with medical knowledge (such as what kind of condition a certain indicator might indicate), and judge the completeness of the medical record description. Its model parameters will be optimized towards accurately executing the quality control sub-task of "numerical verification and logical association." For the expert network processing "medical orders and medications," the focus will be on learning quality control logic such as the rationality of drug dosage, the existence of interactions, and whether the medical orders are consistent with the diagnosis. Its parameter optimization direction is "rationality and compliance review." Furthermore, the network of experts handling "diagnostic" documents will enhance their logical reasoning abilities, learning how to judge the logical rigor of "preliminary diagnosis" and "revised diagnosis" based on clues in the "chief complaint" and "present illness history".

[0108] Furthermore, the precise routing of the gating network can be achieved by simultaneously deepening its learning as training progresses. It no longer relies solely on document type but can also perceive the specific quality control intent inherent in the input instructions. For example, even if the input contains multiple documents, when the core of the quality control instruction is "judgment and diagnosis logic," the gating network will precisely allocate higher weights to expert networks that are highly specialized in "diagnosing" document quality control, thereby achieving the optimal match between "quality control task - professional expert."

[0109] It should also be noted that the training process of the model in this application uses a target loss function to guide the implementation of step A3 above, which involves "using grouped sample medical records and prompts to perform specialized training on a general-purpose medical record content quality control model for various experts." This implementation process may include: using grouped sample medical records and prompts to generate sample quality control query instructions, which are then input into the general-purpose medical record content quality control model. The predicted quality control results are obtained through forward propagation of the model. The key optimization objective used is guided by a specific target loss function pre-designed in this application (such as the cross-entropy loss function mentioned later). This target loss function not only supervises the correctness of the final quality control results but also directly promotes the above training process through its unique structure, especially strengthening the dynamic routing capability of the gating network when switching between document boundaries and quality control contexts.

[0110] Based on this, specifically in this embodiment, after obtaining a general-purpose medical record content quality control model through step A1 and obtaining grouped sample medical records and prompt words through step A2, all settings of the hybrid expert model can be activated. In this way, with the parameters of the gating network and all expert networks activated, the grouped sample medical records and prompt words can be used to perform specialized training of each expert network on the general-purpose medical record content quality control model, thereby obtaining a specialized medical record content quality control model to improve the model's specialized quality control performance.

[0111] Specifically, one possible implementation is to integrate the grouped sample medical records and prompts into the prompts after obtaining them, generate a sample quality control inquiry instruction, and input the generated sample quality control inquiry instruction into a medical record content quality control model with general capabilities. Then, using the different expert network weights output by the gating network in the model, the value of the target loss function is calculated until the value meets the preset conditions (such as decreasing to basically unchanged). At this point, the update of the model parameters is stopped, and a medical record content quality control model with specialized capabilities is trained.

[0112] The role of the gating network is to select the most suitable expert combination for each character in the input sequence. It receives each character (represented by x) from the input sequence and outputs n gating weights, which represent the contribution of each expert model to processing the input data. The specific calculation formula is as follows:

[0113]

[0114]

[0115]

[0116] in, and This represents the learnable parameters of the gated network, and the specific values ​​are not limited. This represents the linear transformation result of the gated network; This represents a probability distribution vector, indicating the contribution weight of each expert network to the current input character (x). Activating k expert networks using the KeepTopK function can effectively reduce computational load, improve efficiency, and reduce noise.

[0117] In this way, the gating network dynamically assigns weights to each input character (x), selects the most relevant k expert network combinations, and learns the adaptation relationship between the input character and the expert network during training through a dynamic routing mechanism. This ensures that the local expert network can be efficiently activated for quality control when the model is applied, thus realizing the "divide-and-conquer" strategy. This maintains the model capacity while controlling the computational cost.

[0118] Furthermore, due to the high homogeneity of various documents in electronic medical records—for example, laboratory reports typically record patients' biochemical indicators, and admission diagnoses usually record confirmed information for various diseases—to improve quality control, similar documents should be processed by the same or similar expert networks during input into the model. Moreover, when inputting a (sample) quality control query into the model, different documents are often combined to allow the model to obtain sufficient information. A specific example of such a query can be shown below:

[0119] "# You are a medical record quality control expert. You need to determine whether the chief complaint can lead to the chief diagnosis based on the given chief complaint and chief diagnosis."

[0120] Chief Complaint:

[0121] %s

[0122] ## Main Diagnosis:

[0123] %s".

[0124] Here, "%s" represents a placeholder. In the example above, it is intended that the chief complaint, chief diagnosis, and other instructions be processed by their respective expert networks. Therefore, during model training, this application uses the cross-entropy between the gating network weights H(x) of adjacent input characters as the target loss function to characterize the changes in expert network selection for different input characters. The goal is to ensure that the cross-entropy sequence is relatively low and stable at most nodes, only showing a high trend at certain key nodes (such as when jumping from one document to the next), meaning that the gating network exhibits significant fluctuations in expert network selection. The specific formula for calculating the target loss function (i.e., the cross-entropy loss function) is as follows:

[0125]

[0126]

[0127] Where loss represents the target loss function; n represents the number of characters in the complete (sample) quality control query instruction of the input model; This represents the weight of the i-th expert network obtained by the input character x in the gated network; express and Cross-entropy between slices; k represents the number of expert networks; This indicates an adjustable hyperparameter. The specific value is not limited and can be set according to the actual situation and experience. For example, it can be set to 1, 3 or 5.

[0128] It's important to note that when training the model using the aforementioned objective loss function, the gradients generated during backpropagation will simultaneously apply to all k activated expert networks. To minimize this loss, each expert network needs to adjust its internal parameters to output results closer to the correct answer within its area of ​​expertise. For example, an expert network that frequently processes "diagnostic" documents will, driven by this loss, learn in depth the logical rules for deriving diagnostic conclusions from symptoms, thereby continuously improving its professional accuracy in that specific quality control dimension.

[0129] Furthermore, during training, this application introduces a fundamental assumption: a semantically coherent text should be stably processed by the same set of expert networks. Based on this, this application expects the expert weight distribution assigned by the gating network to adjacent characters in the sequence to remain highly similar. When the document type or semantic context changes significantly, a corresponding and rapid switch in the weight distribution is allowed and expected. Therefore, when processing homogeneous text blocks (such as complete "present medical history" paragraphs), the gating network learns to output an almost invariant weight distribution, thereby locking in the most suitable subset of experts. This effectively avoids unnecessary computational switching. At the boundary points of document switching or instruction changes, maintaining stable routing becomes significantly more challenging. At this point, the optimization process drives the gating network to learn to adjust its routing strategy at such critical nodes, seamlessly transferring the task to a new, more suitable set of experts. This endows the model with the ability to dynamically adapt to complex, multi-part medical record content.

[0130] Therefore, this application employs the aforementioned objective loss function for model training. Starting from the final output of the model, it forces each expert network to refine and deepen its expertise in its frequently assigned domain; otherwise, the total loss will directly increase. Furthermore, by focusing on the internal decision-making process, the gating network is trained to form an intelligent routing strategy that "switches while remaining stable," ensuring the accuracy of task allocation. The combination of these two losses ensures that while pursuing higher accuracy, the model must also consider the rationality and efficiency of routing decisions. This is the key to balancing "model performance" and "computational efficiency" in a hybrid expert model. Consequently, the gating network in the final trained medical record content quality control model can accurately route different quality control subtasks to the corresponding highly specialized expert networks, achieving, and even surpassing, the quality control performance achievable only by a full-parameter model through sparse activation, while significantly reducing computational costs.

[0131] Therefore, when supervising and fine-tuning the medical record content quality control model, this application, after applying the aforementioned target loss function, can capture the changes in expert network allocation at each node through the cross-entropy term and suppress irrelevant fluctuations through the regularization term, thereby guiding the gating network to dynamically balance stability and flexibility. In this way, during training, the model parameters can be continuously updated based on changes in the loss function value. For example, by minimizing the loss value, the model can gradually learn to maintain the stability of the expert network combination when the content is coherent and quickly adjust during context switching, until the loss function value meets preset conditions, such as reaching a minimum value with very small changes (basically unchanged), or reaching a preset maximum number of iterations (e.g., 100 times). At this point, updating the model parameters stops, the model training is complete, and a medical record content quality control model with strong professional capabilities is obtained. Ultimately, this improves the accuracy and computational efficiency of the gating network's allocation of expert networks within the model.

[0132] Understandably, this sparse expert network activation method helps the model to more flexibly select appropriate expert network combinations when faced with new inputs that differ from the training data distribution, rather than relying on the combined effect of all parameters, thereby improving the model's domain generalization ability.

[0133] Building upon this, after training and generating a medical record content quality control model using sample documents and sample medical records, the generated model can be further validated using verification medical records. The specific validation process may include the following steps B1-B3:

[0134] Step B1: Obtain the verification medical record.

[0135] In this embodiment, in order to verify the quality control model of medical record content, it is first necessary to obtain a large number of existing real medical record documents from various branches of the medical field as verification medical records for subsequent step B2. Here, verification medical records refer to textual information in the medical field (such as medical papers) that can be used to verify the quality control model of medical record content.

[0136] Step B2: Using the verification medical record and prompt words, generate verification quality control query instructions, input them into the medical record content quality control model, and predict the verification quality control results corresponding to the verification medical record.

[0137] After obtaining the verification medical record through step B1, the content of the verification medical record can be further integrated with a prompt to generate a verification quality control query instruction. The generated verification quality control query instruction is then input into the medical record content quality control model to obtain the verification quality control result corresponding to the verification medical record, which is then used to execute the subsequent step B3.

[0138] Step B3: When the verification quality control results are inconsistent with the actual quality control results corresponding to the verification medical record, the verification medical record is used again as the sample medical record to update the quality control model of the medical record.

[0139] After obtaining the validation quality control results corresponding to the validation medical record through step B2, if the validation quality control results corresponding to the validation medical record are inconsistent with the actual quality control results corresponding to the validation medical record (such as the actual quality control results marked by humans), the validation medical record can be used again as a sample medical record to update the parameters of the quality control model of the medical record.

[0140] Through the above embodiments, the quality control model of medical record content can be effectively validated using validated medical records. When the validated quality control results predicted by the model are inconsistent with the actual quality control results corresponding to the validated medical records (such as the actual quality control results marked by humans), the quality control model of medical record content can be adjusted and updated in a timely manner, thereby helping to improve the quality control precision and accuracy of the model.

[0141] In summary, this embodiment provides a method for quality control of medical record content. First, a target medical record to be quality controlled is obtained. Then, using the target medical record and prompts, a quality control query instruction is generated and input into a pre-trained medical record content quality control model for quality control processing, yielding the quality control result corresponding to the target medical record. The medical record content quality control model includes a gating network and an expert network. The training method for the medical record content quality control model includes: first, obtaining sample documents, and then, with the parameters of the gating network frozen and all expert network parameters shared, training the initial medical record content quality control model for general capabilities using the sample documents, resulting in a medical record content quality control model with general capabilities; the sample documents are documents in a general domain. Next, sample medical records are obtained, and based on the homogeneity characteristics of the medical record documents, different documents and prompts in the sample medical records are grouped, resulting in grouped sample medical records and prompts. Then, with the parameters of the gating network and all expert networks activated, the grouped sample medical records and prompts are used to perform specialized training on the medical record content quality control model with general capabilities for each expert, resulting in a medical record content quality control model with specialized capabilities.

[0142] As can be seen, since this application first trains the initial medical record content quality control model (such as a hybrid expert model) with general capabilities using sample documents from a general domain, and then trains it with specialized capabilities using grouped sample medical records, it obtains a medical record content quality control model with specialized capabilities. This not only reduces the training cost of the model (and indirectly reduces the quality control cost), but also effectively improves the quality control accuracy and efficiency of the trained medical record content quality control model. Therefore, when using this medical record content quality control model to perform quality control processing on the target medical records to be controlled, it can effectively improve the accuracy and efficiency of the quality control results, and thus achieve the ideal quality control effect.

[0143] Second Embodiment

[0144] This embodiment will introduce a quality control device for medical record content; please refer to the above method embodiment for related content.

[0145] See Figure 3 This is a schematic diagram of the composition of a medical record content quality control device provided in this embodiment. The device 300 includes:

[0146] The first acquisition unit 301 is used to acquire the target medical records to be quality controlled.

[0147] The quality control unit 302 is used to generate quality control inquiry instructions using the target medical record and prompt words, and input them into a pre-trained medical record content quality control model for quality control processing to obtain the quality control result corresponding to the target medical record; wherein, the medical record content quality control model includes a gating network and an expert network;

[0148] The second acquisition unit is used to acquire sample documents, and, with the parameters of the gated network frozen and all the expert network parameters shared, to train the initial medical record content quality control model with general capabilities using the sample documents, thereby obtaining a medical record content quality control model with general capabilities; the sample documents are documents in a general domain.

[0149] The third acquisition unit is used to acquire sample medical records and, based on the homogeneity of the medical record documents, group the different documents and prompt words in the sample medical records to obtain the grouped sample medical records and prompt words.

[0150] The training unit is used to perform specialized training on the general-capable medical record content quality control model for each expert using the grouped sample medical records and prompt words, while activating the parameters of the gating network and the parameters of all the expert networks, so as to obtain the medical record content quality control model with specialized capabilities.

[0151] In one implementation of this embodiment, the quality control unit 302 includes:

[0152] The input subunit is used to generate quality control inquiry instructions using the target medical record and prompt words, input them into the gating network of the pre-trained medical record content quality control model, filter out k expert networks in the model to perform quality control on the target medical record, and determine the weight values ​​corresponding to the k expert networks; where k is a positive integer greater than 0.

[0153] The quality control subunit is used to perform quality control processing on the target medical record using the k expert networks respectively, to obtain k initial quality control results; and to perform a weighted summation using the k initial quality control results and the weight values ​​corresponding to the k expert networks to obtain the final quality control result corresponding to the target medical record.

[0154] In one implementation of this embodiment, the training unit 305 is specifically used for:

[0155] Using the grouped sample medical records and prompts, sample quality control query instructions are generated and input into the general-purpose medical record content quality control model. The target loss function is calculated using the different expert network weights output by the gating network in the model. The model parameter updates are stopped once the target loss function meets a preset condition, thus training a specialized medical record content quality control model. The target loss function is used to constrain the update of model parameters, thereby improving the gating network's ability to route input medical records to the expert network most likely skilled in processing such documents, based on the document type and structural features.

[0156] In one implementation of this embodiment, the target loss function is the cross-entropy loss function.

[0157] In one implementation of this embodiment, the apparatus further includes:

[0158] The fourth acquisition unit is used to acquire and verify medical records;

[0159] The input unit is used to generate a verification quality control query instruction using the verification medical record and prompt words, input it into the medical record connotation quality control model, and predict the verification quality control result corresponding to the verification medical record;

[0160] The update unit is used to update the quality control model of the medical record by reusing the verification medical record as the sample medical record when the verification quality control result is inconsistent with the actual quality control result corresponding to the verification medical record.

[0161] In one implementation of this embodiment, the gated network includes a feedforward neural network, a KeepTopk function, and a Softmax function; the expert network is a trainable feedforward neural network.

[0162] Furthermore, this application embodiment also provides a medical record content quality control device, including: a processor, a memory, and a system bus;

[0163] The processor and the memory are connected via the system bus;

[0164] The memory is used to store one or more programs, the one or more programs including instructions, which, when executed by the processor, cause the processor to perform any of the above-described implementations of the medical record content quality control method.

[0165] refer to Figure 4 The diagram illustrates a structure suitable for implementing the medical record content quality control device in the embodiments of this application. The medical record content quality control device in the embodiments of this application may include, but is not limited to, fixed terminals such as laptops, desktop computers, PC terminals, servers, and server clusters. Figure 4 The medical record quality control device shown is merely an example of an electronic device and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0166] like Figure 4As shown, the medical record content quality control device may include a processor (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. When the medical record content quality control device is powered on, the RAM 403 also stores various programs and data required for device operation. The processor 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0167] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 408 including, for example, memory cards, hard drives, etc.; and communication devices 409. Communication device 409 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 The medical record content quality control equipment shown includes various devices; however, it should be understood that implementation or possession of all shown devices is not required. More or fewer devices may be implemented or possessed alternatively.

[0168] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform any of the above-described implementation methods of the medical record content quality control method.

[0169] Furthermore, this application embodiment also provides a computer program product, which, when run on a terminal device, causes the terminal device to execute any of the above-described implementation methods of the medical record content quality control method.

[0170] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a media gateway, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0171] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0172] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0173] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for quality control of medical record content, characterized in that, include: Obtain the target medical records to be quality controlled; Using the target medical record and prompt words, a quality control inquiry instruction is generated and input into a pre-trained medical record content quality control model for quality control processing to obtain the quality control result corresponding to the target medical record; The medical record content quality control model includes a gating network and an expert network; the training method of the medical record content quality control model is as follows: Obtain sample documents, and while freezing the parameters of the gating network and sharing all the parameters of the expert network, use the sample documents to train the initial medical record content quality control model to obtain a medical record content quality control model with general capabilities; the sample documents are documents in a general domain. Obtain sample medical records, and based on the homogeneity of the medical record documents, group the different documents and prompt words in the sample medical records to obtain the grouped sample medical records and prompt words; With the parameters of the gating network and all the expert networks activated, the grouped sample medical records and prompts are used to perform specialized training on the medical record content quality control model with general capabilities for each expert, thereby obtaining the medical record content quality control model with specialized capabilities.

2. The method according to claim 1, characterized in that, The process involves using the target medical record and prompt words to generate quality control inquiry instructions, which are then input into a pre-trained medical record content quality control model for quality control processing. The result obtained is the quality control outcome corresponding to the target medical record, including: Using the target medical record and prompt words, a quality control inquiry instruction is generated and input into the gating network of a pre-trained medical record content quality control model. This process filters out k expert networks in the model that perform quality control on the target medical record and determines the weight values ​​corresponding to the k expert networks; where k is a positive integer greater than 0. The target medical record is subjected to quality control processing using the k expert networks to obtain k initial quality control results; and the k initial quality control results and the weight values ​​corresponding to the k expert networks are used to perform weighted summation to obtain the final quality control result corresponding to the target medical record.

3. The method according to claim 1, characterized in that, The process of using the grouped sample medical records and prompts to perform specialized training on the general-capability medical record content quality control model for various experts, resulting in a specialized medical record content quality control model, includes: Using the grouped sample medical records and prompts, sample quality control query instructions are generated and input into the general-purpose medical record content quality control model. The target loss function is calculated using the different expert network weights output by the gating network in the model. The model parameter updates are stopped once the target loss function meets a preset condition, thus training a specialized medical record content quality control model. The target loss function is used to constrain the update of model parameters, thereby improving the gating network's ability to route input medical records to the expert network most likely skilled in processing such documents, based on the document type and structural features.

4. The method according to claim 3, characterized in that, The target loss function is the cross-entropy loss function.

5. The method according to claim 1, characterized in that, The method further includes: Obtain verified medical records; Using the verification medical record and prompt words, a verification quality control query instruction is generated, which is then input into the medical record content quality control model to predict the verification quality control result corresponding to the verification medical record. When the verification quality control result is inconsistent with the actual quality control result corresponding to the verification medical record, the verification medical record is used again as the sample medical record, and the quality control model of the medical record is updated.

6. The method according to any one of claims 1-5, characterized in that, The gated network includes a feedforward neural network, a KeepTopk function, and a Softmax function; the expert network is a trainable feedforward neural network.

7. A medical record content quality control device, characterized in that, include: The first acquisition unit is used to acquire the target medical records to be quality controlled. The quality control unit is used to generate quality control inquiry instructions using the target medical record and prompt words, and input them into a pre-trained medical record content quality control model for quality control processing to obtain the quality control result corresponding to the target medical record; wherein, the medical record content quality control model includes a gating network and an expert network; The second acquisition unit is used to acquire sample documents, and, with the parameters of the gated network frozen and all the expert network parameters shared, to train the initial medical record content quality control model with general capabilities using the sample documents, thereby obtaining a medical record content quality control model with general capabilities; the sample documents are documents in a general domain. The third acquisition unit is used to acquire sample medical records and, based on the homogeneity of the medical record documents, group the different documents and prompt words in the sample medical records to obtain the grouped sample medical records and prompt words. The training unit is used to perform specialized training on the general-capable medical record content quality control model for each expert using the grouped sample medical records and prompt words, while activating the parameters of the gating network and the parameters of all the expert networks, so as to obtain the medical record content quality control model with specialized capabilities.

8. A quality control device for medical record content, characterized in that, include: Processor, memory, system bus; The processor and the memory are connected via the system bus; The memory is used to store one or more programs, the one or more programs including instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the method described in any one of claims 1-6.

10. A computer program product, characterized in that, The program product includes a computer program that, when executed by an electronic product, can implement the method described in any one of claims 1-6.