Post-processing method and device for medicine management data

By building a medical knowledge graph and using an adversarial sample generator, combined with pre-trained anomaly detection model, the problem of abnormal identification and repair in medical management data is solved, efficient and accurate data repair is achieved, and the security and efficiency of data processing are improved.

CN120220956APending Publication Date: 2025-06-27SHANGHAI PHARMA PHARMA TECH CONSULTING
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510302843.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

The prior art has limitations in abnormal identification and repair in medical management data, especially the lack of deep integration of medical logic, which leads to the repair results that may not meet the actual medical needs, and the automated repair capabilities are limited, requiring a large amount of manual intervention, which is inefficient and easy to introduce subjective errors.

Method used

Build a medical knowledge graph, including drugs, diseases and patient entities and their relationships, combines a pre-trained anomaly detection model and an adversarial sample generator to generate repair candidate data that conforms to medical logic through an adversarial sample generator, and perform knowledge graph logic verification, triggering iterative optimization or manual intervention to ensure the accuracy of the repair data.

Benefits of technology

It realizes efficient identification and repair of abnormalities in medical management data. The generated repair data not only repairs abnormalities, but also highly consistent with medical rules, improving the accuracy and security of data processing, reducing repair solutions that do not meet actual needs, and reducing the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120220956A_ABST
    Figure CN120220956A_ABST
Patent Text Reader

Abstract

The invention discloses a post-processing method and device for medicine management data, and relates to the field of medicine data processing, and the method comprises the steps: constructing a medicine knowledge graph; identifying the problems of dosage abnormity, contraindication conflict or inconsistency between the medicine batch and the curative effect in the input data through a pre-training abnormity detection model; inputting the abnormal data into an adversarial sample generator, generating a repair candidate data set, and embedding vectorization constraints of a knowledge graph into a generator network; performing logic verification on the candidate data set, traversing graph related entities and relation paths, and calculating conflict scores; if the score is lower than a threshold value, outputting repair data, otherwise, optimizing the generator or requesting manual intervention; generating a minimization confirmation interface according to a priority rule, and only displaying an abnormal field and a correction suggestion; and feeding back a confirmation result to the generator and the atlas, and updating parameters and weights. According to the invention, the problems of low efficiency and poor accuracy of medicine data abnormity identification and restoration are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of pharmaceutical data management, and more particularly, to a post - processing method and device for pharmaceutical management data. Background Art

[0002] Pharmaceutical management data involves the recording and processing of drug, disease, and patient information, playing an important role in modern medical systems. With the wide application of electronic medical records, drug databases, and clinical guidelines, a large amount of data is used to support diagnosis and treatment decisions and drug management.

[0003] However, these data may be abnormal during the processes of collection, entry, and transmission. For example, the drug dosage exceeds the safe range, there are conflicts in contraindications, or the drug batch does not match the efficacy. If these problems are not dealt with in time, it may lead to a decline in the treatment effect and even endanger the safety of patients. Therefore, how to efficiently identify and repair data anomalies has become an urgent technical problem to be solved.

[0004] In the prior art, anomalies are often detected by rule - matching or statistical analysis methods. For example, the dosage range is checked based on preset thresholds, or outliers are statistically analyzed using historical data. In addition, some methods introduce machine - learning models, such as support vector machines or clustering algorithms, to find data points deviating from the normal pattern by training historical data. However, these methods have limitations when dealing with complex pharmaceutical data, especially the lack of in - depth integration of medical logic. They often rely only on numerical distributions and ignore rules such as contraindications or drug interactions, resulting in repair results that may not meet the actual medical needs. Additionally, the prior art has limited ability in automated repair, usually requiring a large amount of manual intervention, with low efficiency and prone to introducing subjective errors. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a post - processing method and device for pharmaceutical management data to solve the problems mentioned in the background art.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A post - processing method for pharmaceutical management data includes the following steps:

[0008] Construct a pharmaceutical knowledge graph, which includes drug entities, disease entities, patient entities, and the relationships of contraindications, indications, and drug interactions between entities;

[0009] Identify abnormal data in the input pharmaceutical data through a pre - trained anomaly detection model, where the abnormal data includes dosage anomalies, contraindication conflicts, or inconsistent drug batches and efficacy;

[0010] Input the abnormal data into the adversarial sample generator to generate a repair candidate dataset, and embed the vectorized constraints of the medical knowledge graph into the network structure of the adversarial sample generator;

[0011] Perform knowledge graph logic verification on the repair candidate dataset, traverse the entities and relationship paths in the graph related to the repair data, and calculate the logic conflict score;

[0012] If the logic conflict score is lower than the preset threshold, output the repair data as the final result, otherwise trigger the iterative optimization generator or push a manual intervention request;

[0013] According to the priority calculation rule of the manual intervention request, select high-priority abnormal data to generate a minimized manual confirmation interface, which only exposes the abnormal fields and relevant correction suggestions;

[0014] Feed back the manual confirmation result to the adversarial sample generator and the medical knowledge graph, and update the weight parameters of the generator and the dynamic relationship weights in the graph.

[0015] Optionally, the construction of the medical knowledge graph includes:

[0016] Extract entities and relationships from the drug instruction database, clinical practice guidelines, and electronic medical record system, and dynamically fuse newly published medical literature data through a graph neural network;

[0017] Convert the logical rules in the medical knowledge graph into geometric constraints in the embedding space, including forcing the vector distance between entities associated with contraindications to be greater than the preset threshold, and dynamically adjusting the constraint weights through a graph attention network.

[0018] Optionally, the adversarial sample generator is implemented based on conditional CycleGAN, including:

[0019] The generator adopts a U-Net structure and adds a residual connection module, and the input layer receives abnormal data and the corresponding patient context features;

[0020] The intermediate layer of the generator injects the embedding vectors of the medical knowledge graph through a cross-attention mechanism, and the output layer generates repair candidate data;

[0021] The discriminator adopts a Markov discriminant structure to evaluate the similarity between the repaired data and the normal data distribution and the consistency with the knowledge graph logic respectively.

[0022] Optionally, the knowledge graph logic verification includes:

[0023] Extract the drug name, disease name, and patient characteristics in the repair candidate data, and query whether there is a contraindication path or a drug interaction path in the graph;

[0024] If there is a conflicting path, calculate the logical conflict score as the product of the path weight and the conflict severity; otherwise, the score is zero.

[0025] When the logical conflict score exceeds the dynamic threshold, trigger the generator to re-optimize, and the dynamic threshold is automatically adjusted according to the anomaly density of the current data set.

[0026] Optionally, the artificial intervention priority calculation rule includes:

[0027] Obtain the preset risk level from the medical knowledge graph according to the anomaly type, and the risk level includes high risk, medium risk, and low risk;

[0028] Calculate the repair confidence as the reciprocal of the graph logic loss value output by the generator, and dynamically assign the business impact weight;

[0029] Perform a weighted sum of the risk level, repair confidence, and business impact weight to generate an artificial intervention urgency score.

[0030] Optionally, the minimized artificial confirmation interface includes:

[0031] Only display the original value of the abnormal field and the corrected value recommended by the generator, and hide the non-associated fields to protect patient privacy;

[0032] Provide radio buttons for the user to select to accept the correction suggestion or manually enter a new value, and encrypt and transmit the user selection result to the backend system.

[0033] Optionally, the weight parameters for updating the generator include:

[0034] Construct a contrastive learning sample pair from the artificially confirmed corrected data and the original output data of the generator;

[0035] Optimize the parameters of the generator through the contrastive loss function, so that the generator tends to output repair data consistent with the artificially corrected result.

[0036] Optionally, the dynamic fusion of newly released medical literature data includes:

[0037] Use a medical entity recognition model to extract drug names, indications, and adverse reaction keywords from the literature;

[0038] Update the feature vectors of existing entity nodes through a graph convolutional network, and create nodes for new entities and initialize the embedding vectors.

[0039] Optionally, the Markov discriminant structure includes:

[0040] The first discriminator branch uses a convolutional neural network to judge the consistency of the repair data and the normal data in local features;

[0041] The second discriminator branch uses a graph neural network to judge the global logical consistency between the repaired data and the medical knowledge graph;

[0042] The outputs of the two branches are used to generate the final discriminant result through weighted summation, and the weights are dynamically adjusted according to the current training stage.

[0043] The present invention also discloses a post-processing device for medical management data, including:

[0044] A knowledge graph construction module, configured to extract entities and relationships from multi-source medical data, and dynamically update the graph through a graph neural network;

[0045] An anomaly detection module, which uses a pre-trained isolation forest model combined with time series feature analysis to identify data anomalies;

[0046] An adversarial generation and repair module, including a conditional CycleGAN generator and a Markov discriminator, to generate repair candidate data that conforms to the logic of the knowledge graph;

[0047] A logic verification module, which traverses the medical knowledge graph to detect contraindication conflicts and drug interaction conflicts in the repaired data;

[0048] An artificial intervention interface module, which generates a minimized confirmation interface according to the priority calculation result and receives user feedback data;

[0049] An online learning module, which uses the artificial feedback data to update the generator parameters and the dynamic relationship weights of the knowledge graph.

[0050] The advantages of the present invention over the prior art are as follows. By constructing a medical knowledge graph that includes drug, disease, and patient entities and their relationships, and combining a pre-trained anomaly detection model and an adversarial sample generator, the present invention solves the problem of anomaly identification and repair in medical management data. This method can efficiently detect problems such as dosage anomalies and contraindication conflicts, and generate repair data that conforms to medical logic, significantly improving the accuracy and safety of data processing. Compared with traditional methods, by embedding the vectorization constraints of the knowledge graph into the generator, the repair results not only eliminate anomalies but also are highly consistent with medical rules, reducing repair solutions that do not meet actual requirements. In addition, the introduction of a logical verification and manual intervention mechanism further ensures the reliability of the repair data, while reducing the manual workload through a minimized manual confirmation interface. In the construction of the knowledge graph, the graph neural network is used to dynamically fuse new literature data to keep the graph real-time and adapt to the rapid update of medical knowledge. The adversarial generator adopts a conditional CycleGAN structure and generates repair data by combining patient context features, improving the personalization and practicality of the solution. Logical verification optimizes the flexibility of the repair process by calculating conflict scores and dynamically adjusting thresholds, while the priority calculation rule and online learning mechanism achieve efficient intervention and continuous improvement, thus further improving the efficiency and adaptability of data processing in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 is a flowchart of the method of the present invention;

[0052] Figure 2 is an example diagram of the knowledge graph of the present invention;

[0053] Figure 3 is a logic diagram of the method of the present invention;

[0054] Figure 4 is a logic diagram of the module of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0055] The following describes the specific embodiments of the present invention with reference to the accompanying drawings.

[0056] As Figure 1 shown in the method of the present invention, includes the following steps:

[0057] Construct a medical knowledge graph, which includes drug entities, disease entities, patient entities, and the contraindication relationship, indication relationship, and drug interaction relationship between entities;

[0058] Identify abnormal data in the input medical data through a pre-trained anomaly detection model, where the abnormal data includes dosage anomalies, contraindication conflicts, or inconsistent drug batches and efficacy;

[0059] Input the abnormal data into the adversarial sample generator to generate a repair candidate dataset, and embed the vectorized constraints of the medical knowledge graph in the network structure of the adversarial sample generator;

[0060] Perform knowledge graph logic verification on the repair candidate dataset, traverse the entities and relationship paths in the graph related to the repair data, and calculate the logic conflict score;

[0061] If the logic conflict score is lower than the preset threshold, output the repair data as the final result, otherwise trigger the iterative optimization generator or push a manual intervention request;

[0062] According to the priority calculation rule of the manual intervention request, select the abnormal data with high priority to generate a minimized manual confirmation interface, and the interface only exposes the abnormal fields and relevant correction suggestions;

[0063] Feed back the manual confirmation result to the adversarial sample generator and the medical knowledge graph, and update the weight parameters of the generator and the dynamic relationship weights in the graph.

[0064] As Figure 2 shown is a schematic diagram of a simple knowledge graph. The medical knowledge graph is a structured data network used to represent the entities in the medical field and the relationships between them. Entities can include: drug entities, such as drug A and drug B; disease entities, such as hypertension and diabetes; patient entities, such as patient ID and their basic information.

[0065] Relationships can include: contraindication relationships, such as a certain drug cannot be used for a certain disease; indication relationships, such as a certain drug is applicable to a certain disease; drug interaction relationships, such as adverse reactions will occur when two drugs are used simultaneously.

[0066] By constructing a medical knowledge graph, the knowledge in the medical field can be systematically organized and represented, providing a basis for subsequent anomaly detection and data repair. The anomaly detection model is a model pre-trained through machine learning algorithms and can identify anomalies in the input medical data. It includes: dosage anomalies, such as the dosage of a certain drug exceeds the recommended range (e.g., the daily dosage exceeds the safety limit); contraindication conflicts, such as a patient uses a drug that is contraindicated for their condition (e.g., a hypertensive patient uses a contraindicated drug); the inconsistency between the drug batch and the efficacy, such as the efficacy of a certain batch of drugs does not match the expectation (e.g., the data shows that a certain batch is ineffective).

[0067] The model can be trained based on historical data, learn normal patterns and rules, and identify data that deviates from these patterns to obtain abnormal data. Inputting the abnormal data into the adversarial sample generator can generate a repair candidate dataset; the adversarial sample generator can be set based on conditional CycleGAN (a type of generative adversarial network with cycle consistency) and can be used to generate a repair candidate dataset.

[0068] As Figure 3 shown, in the post - processing of pharmaceutical management data, when the system receives abnormal data (such as incorrect dosages, contraindication conflicts, or drug - disease mismatches), it inputs the data into a generator based on a Generative Adversarial Network (GAN). The task of the generator is to generate a set of candidate data that is similar to the original data but has the anomalies repaired. For example, if the dosage of a certain drug in the original data exceeds a reasonable range, the generator will adjust the dosage to a value that meets clinical standards; or if there is a contraindicated drug combination in the data, the generator will replace it with a safe alternative drug to eliminate the anomaly.

[0069] To ensure that the generated repaired data not only repairs the anomalies but also conforms to the professional rules in the pharmaceutical field, a vectorized representation of the pharmaceutical knowledge graph is embedded in the network structure of the generator. These vectorized representations capture the semantic information of entities (such as drugs, diseases, patients) and relationships (such as indications, contraindications, drug interactions) in the knowledge graph in the form of embedding vectors. Specifically, these embedding vectors are incorporated into the intermediate layer or attention mechanism of the generator, enabling the generator to refer to the logical rules in the knowledge graph when generating repaired data. For example, if the knowledge graph indicates that a certain drug cannot be used for patients with a specific disease, the generator will avoid such a combination in the repaired data; or if there is a known interaction risk between two drugs, the generator will adjust the candidate data to avoid such problems. In this way, the repaired candidate data generated by the generator not only maintains similarity with the original data but also is consistent with the rules and relationships in the pharmaceutical knowledge graph on the basis of anomaly repair, thus improving the accuracy and security of the data.

[0070] Next, the repaired candidate data set is output. For example, the abnormal drug combination is replaced with a non - conflicting combination. Further, logical verification of the knowledge graph for the repaired candidate data set is required, including traversing the entity and relationship paths in the knowledge graph related to the repaired data to check its consistency, and calculating the degree of conflict between the repaired data and the knowledge graph information during the verification process. For example, if the drug combination recommended by the repaired data still has an interaction relationship in the graph, the score is relatively high.

[0071] If the logical conflict score is lower than a preset threshold, it indicates that the repaired data is consistent with the knowledge graph and can be output as the final result. If the score is higher than the threshold, it triggers iterative optimization of the generator, which specifically includes the following steps:

[0072] The system adjusts the parameters of the generator, such as network weights or hyperparameters. Based on the adjusted parameters, the generator regenerates a new set of repaired data. The system performs knowledge graph logic verification on the newly generated repaired data and calculates its logical conflict score. If the new logical conflict score is lower than the preset threshold, it indicates that the repaired data already meets the requirements, and the iteration process ends. The system outputs this repaired data as the final result. If the score is still higher than the threshold, the system will continue to adjust the parameters and generate new data, iterating repeatedly until the score meets the standard or reaches the preset maximum number of iterations.

[0073] In addition to triggering iterative optimization of the generator, it is also possible to directly push or push a request for manual intervention after multiple iterations are still ineffective, which is reviewed by professionals. When manually pushing, according to the severity of the anomaly, for example, anomalies involving life safety have a higher priority, and high-priority anomaly data is selected for processing first. When making a request for manual intervention, a simple manual confirmation interface is generated, which only displays the anomaly fields (such as the abnormal drug combination) and the correction suggestions (such as replacement suggestions), reducing the manual workload and protecting patient privacy.

[0074] Finally, the manual confirmation result is fed back to the adversarial sample generator and the medical knowledge graph. The generator is adjusted according to the feedback to make it generate more accurate repaired data. Specifically, the relationship weights in the graph are updated (for example, increasing the confidence of a certain drug interaction), improving the accuracy of the graph. Through continuous feedback, the system performance can be optimized.

[0075] The following gives a specific example to summarize the above solution:

[0076] Suppose a patient is using drug A and drug B simultaneously. In the graph content, the entities include drug A and drug B, and in the relationship, there is a "drug interaction" relationship between drug A and drug B (for example, using them simultaneously will cause adverse reactions), so the graph clearly records that drug A and drug B cannot be used simultaneously.

[0077] After inputting the data of the patient using drug A and drug B simultaneously, the model can identify this as a contraindication conflict because the knowledge graph shows that there is a drug interaction between drug A and drug B. At this time, the model marks this data as abnormal data.

[0078] Next, the abnormal data (drug A + drug B) is input into the adversarial sample generator to generate repair candidates, such as replacing drug B with drug C. The generator uses the vectorization constraints of the knowledge graph to ensure that drug C has no interaction with drug A and that drug C has a similar efficacy to drug B. Next, the repaired candidate dataset (drug A + drug C) is output.

[0079] The system traverses the knowledge graph to check whether there is a "drug interaction" relationship between drug A and drug C. Suppose the graph shows that there is no interaction between drug A and drug C, then the logical conflict score is 0 (lower than the threshold of 0.1). Since the logical conflict score is lower than the threshold, the final repaired data output is "The patient uses drug A and drug C."

[0080] If drug C does not match the patient's other conditions (such as diseases) and the score is higher than the threshold, it can trigger manual intervention. The manual interface displays "Abnormality: There is an interaction between drug A + drug B; Suggestion: Replace with drug C", which is confirmed by the doctor. If the doctor confirms that drug C is appropriate or decides to choose other drugs, the confirmed content can be further used to adjust the generator weights to improve the accuracy of generating similar repairs.

[0081] In some embodiments, the process of constructing a medical knowledge graph can start from multiple data sources, aiming to extract entities and the relationships between them, and ensure that the graph can reflect the latest medical progress through dynamic updates.

[0082] Specifically, the system retrieves key information from the drug instruction database, clinical practice guidelines, and electronic medical record systems. Drug instructions usually contain information such as indications, contraindications, and usage dosages of drugs. For example, a certain antibiotic may be labeled as applicable to bacterial infections but contraindicated for patients allergic to penicillin; clinical practice guidelines provide the best treatment plans for diseases, such as the stepped treatment recommendations for hypertension; the electronic medical record system records the patient's actual medication history and disease progression, such as data on a patient taking antihypertensive drugs and accompanying blood pressure changes during a specific period.

[0083] The entities in these data sources - such as drugs, diseases, and patients - and the relationships between them - such as "drugs treat diseases" or "drugs are contraindicated for certain conditions" - are extracted and organized as nodes and edges in the graph, forming a structured network.

[0084] In some embodiments, in order to keep the graph real-time and authoritative, graph neural networks can be used to dynamically fuse newly published medical literature data. When a new research paper is published, such as reporting the efficacy of a new drug on diabetes complications, the system will identify the key entities (such as the new drug and diabetes complications) and relationships (such as efficacy) through natural language processing technology, and then convert this information into new nodes or new edges in the graph.

[0085] For example, if a literature mentions that "Drug A significantly reduces the progression rate of diabetic nephropathy", the system will create a node representing Drug A and a node representing diabetic nephropathy, and connect them with an edge labeled "treatment effect", while updating the feature vectors of the relevant nodes, such as adding quantitative indicators of the therapeutic effect. This update is not simply stacking data, but recalculating the structure and features of the graph through a graph neural network to ensure seamless integration of new information with existing knowledge.

[0086] In some embodiments, during the process of constructing the graph, the logical rules in the medical field need to be transformed into geometric constraints in the embedding space to support complex reasoning tasks. For example, for entities related to contraindications, the system will force their distances in the vector space to be greater than a preset threshold. Suppose in the Euclidean space, this threshold is set to 5, then if a certain antibiotic and penicillin allergy are in a contraindication relationship, the distance between their embedding vectors must exceed 5 to reflect their medical incompatibility. The implementation of this geometric constraint depends on the optimization and adjustment of the embedding vectors to ensure that the graph can reflect medical logic at the mathematical level. To make these constraints more flexible, a graph attention network can be introduced to dynamically adjust their weights.

[0087] When processing acute disease data, such as acute myocardial infarction, the importance of contraindications may be amplified - the system will increase the constraint weight related to contraindications by calculating the attention scores between entities, such as increasing from the default 1.0 to 1.5, so as to prioritize patient safety. This dynamic adjustment enables the graph to flexibly adapt to different medical contexts according to the requirements of specific scenarios.

[0088] In some embodiments, for abnormal data repair, a conditional CycleGAN-based adversarial sample generator can be used to generate repair candidate data. The generator is based on the U-Net structure, which is a network architecture commonly used in image generation tasks but is adjusted in the present invention to process structured data. To improve the stability of the generation process, a residual connection module is added to the generator, enabling the network to better retain the features of the input data during training. The input layer receives not only the abnormal data itself - such as a drug dosage that significantly deviates from the normal range - but also the corresponding patient context features, such as the patient's age, gender, weight, and disease diagnosis information.

[0089] Taking a specific example, if the input data is an abnormal hypertension drug dosage for a 65-year-old male patient (such as 1000 mg per day, while the normal range is 10 - 20 mg), the generator will combine the patient's weight (assumed to be 70 kg) and the severity of the condition (assumed to be moderate hypertension) to deduce a reasonable dosage adjustment.

[0090] The intermediate layer of the generator can incorporate the embedding vectors of the medical knowledge graph through the cross-attention mechanism, which ensures that the generation process can refer to the logical rules in the graph. For example, when repairing abnormal data involving multiple drugs, if the graph records an interaction between two drugs (such as drug B enhancing the toxicity of drug C), the cross-attention mechanism will make the generator focus on this relationship and avoid generating a solution that introduces new conflicts. After processing, the output layer of the generator will generate repair candidate data, such as adjusting the dose to 15 milligrams per day or suggesting replacing it with another drug combination without interaction.

[0091] In some embodiments, to evaluate the quality of these repair candidate data, a discriminator based on the Markov discriminant structure can be designed. The work of this discriminator is divided into two aspects:

[0092] First, it will compare the distribution characteristics of the repair data with the historical normal data to ensure that the generated repair values are statistically reasonable. For example, if the doses of hypertension drugs in the historical data mostly concentrate between 10 - 20 milligrams, the discriminator will check whether the repaired 15 milligrams conforms to this distribution.

[0093] Second, the discriminator will also check whether the repair data is consistent with the logical rules of the knowledge graph, such as confirming that the adjusted dose does not violate contraindications or cause drug interactions. Taking the previous example, the discriminator will verify whether the dose of 15 milligrams is suitable for a 65-year-old patient with moderate hypertension and has no conflict with other medication information recorded in the graph.

[0094] Through the joint evaluation of these two dimensions, the discriminator provides feedback to the generator to help it continuously optimize the output, and finally generate a repair solution that conforms to both the data distribution and medical logic. This collaborative mechanism of generation and discrimination ensures the efficiency and reliability of abnormal data repair.

[0095] In some embodiments, during the logical verification process of the medical knowledge graph, it is first necessary to extract key information from the repair candidate data, such as drug names, disease names, and the characteristic data of the patient, which may include specific contents such as age, gender, and weight. Through this information, queries can be made in the knowledge graph to check whether there are contraindication paths or drug interaction paths.

[0096] For example, if the repair candidate data suggests using a certain antihypertensive drug for a 65-year-old hypertensive patient, then during the query, it will focus on checking whether there is a contraindication relationship between this drug and hypertension in the graph, or whether there are adverse interactions with other drugs currently taken by the patient. If the query results show the existence of such a conflict path, it is necessary to further calculate a logical conflict score to quantify the degree of this conflict.

[0097] This score is obtained by multiplying the path weight by the conflict severity. The path weight reflects the strength of the relationship in the knowledge graph and usually ranges from 0 to 1, while the conflict severity is a value defined according to the degree of medical impact. For example, a minor side effect may be 2, and a severe allergic reaction may be 10. Suppose the weight of a certain contraindication path is 0.8 and the conflict severity is 10, then the logical conflict score is 0.8×10 = 8.0. If no conflict path is found after the query, the score is directly recorded as 0.

[0098] When this logical conflict score exceeds a dynamic threshold, it will trigger the generator to re-optimize the repair plan. The setting of this dynamic threshold is not fixed but will be automatically adjusted according to the anomaly density of the current dataset. For example, in batches with more abnormal data, the threshold may be appropriately relaxed to 6 to reduce the frequency of optimization triggering; while in batches with less abnormal data, the threshold may be lowered to 4 to ensure the high quality of the repair plan.

[0099] In some embodiments, for the calculation rule of the artificial intervention priority, the process starts with obtaining the preset risk levels in the medical knowledge graph according to the anomaly type. These risk levels are usually divided into three types: high risk, medium risk, and low risk. For example, a dosage anomaly may be classified as medium risk with a score of 5, while a contraindication conflict may be regarded as high risk with a score of 10.

[0100] Next, the repair confidence needs to be calculated. This value is obtained by taking the reciprocal of the logical loss value of the graph output by the generator. The logical loss value of the graph reflects the degree of consistency between the repaired data and the knowledge graph. The smaller the value, the higher the consistency, and the corresponding confidence is also higher. For example, when the loss value is 0.2, the confidence is 1 / 0.2 = 5.

[0101] In addition, the business impact weight is dynamically assigned, and this weight varies according to the specific scenario. For example, when processing the abnormal data of emergency patients, the business impact weight may be set to 1.5 to speed up the processing; while in the general outpatient scenario, it may be only 1.0.

[0102] Finally, the risk level, repair confidence, and business impact weight are weighted and summed to generate an artificial intervention urgency score. For example, suppose the risk level of an anomaly is 10 (high risk), the repair confidence is 0.8, and the business impact weight is 1.2, then the urgency score is 10×0.8×1.2 = 9.6. The level of this score directly determines which abnormal data needs to be given priority for artificial intervention.

[0103] In some embodiments, when designing the minimized manual confirmation interface, the focus is on simplifying information display and protecting patient privacy. Specifically, only the original values of abnormal fields and the corrected values recommended by the generator are displayed on the interface, while fields unrelated to the abnormality, such as the patient's name or ID number, are hidden. For example, for a record with a dosage abnormality, the interface may display "Dosage: 150 mg (original) → 80 mg (recommended)", so that users can clearly see the problem and the recommended solution. To facilitate user operation, radio boxes are provided on the interface, and users can choose to directly accept the correction suggestions of the generator or manually enter a new value. For example, according to the specific situation of the patient, the doctor may adjust the dosage to 90 mg. After the user makes a choice, the result is transmitted to the backend system in an encrypted manner to ensure the security of data during transmission and also meet the requirements of privacy protection.

[0104] In some embodiments, when updating the weight parameters of the generator, in the embodiments of the present invention, the corrected data confirmed manually can be paired with the data originally output by the generator to form a contrastive learning sample pair. The role of these sample pairs is to guide the generator to gradually learn the correct repair results after manual intervention.

[0105] For example, assume that the generator initially generated a corrected value of 80 mg for a certain abnormal dosage data, and the human expert adjusted it to 90 mg according to the actual situation. Then this pair of data (80 mg, 90 mg) is used as a contrastive sample.

[0106] The system optimizes the parameters of the generator through a contrastive loss function. Specifically, the contrastive loss function calculates the numerical difference between the output of the generator (80 mg) and the manually confirmed data (90 mg), and uses this difference to adjust the weights of the generator through backpropagation.

[0107] In this way, as the training progresses, the generator can gradually adapt to the correction habits of human experts and be more inclined to output results close to 90 mg when generating repair data in the future, thereby improving the accuracy of repair.

[0108] In some embodiments, for dynamically integrating newly published medical literature data, the present invention can use a medical entity recognition model to extract key information from the literature, such as keywords like drug names, indications, and adverse reactions.

[0109] Taking a newly published literature as an example, assume that it mentions "Drug X can effectively treat hypertension but may cause dizziness". The system will analyze the text through the medical entity recognition model and extract entities such as "Drug X", "hypertension", and "dizziness". Subsequently, the system uses a graph convolutional network (GCN) to update the knowledge graph.

[0110] Specifically, for the existing entity node "Drug X", its feature vector will be updated by adding information related to treating hypertension; for the newly discovered entity "dizziness", the system will create a new node and initialize an embedding vector for it according to the context. This update method enables the knowledge graph to absorb the latest research results in the literature in real time, ensuring that the medical information stored in it always remains timely and complete.

[0111] In some embodiments, in the implementation of the Markov discriminant structure, two branches are designed in the embodiments of the present invention to jointly evaluate the quality of the repaired data. The first branch uses a convolutional neural network (CNN) to analyze the consistency of the repaired data and the normal data in local features.

[0112] For example, for a repaired dosage value, the CNN will check whether it falls within a reasonable numerical range, such as determining whether the dosage of a certain drug conforms to the conventional range of 5 milligrams to 50 milligrams.

[0113] The second branch uses a graph neural network (GNN) to evaluate the global logical consistency of the repaired data with the medical knowledge graph, such as checking whether the repaired drug combination meets the indication requirements or whether there are situations violating contraindications, for example, whether a certain drug combination may cause adverse reactions. Finally, the system integrates the output results of these two branches through weighted summation into a discriminant result. The selection of the weights will be dynamically adjusted according to the training stage. For example, at the initial stage of training, the weight of local feature consistency may be set to 0.7, while the weight of global logical consistency is 0.3 to prioritize ensuring the basic rationality of the repaired data; as the training progresses, the weights may be adjusted to 0.4 and 0.6 to place more emphasis on the accuracy of medical logic. This dynamic adjustment mechanism ensures that the discriminator can be gradually optimized and finally generate high-quality evaluation results for the repaired data.

[0114] As Figure 4 shown, the present invention actually also discloses a post-processing device for medical management data, which realizes the identification, repair and optimization of abnormal data through the collaborative work of multiple modules, ensuring the accuracy and consistency of medical management data.

[0115] In the knowledge graph construction module, in the embodiments of the present invention, entities and relationships can be extracted from multi-source medical data. For example, drug names and contraindication information can be obtained from drug instructions, disease treatment plans can be extracted from clinical practice guidelines, and patient medication records can be mined from electronic medical records. These entities (such as the drug "aspirin") and relationships (such as "aspirin treats headache") are organized into a structured knowledge graph. To maintain the timeliness of the graph, in the embodiments of the present invention, graph neural networks can be used to dynamically update the graph content. For example, when a new literature reports that "drug X reduces the risk of diabetes", the graph neural network will use "drug X" and "diabetes" as nodes, add an edge labeled "reduces risk", and update the feature vectors of related nodes through calculation to ensure that the graph reflects the latest medical findings.

[0116] In the anomaly detection module, in the embodiments of the present invention, a pre-trained isolation forest model combined with time series feature analysis can also be used to identify data anomalies. The isolation forest model separates abnormal data from normal data by constructing multiple random decision trees, and is particularly suitable for processing high-dimensional data sets. To improve the detection accuracy, time series feature analysis can also be incorporated into it. By examining the time series of medication records, the rationality of the anomaly can be further confirmed.

[0117] The adversarial generation and repair module is responsible for generating repair candidate data. In the embodiments of the present invention, a design including a conditional CycleGAN generator and a Markov discriminator can be adopted. The conditional CycleGAN generator receives abnormal data, such as the above-mentioned 100 mg dose, and combines context information such as patient age and weight to generate a repair value (such as 15 mg). The embedding vectors of the knowledge graph are embedded inside the generator to ensure that the repair results conform to medical logic, such as avoiding generating drug combinations that are contraindicated for the patient's disease. The Markov discriminator evaluates the quality of the repair data through two branches. One branch checks whether the repair value is close to the normal data distribution, for example, whether 15 mg is within the normal range of 10-20 mg; the other branch verifies its consistency with the knowledge graph, for example, confirming that there is no interaction risk in the repaired drug combination. The outputs of these two branches are weighted and summed to generate the final evaluation result to ensure the reliability of the repair data.

[0118] The logical verification module further checks the repair data. In the embodiments of the present invention, it can detect contraindication conflicts and drug interaction conflicts in the medical knowledge graph by traversing it. For example, if the repair candidate data suggests that a patient uses two drugs simultaneously, the system will query in the graph whether there is an interaction path between the two. Suppose the graph shows that "drug A enhances the toxicity of drug B", the system will mark this repair plan as conflicting and calculate the conflict score. If the score is lower than a preset threshold (such as 5), the repair data passes the verification; otherwise, the generator is triggered to optimize again.

[0119] The manual intervention interface module generates a minimized confirmation interface based on the priority calculation result. In the embodiments of the present invention, the priority can be determined based on the risk level of the anomaly and the repair confidence. For example, a high-risk anomaly related to contraindications will be pushed with priority. The confirmation interface only displays the anomaly fields (such as "Dosage: 100 mg") and the recommended values (such as "15 mg"), and provides radio boxes for the user to select to accept or manually adjust. The user feedback data is then encrypted and transmitted to the backend.

[0120] The online learning module uses this feedback to optimize the entire device. In the embodiments of the present invention, the corrected data confirmed manually can be paired with the original output of the generator to form a contrastive learning sample. For example, when the dosage is manually adjusted to 20 mg, this data pair (15 mg, 20 mg) is used to adjust the parameters of the generator to make it tend to generate repair data closer to the manual result. At the same time, the dynamic relationship weights of the knowledge graph will also be updated. For example, the weight of the relationship between a certain drug and a disease is increased to reflect the actual medication experience.

[0121] Through the cooperation of the above modules, the embodiments of the present invention provide an efficient post-processing device for pharmaceutical management data, forming a complete closed-loop process from knowledge graph construction to anomaly repair, then to user feedback and online optimization.

[0122] As described above, it is only the preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and all should be covered by the protection scope of the present invention.

Claims

1. A post-processing method for medical management data, characterized in that: The steps include: Constructing a medical knowledge graph, wherein the medical knowledge graph includes drug entities, disease entities, patient entities, and contraindication relationships, indication relationships, and drug interaction relationships between entities; Identify abnormal data in the input medical data through a pre-trained anomaly detection model, wherein the abnormal data includes abnormal dosage, conflicting contraindications, or inconsistent drug batches and efficacy; Inputting the abnormal data into an adversarial sample generator to generate a repair candidate data set, wherein the network structure of the adversarial sample generator is embedded with vectorized constraints of a medical knowledge graph; Perform knowledge graph logic verification on the repair candidate data set, traverse the entities and relationship paths related to the repair data in the graph, and calculate the logical conflict score; If the logical conflict score is lower than the preset threshold, the repair data is output as the final result, otherwise the iterative optimization generator is triggered or a manual intervention request is pushed; According to the priority calculation rules of manual intervention requests, high-priority abnormal data is selected to generate a minimized manual confirmation interface, which only exposes abnormal fields and related correction suggestions; The manual confirmation results are fed back to the adversarial sample generator and the medical knowledge graph to update the weight parameters of the generator and the dynamic relationship weights in the graph.

2. The method according to claim 1, characterized in that: The construction of the medical knowledge graph includes: Extract entities and relationships from drug instruction databases, clinical diagnosis and treatment guidelines, and electronic medical record systems, and dynamically integrate newly released medical literature data through graph neural networks; The logical rules in the medical knowledge graph are converted into geometric constraints in the embedding space, including enforcing that the vector distance between contraindication-related entities is greater than a preset threshold, and dynamically adjusting the constraint weights through a graph attention network.

3. The method according to claim 1, characterized in that: The adversarial sample generator is implemented based on conditional CycleGAN, including: The generator adopts the U-Net structure and adds a residual connection module. The input layer receives abnormal data and corresponding patient context features; The middle layer of the generator injects the embedding vector of the medical knowledge graph through the cross-attention mechanism, and the output layer generates the repair candidate data; The discriminator adopts a Markov discriminant structure to evaluate the similarity between the repaired data and the normal data distribution and the consistency with the knowledge graph logic.

4. The method according to claim 1, characterized in that: The knowledge graph logic verification includes: Extract the drug names, disease names, and patient characteristics in the repair candidate data, and query whether there are contraindication pathways or drug interaction pathways in the graph; If there is a conflict path, the logical conflict score is calculated as the product of the path weight and the conflict severity, otherwise the score is zero; Generator re-optimization is triggered when the logical conflict score exceeds a dynamic threshold, which is automatically adjusted according to the anomaly density of the current dataset.

5. The method according to claim 1, characterized in that: The manual intervention priority calculation rules include: Obtaining a preset risk level from the medical knowledge graph according to the abnormality type, wherein the risk level includes high risk, medium risk and low risk; The repair confidence is calculated as the inverse of the graph logic loss value output by the generator, and the business impact weight is dynamically assigned; The risk level, repair confidence, and business impact weight are weighted and summed to generate a manual intervention urgency score.

6. The method according to claim 1, characterized in that: The minimized manual confirmation interface includes: Only the original values ​​of abnormal fields and the revised values ​​recommended by the generator are displayed, and non-relevant fields are hidden to protect patient privacy; A radio button is provided for the user to choose to accept the correction suggestion or manually enter a new value, and the user's selection result is encrypted and transmitted to the back-end system.

7. The method according to claim 1, characterized in that: The weight parameters of the update generator include: The manually confirmed corrected data and the generator's original output data form a comparative learning sample pair; By optimizing the parameters of the generator through the contrast loss function, the generator tends to output repair data that is consistent with the manual correction results.

8. The method according to claim 2, characterized in that: The dynamically integrated newly released medical literature data includes: Use the medical entity recognition model to extract drug names, indications, and adverse reaction keywords from the literature; The feature vectors of existing entity nodes are updated through the graph convolutional network, and nodes are created for new entities and the embedding vectors are initialized.

9. The method according to claim 3, characterized in that: The Markov discriminant structure includes: The first discriminator branch uses a convolutional neural network to determine the consistency of local features between the repaired data and the normal data; The second discriminator branch uses a graph neural network to judge the global logical consistency between the repair data and the medical knowledge graph; The outputs of the two branches are weighted and summed to generate the final discrimination result, and the weights are dynamically adjusted according to the current training stage.

10. A post-processing device for medical management data, characterized in that: include: A knowledge graph building module that extracts entities and relationships from multi-source medical data and dynamically updates the graph through a graph neural network; The anomaly detection module uses a pre-trained isolation forest model combined with time series feature analysis to identify data anomalies; The adversarial generation repair module includes a conditional CycleGAN generator and a Markov discriminator to generate repair candidate data that conforms to the knowledge graph logic; The logic verification module traverses the medical knowledge graph to detect and repair contraindication conflicts and drug interaction conflicts in the data; The manual intervention interface module generates a minimized confirmation interface based on the priority calculation results and receives user feedback data; The online learning module uses manual feedback data to update the generator parameters and the dynamic relationship weights of the knowledge graph.

Citation Information

Cited By

  • Electronic medical record intelligent quality control method and system based on medical knowledge graph

    CN121545652A