Medical knowledge base update method, system, terminal and storage medium

By constructing a triple-tube update of the medical knowledge base with differential and matching identity codes, the problems of data redundancy and low screening efficiency of diagnosis and treatment plans in the existing technology are solved, efficient update of the knowledge graph and accurate screening of diagnosis and treatment plans are achieved, and data quality and application efficiency of the medical knowledge base are improved.

CN119785950BActive Publication Date: 2025-08-05NORTH CHINA DIGITAL HEALTH TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510273990.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-08-05
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

The knowledge graph construction model of the existing medical knowledge base leads to data redundancy and inefficient screening of diagnosis and treatment plans, and cannot fully reflect the key characteristics of the diagnosis and treatment plans, such as treatment costs and cure effects.

Method used

By obtaining drug information in case data, including identity code and cost information, searching target data from the medical knowledge base based on the condition, building triples that differ and match identity codes, and updating the structure and attribute values of the knowledge graph, regularly reviewing and deleting invalid data.

Benefits of technology

It reduces the amount of knowledge graph update calculation, improves the screening efficiency and accuracy of diagnosis and treatment plans, can easily find appropriate diagnosis and treatment plans, simplifies data management, and improves the data quality and application trend characterization of the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785950B_ABST
    Figure CN119785950B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of knowledge graphs, and specifically provides a method, system, terminal, and storage medium for updating a medical knowledge base, including: obtaining case data, where the case data includes diseases and treatment plans; extracting drug information from the treatment plan, where the drug information includes identity codes and cost information; retrieving target data from a medical knowledge base according to the disease, where the target data includes drug entities related to the disease; matching the drug information with the target data, determining different identity codes and matching identity codes according to the matching results, and constructing multiple triples according to the different identity codes and the matching identity codes; updating the structure and attribute values of the knowledge graph of the medical knowledge base according to the multiple triples. The present invention can reduce redundant data in the knowledge base and improve the efficiency of discovering new treatment plans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and specifically to a medical knowledge base updating method, system, terminal and storage medium. Background Art

[0002] In the medical field, the application of knowledge graphs plays an important role in assisting doctors in formulating diagnosis and treatment plans. Currently, the knowledge graph construction model of some medical knowledge bases uses symptoms and treatment plans as nodes, and the relationship between the two as edges.

[0003] However, this model has significant flaws: First, due to the diversity and variability of treatment options, a single symptom often corresponds to a large number of treatment options, and these options often overlap, leading to redundant data storage and increasing the burden of data management. Second, this construction method fails to fully reflect the key characteristics of treatment options, such as treatment costs and cure rates. Consequently, even with a large number of treatment options, doctors struggle to directly select the optimal one. They must rely on their extensive clinical experience to identify and select from the numerous options, consuming considerable time and effort and, to a certain extent, impacting the efficiency and quality of diagnosis and treatment.

[0004] Treating the key elements of a treatment plan as entities and then constructing a knowledge graph can avoid redundant storage. However, this approach makes the knowledge graph structure more complex and makes subsequent data updates more difficult. Summary of the Invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a medical knowledge base updating method, system, terminal and storage medium to solve the above-mentioned technical problems.

[0006] In a first aspect, the present invention provides a method for updating a medical knowledge base, comprising:

[0007] Acquiring case data, including symptoms and treatment plans;

[0008] Extracting drug information from the diagnosis and treatment plan, the drug information including identification code and cost information;

[0009] Retrieving target data from a medical knowledge base according to the disease condition, wherein the target data includes a drug entity having a relationship with the disease condition;

[0010] Matching drug information with target data, determining a difference identity code and a matching identity code according to the matching result, and constructing multiple triples according to the difference identity code and the matching identity code;

[0011] Update the structure and attribute values of the knowledge graph of the medical knowledge base according to the plurality of triples;

[0012] The difference identity code does not have a matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

[0013] In an optional embodiment, obtaining case data, the case data including disease conditions and treatment plans, includes:

[0014] Obtaining the cure time and cure duration of each piece of case data;

[0015] Screening out the case data with the cure time after the previous medical knowledge base update time as sample data;

[0016] Generating corresponding duration identifiers for the sample data according to the cure duration of the sample data.

[0017] In an optional embodiment, extracting drug information from the treatment plan, the drug information including identity codes and cost information, includes:

[0018] Extracting drug names, manufacturers, batches, and cost information from the drug information;

[0019] Querying the identity code from a pre-constructed dictionary according to the drug name, manufacturer, and batch.

[0020] In an optional embodiment, retrieving target data from a medical knowledge base according to the disease condition, the target data including drug entities related to the disease condition, includes:

[0021] Determining the retrieval range according to the department type corresponding to the disease condition;

[0022] Constructing a query statement, the query statement including the disease condition and the retrieval range;

[0023] Obtaining target data from the medical knowledge base according to the query statement.

[0024] In an optional embodiment, matching the drug information with the target data, determining difference identity codes and matching identity codes according to the matching results, and constructing multiple triples according to the difference identity codes and the matching identity codes, includes:

[0025] Decoding the drug entities in the target data into corresponding drug identity codes;

[0026] Calculating the intersection of the drug information and the decoded target data;

[0027] Determining the identity codes belonging to the intersection in the drug information as matching identity codes;

[0028] Determine the identity codes that do not belong to the intersection in the drug information as differential identity codes;

[0029] Construct corresponding triples according to the pairwise combinations of the identity codes in the drug information, and add the duration identifier of the sample data to which the triples belong;

[0030] Mark the triples containing differential identity codes as differential triples;

[0031] Mark the triples that do not contain differential identity codes as matching triples;

[0032] Deduplicate all the triples and record the number of repetitions.

[0033] In an optional implementation manner, update the structure and attribute values of the knowledge graph of the medical knowledge base according to the multiple triples, including:

[0034] If a differential triple contains one differential identity code and one matching identity code, construct a new node corresponding to the differential identity code contained in the differential triple in the knowledge graph, construct an edge between the new node and the entity node corresponding to the matching identity code, and set the duration identifier of the differential triple as the duration attribute of the edge; set the number of repetitions of the differential triple as the reference attribute of the edge;

[0035] If a differential triple contains two differential identity codes, construct two new nodes corresponding to the two differential identity codes in the knowledge graph respectively, construct an edge between the two new nodes, and set the duration identifier of the differential triple as the duration attribute of the edge; set the number of repetitions of the differential triple as the reference attribute of the edge;

[0036] Query the two nodes and the edge corresponding to the matching triple from the knowledge graph. If the duration identifier of the matching triple is less than the duration attribute of the edge, then the duration identifier of the matching triple updates the duration attribute of the edge to the cure duration indicated by the duration identifier; update the sum of the original reference attribute of the edge and the number of repetitions of the matching triple to the new reference attribute of the edge.

[0037] In an optional implementation manner, the method further includes:

[0038] Regularly obtain the reference attribute of the edge of the knowledge graph;

[0039] If it is determined that the reference attribute of any edge drops to the preset reference count threshold, convert the edge and the two connected nodes into triple data, and generate an audit task according to the triple data;

[0040] Allocate the audit task to the expert audit terminal;

[0041] Receive the review result returned by the expert review terminal. If the review result is to retain, do not process the edges and nodes corresponding to the triple data; if the review result is to delete, delete the edges corresponding to the triple data.

[0042] Filter the isolated nodes in the knowledge graph, where the isolated nodes are nodes without connected edges.

[0043] Delete the isolated nodes in the knowledge graph.

[0044] In a second aspect, the present invention provides a medical knowledge base update system, including:

[0045] An acquisition module for acquiring case data, where the case data includes diseases and treatment plans.

[0046] A first processing module for extracting drug information from the treatment plan, where the drug information includes an identity code and cost information.

[0047] A retrieval module for retrieving target data from the medical knowledge base according to the disease, where the target data includes drug entities related to the disease.

[0048] A second processing module for matching the drug information with the target data, determining the different identity codes and matching identity codes according to the matching result, and constructing multiple triples according to the different identity codes and matching identity codes.

[0049] An update module for updating the structure and attribute values of the knowledge graph of the medical knowledge base according to the multiple triples.

[0050] The different identity codes do not have matching drug entities in the target data; the matching identity codes have matching drug entities in the target data.

[0051] In a third aspect, a terminal is provided, including:

[0052] A memory for storing a medical knowledge base update program.

[0053] A processor for implementing the steps of the medical knowledge base update method provided in the first aspect when executing the medical knowledge base update program.

[0054] In a fourth aspect, a computer-readable storage medium is provided, on which a medical knowledge base update program is stored. When the medical knowledge base update program is executed by a processor, the steps of the medical knowledge base update method provided in the first aspect are implemented.

[0055] The beneficial effects of the present invention are as follows. The medical knowledge base update method, system, terminal and storage medium provided by the present invention extract drug information from newly generated case data, and determine the different identity codes and matching identity codes in the drug information by matching the drug information with the target data related to the disease retrieved from the medical knowledge base. These different identity codes and matching identity codes are pairwise constructed into triples, and the triples are distinguished by differentiating the identity codes of the drugs. Furthermore, when updating the knowledge graph according to the triples, corresponding update means are used, without traversing the knowledge graph every time to find the nodes matching the different identity codes, reducing part of the computational amount. In addition, by updating the attribute values of the edges in the knowledge graph with the triples completely based on the matching identity codes, the knowledge graph can represent the application trends of treatment plans and the characteristics of different treatment plans, and in subsequent applications, suitable treatment plans can be easily found according to the attribute values.

[0056] In addition, the design principle of the present invention is reliable, the structure is simple, and it has a very wide application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0058] Figure 1 It is a schematic flowchart of the method of an embodiment of the present invention.

[0059] Figure 2 It is a schematic block diagram of the system of an embodiment of the present invention.

[0060] Figure 3 It is a schematic structural diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0061] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention pertains. The terms used in the description of the present invention herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention.

[0063] The following explains the key terms that appear in the present invention.

[0064] A knowledge base is a system for storing and managing knowledge, which can contain various types of knowledge, such as facts, rules, principles, experiences, etc. These knowledges are sorted, organized, and stored for easy retrieval, query, and utilization.

[0065] A knowledge graph is a semantic network that graphically shows the relationships between knowledge and knowledge. A knowledge graph consists of nodes and edges. Nodes represent entities (such as people, organizations, events, concepts, etc.), and edges represent the relationships between entities (such as parent-child relationships, causal relationships, association relationships, etc.). By constructing a knowledge graph, scattered knowledge can be connected to form an organic whole, thus better understanding and utilizing knowledge.

[0066] The data basis of the knowledge base can be a knowledge graph. In many cases, the knowledge graph can provide high-quality data support for the knowledge base, mainly reflected in the following aspects:

[0067] Rich data associations: The knowledge graph graphically shows the relationships between entities and contains rich semantic information. When the knowledge graph is used as the data basis of the knowledge base, the knowledge base can inherit these detailed association relationships. For example, in the medical field, the complex relationships between entities such as diseases, symptoms, treatment methods, and drugs in the knowledge graph can enable the medical knowledge base to more comprehensively present medical knowledge and provide richer reference information for doctors' diagnosis and treatment decisions.

[0068] Facilitating knowledge reasoning: The semantic network structure of the knowledge graph is conducive to knowledge reasoning. A knowledge base built based on the knowledge graph can utilize its reasoning ability to discover implicit knowledge. For example, in the financial field, through the reasoning and analysis of the relationships between entities such as enterprises, personnel, and transactions in the knowledge graph, the knowledge base can discover potential financial risks and fraud behavior patterns.

[0069] Improving data quality: In the process of constructing the knowledge graph, data needs to be strictly extracted, cleaned, and fused to ensure the accuracy, consistency, and integrity of the data. Such high-quality data as the basis of the knowledge base can enhance the reliability and practicality of the knowledge base. For example, in the e-commerce field, a product knowledge base based on the knowledge graph can accurately present product attributes, specifications, usage methods, etc. information and provide better services for users.

[0070] Support semantic retrieval: The semantic features of the knowledge graph enable the knowledge base based on it to support semantic retrieval. When users query the knowledge base, they can not only obtain information through keyword matching, but also acquire relevant knowledge based on semantic understanding. For example, in the academic field, when scientific researchers query the knowledge base, the semantic retrieval function based on the knowledge graph can help them find knowledge related to the research topic, rather than just documents that match keywords.

[0071] The medical knowledge base update method provided by the embodiments of the present invention is executed by a computer terminal. Correspondingly, the medical knowledge base update system runs in the computer terminal.

[0072] Figure 1 It is a schematic flowchart of the method of an embodiment of the present invention. Among them, Figure 1 The execution subject can be a medical knowledge base update system. According to different requirements, the order of the steps in this flowchart can be changed, and some can be omitted.

[0073] As Figure 1 shown, the method includes:

[0074] S1. Obtain case data, where the case data includes diseases and treatment plans.

[0075] Obtain case data from multiple reliable channels such as hospital information systems. These data contain key information such as diseases and corresponding treatment plans. This is the basic data source for subsequent work.

[0076] S2. Extract drug information from the treatment plan, where the drug information includes identity codes and cost information.

[0077] Deeply analyze the obtained treatment plan and extract the drug information therein, including the identity codes of drugs (used to uniquely identify drugs) and cost information. These information will provide important bases for subsequent comparison and update.

[0078] S3. Retrieve target data from the medical knowledge base according to the disease, where the target data includes drug entities related to the disease.

[0079] Retrieve in the existing medical knowledge base according to the disease in the case data, and obtain target data such as drug entities related to the disease. These target data are the existing knowledge manifestations in the knowledge base.

[0080] S4. Match the drug information with the target data, determine the different identity codes and matching identity codes according to the matching results, and construct multiple triples according to the different identity codes and matching identity codes.

[0081] Perform a detailed match between the extracted drug information and the retrieved target data. During this process, determine the differential identity codes (i.e., the codes of drug entities that do not have matching counterparts in the target data) and the matching identity codes (the codes of drug entities that have matching counterparts in the target data). Construct multiple triples based on these codes, with the form of (drug entity, relationship, attribute value), such as (a certain drug, cost, specific amount).

[0082] S5. Update the structure and attribute values of the knowledge graph of the medical knowledge base according to the multiple triples.

[0083] Utilize the constructed multiple triples to update the structure and attribute values of the knowledge graph of the medical knowledge base. For the drug entities corresponding to the differential identity codes, add them to the knowledge graph and supplement the relevant attributes; for the drug entities corresponding to the matching identity codes, update their attribute values according to the newly obtained information to ensure that the information in the knowledge graph is more accurate and complete.

[0084] In an embodiment of the present invention, based on step S1, the following will give an embodiment to non-restrictively elaborate on its specific implementation scheme.

[0085] S101. Obtain the cure time and cure duration of each case data.

[0086] First, clarify the acquisition channels of case data. Usually, it can be obtained from systems such as the hospital's electronic medical record system (EMR) and clinical data warehouse (CDR). These systems store detailed information of patients from the time of consultation to the end of treatment, including the cure time and time node data related to cure.

[0087] Since the data storage formats of different systems are different, it is necessary to parse the formats of the obtained data. For example, for case data stored in structured data (such as JSON, XML format) in the electronic medical record system, use the corresponding parsing tools (such as the json library and xml.etree.ElementTree library in Python) to extract the cure time field (usually stored in the date-time format, such as "YYYY-MM-DD HH:MM:SS"). For some semi-structured or unstructured data (such as medical record text), natural language processing (NLP) techniques, such as named entity recognition (NER) algorithms, need to be adopted to identify the key information representing the cure time in the text and convert it into a unified date-time format.

[0088] After obtaining the cure time, it is also necessary to obtain the onset time of the patient's illness (which can also be extracted from the medical record system). If the onset time of the illness is missing, it can be estimated based on relevant information such as the first visit time or the time of symptom onset. Then, by calculating the time difference between the cure time and the onset time of the illness, the cure duration is obtained. When calculating the time difference, it can be accurate to different time units such as hours, days, weeks, etc. according to specific requirements. For example, use the datetime module in Python for time calculation and convert the time difference into the corresponding duration value.

[0089] S102. Screen out the case data with the cure time after the previous medical knowledge base update time as the sample data.

[0090] In the medical knowledge base system, there are usually special records to save the time stamps of each update. Obtain the accurate time of the previous medical knowledge base update from the system's metadata management module or log file to ensure the accuracy and integrity of this time record.

[0091] Compare the cure time of each case data obtained in step S101 with the previous update time. A database query statement (such as an SQL statement) can be used to implement this screening operation. Set conditions in the WHERE clause to screen out the case data with the cure time greater than the previous update time. For example, in the MySQL database, the statement "SELECT * FROM case_data WHERE cure_time>' previous update time '" can be used to obtain the sample data that meets the conditions. If the data is stored in other data storage systems (such as NoSQL databases), the screening operation is carried out according to the query syntax of the corresponding system.

[0092] Verify and clean the screened sample data to ensure the data quality. Check whether there are missing values, outliers, etc. in the sample data. Eliminate the case data that lacks important information (such as keywords fields like cure time, disease symptoms, etc.), and further verify or correct the outliers (such as obviously unreasonable cure durations) to ensure the accuracy of subsequent analysis.

[0093] S103. Generate corresponding duration identifiers for the sample data according to the cure duration of the sample data.

[0094] According to the professional knowledge and actual needs in the medical field, determine reasonable cure duration intervals. For example, the cure duration can be divided into different intervals such as "short (0 - 7 days)", "medium (8 - 30 days)", "long (31 days and above)", etc. More detailed duration interval division criteria can also be set according to the characteristics of specific diseases.

[0095] For the cure duration of each sample data, match it with the set duration interval, and generate a corresponding duration identifier for the sample data according to the matching result. A conditional judgment statement (such as the if-elif-else statement in Python) can be used to implement this matching process. For example, if the cure duration of a sample data is 5 days, according to the above interval division, a duration identifier of "short" will be generated for it.

[0096] Associate and store the generated duration identifier with the corresponding sample data. A new field can be added to the original sample data record to store the duration identifier, or a new data table can be established to record the unique identifier of the sample data (such as the case number) and the corresponding duration identifier, so as to conveniently obtain and use the duration identifier information when analyzing and processing the sample data later.

[0097] In an embodiment of the present invention, based on step S2, the following will give an embodiment to non-restrictively elaborate on its specific implementation scheme.

[0098] S201. Extract the drug name, manufacturer, batch number, and cost information from the drug information.

[0099] The medication records in the electronic medical record are semi-structured or unstructured texts. Use natural language processing technology to extract the drug name from it, and then retrieve the drug information from the local database according to the drug name.

[0100] The database query method includes: using SQL query statements to extract the required fields. For example, in a MySQL database, if there is a table named medication_info containing fields such as prescription_id (prescription number), drug_name (drug name), manufacturer (manufacturer), batch_number (batch number), and cost (cost), the following query statement can be used:

[0101] SELECT drug_name, manufacturer, batch_number, cost FROM medication_info.

[0102] After extracting the data, it needs to be verified and cleaned. Check whether the fields are null values. For the cost field, ensure that it is of a valid numerical type; for the drug name, manufacturer, and batch number, remove the leading and trailing spaces, special characters, etc.

[0103] S202. Query the identity code from the pre-constructed dictionary according to the drug name, manufacturer, and batch number.

[0104] 1. Creation and storage of the pre-constructed dictionary.

[0105] Collect relevant information about the drugs, including drug names, manufacturers, batches, and corresponding identity codes. This information can be obtained from channels such as the databases of drug regulatory authorities and the information provided by drug manufacturers. Organize the collected data into a dictionary form, using the combination of drug name, manufacturer, and batch as the key, and the identity code as the value. The dictionary can be stored in memory, or serialized and stored in a file (such as a JSON file) or a database for subsequent use.

[0106] 2. Query process.

[0107] If the dictionary is stored in memory, the key can be directly used to query the identity code. If the dictionary is stored in a JSON file, the file needs to be read and loaded as a dictionary first, and then the query can be performed. If the dictionary is stored in a database, SQL query statements can be used to query the identity code based on the drug name, manufacturer, and batch. For example, in a MySQL database, if there is a table named drug_identity that contains fields such as drug_name, manufacturer, batch_number, and identity_code, the following query statement can be used:

[0108] SELECT identity_code FROM drug_identity WHERE drug_name = 'aspirin' AND manufacturer = 'XX Pharmaceutical Factory' AND batch_number = '20240101'.

[0109] 3. Exception handling.

[0110] During the query process, there may be cases where no matching items are found. At this time, corresponding exception handling needs to be carried out, such as logging, returning a default value, or prompting the user to manually supplement information, etc.

[0111] In an embodiment of the present invention, based on step S3, the following will give an embodiment to non-restrictively elaborate on its specific implementation scheme.

[0112] S301. Determine the retrieval range according to the department type corresponding to the disease.

[0113] First, a mapping table between diseases and department types needs to be constructed, which can be created based on medical expertise, clinical practice experience, and the hospital's department settings. For example, upper respiratory diseases such as colds and influenza usually correspond to the Department of Respiratory Medicine; diseases such as fractures and joint injuries correspond to the Department of Orthopedics. These mapping relationships can be stored in a database table, and the table structure can include two fields: disease (disease name) and department (department type).

[0114] To ensure the accuracy and integrity of the mapping relationships, authoritative medical guidelines, clinical practice guidelines and other materials can also be referred to, and medical experts can be invited to review and revise them.

[0115] When specific disease information is received, the disease needs to be accurately identified. If the disease information is in text form, natural language processing (NLP) techniques such as word segmentation, part-of-speech tagging, and named entity recognition are required to extract the key disease name. For example, for the text "The patient has acute gastroenteritis with symptoms of abdominal pain and diarrhea", the disease can be identified as "acute gastroenteritis" through NLP techniques.

[0116] Then, according to the identified disease name, query in the disease-department mapping table to find the corresponding department type.

[0117] Based on the matched department type, further determine the retrieval scope in the medical knowledge base. Different departments correspond to different knowledge subsets. For example, the retrieval scope of the Department of Respiratory Medicine includes knowledge about the diagnosis, treatment, and medication of respiratory system diseases; the retrieval scope of the Department of Orthopedics involves knowledge about diseases of the musculoskeletal system, surgical methods, and rehabilitation programs.

[0118] Corresponding indexes or tags can be set for each department type in the medical knowledge base to quickly locate the relevant knowledge areas. For example, in the knowledge graph, add tags of department types to each node and edge. When the department type is determined, nodes and edges with the tags of this department type can be filtered out as the retrieval scope.

[0119] S302. Construct a query statement, which includes the disease and the retrieval scope.

[0120] Since the medical knowledge base is based on the knowledge graph, a language suitable for querying the knowledge graph is usually selected, such as SPARQL (SPARQL Protocol and RDF Query Language). SPARQL is a standard language for querying RDF (Resource Description Framework) data and can effectively query and operate on nodes and relationships in the knowledge graph.

[0121] Combine the identified disease and retrieval scope to construct a SPARQL query statement. The basic structure of the query statement usually includes a SELECT clause, a WHERE clause, etc. For example, assume that you want to query drugs related to the disease of "acute gastroenteritis" and the retrieval scope is the knowledge area of the Department of Gastroenterology. The SPARQL query statement is as follows:

[0122] PREFIX rdf:<http: / / www.w3.org / 1999 / 02 / 22-rdf-syntax-ns#> PREFIX medical:<http: / / example.org / medical#> SELECT ?drug WHERE { ?disease rdf:type medical:Disease ; medical:name "acute gastroenteritis" ; medical:relatedToDepartment medical:GastroenterologyDepartment. ?treatment medical:treats ?disease ; medical:usesDrug ?drug. ?drug rdf:type medical:Drug.}。

[0123] In the above query statement, PREFIX defines the namespace, the SELECT clause specifies the result to be queried (here it is the drug), and the WHERE clause describes the query conditions, including the disease name, the department to which it belongs, and the relationship between the disease and the drug.

[0124] S303. Obtain target data from the medical knowledge base according to the query statement.

[0125] Send the constructed query statement to a knowledge graph management system (such as Jena Fuseki, GraphDB, etc.) for execution. These systems provide functions for storing, querying, and managing knowledge graph data.

[0126] After receiving the query statement, the knowledge graph management system will perform matching and searching in the knowledge graph according to the conditions in the query statement. For example, according to the above SPARQL query statement, the system will search for disease nodes with the name of "acute gastroenteritis" and belonging to the Department of Gastroenterology in the knowledge graph, and then find the relevant drug nodes through the relationships between the disease and the treatment, and the treatment and the drug.

[0127] After the knowledge graph management system executes the query, it will return the query result. The result is usually presented in the form of a table or RDF triples.

[0128] Process the returned results, for example, remove duplicate items, perform data format conversion, etc. Then return the processed results to the user so that the user can obtain target data such as drugs related to the disease. For example, return the query results to the front-end application in JSON format for doctors or patients to view.

[0129] Accurately determine the retrieval scope according to the department type corresponding to the disease, construct an effective query statement, and obtain the required target data from the medical knowledge base based on the knowledge graph as the data foundation. This local retrieval method reduces the computational amount of retrieval by narrowing the retrieval scope.

[0130] In an embodiment of the present invention, based on step S4, an embodiment will be given below to non-restrictively elaborate on its specific implementation scheme.

[0131] S401. Decode the drug entities in the target data into corresponding drug identity codes.

[0132] First, clarify the mapping rules between drug entities and identity codes based on a predefined dictionary or database table. This mapping relationship can be established in the early data preparation stage. For example, by collecting the correspondence between the detailed information of drugs (such as name, manufacturer, specification, etc.) and unique identity codes. It can be stored in a data with a key-value pair structure, such as a dictionary in Python, where the key is the feature combination of the drug entity and the value is the corresponding identity code.

[0133] Traverse each drug entity in the target data and convert it into the corresponding identity code according to the above mapping rules. During the decoding process, it may be encountered that the drug entity in the target data does not exist in the mapping relationship. At this time, exception handling needs to be carried out, such as recording logs, prompting possible data missing or inconsistent problems, and at the same time, it can be selected to skip the drug entity or use the default code.

[0134] S402. Calculate the intersection of the drug information and the decoded target data.

[0135] The decoded target data and the drug information have a unified data format, generally in the form of a set or a list type, which is convenient for calculating the intersection.

[0136] Use the set operation method provided by the programming language to calculate the intersection. For example, in Python, the intersection method of the set type can be used.

[0137] S403. Determine the identity codes belonging to the intersection in the drug information as matching identity codes.

[0138] Traverse the identity codes in the drug information and check if each code exists in the intersection. If it exists, it is determined as a matching identity code. This can be achieved using loop and conditional judgment statements. The following is a Python example:

[0139] matching_codes = [] for code in drug_info_codes: if code inintersection: matching_codes.append(code).

[0140] S404. Determine the identity codes in the drug information that do not belong to the intersection as different identity codes.

[0141] Similarly, traverse the identity codes in the drug information and check if each code is not in the intersection. If not, it is determined as a different identity code.

[0142] S405. Construct corresponding triples based on the pairwise combinations of the identity codes in the drug information, and add the duration label of the sample data to which the triples belong.

[0143] Use nested loops or combination generation functions to generate pairwise combinations of the identity codes in the drug information. For example, in Python, the itertools.combinations function can be used:

[0144] import itertools # Assume the duration label duration_label = "short" triples = []for code_pair in itertools.combinations(drug_info_codes, 2): triple = (code_pair[0], "associated with", code_pair[1], duration_label) triples.append(triple).

[0145] A triple usually consists of two entities (here the drug identity codes) and the relationship between them, and the duration label of the sample data to which it belongs is also added. The relationship can be defined according to specific business requirements. For example, "associated with" means that the two drugs have a certain association in the same sample data.

[0146] S406. Mark the triples containing different identity codes as different triples.

[0147] Traverse all the generated triples and check whether each triple contains a differential identity code. If it does, mark this triple as a differential triple. This can be achieved by adding a flag field to the triple data structure.

[0148] S407. Mark the triples that do not contain the differential identity code as matching triples.

[0149] Similarly, traverse all the generated triples and check whether each triple does not contain the differential identity code. If it does not, mark this triple as a matching triple.

[0150] S408. Remove duplicates from all triples and record the number of repetitions.

[0151] Use a set or a dictionary to remove duplicates. If using a dictionary, the triple can be used as the key and the number of repetitions as the value.

[0152] In an embodiment of the present invention, based on step S5, the following will give an embodiment to non - restrictively elaborate on its specific implementation.

[0153] S501. If a differential triple contains one differential identity code and one matching identity code, then construct a new node corresponding to the differential identity code contained in the differential triple in the knowledge graph, and construct an edge between the new node and the entity node corresponding to the matching identity code. Set the duration identifier of the differential triple as the duration attribute of the edge; set the number of repetitions of the differential triple as the reference attribute of the edge.

[0154] First, traverse all the differential triples and screen out the triples that contain one differential identity code and one matching identity code. This can be completed by parsing the data structure of the triples (for example, the tuple containing the identity code and the flag constructed in the previous steps) and checking the cases where the identity codes belong to the differential identity code set and the matching identity code set.

[0155] For each triple screened out, determine the differential identity code contained therein. Use the API or command provided by the knowledge graph management system to create a new node corresponding to this differential identity code. The attributes of the node can be set according to actual needs, for example, using the identity code as the unique identifier attribute of the node.

[0156] Find the entity node corresponding to the matching identity code, which can be achieved by querying in the knowledge graph according to the identity code attribute. Then, construct an edge between the new node and the entity node corresponding to the matching identity code. The type of the edge can be defined as "association".

[0157] Extract the duration identifier and repetition count from the difference triple, set the duration identifier as the duration property of the edge, and set the repetition count as the reference property of the edge. For example:

[0158] # The used knowledge graph management system provides the set_edge_property function for triple insingle_diff_triples: code1, _, code2, duration_label, _, repetition_count =triple diff_code = code1 if code1 in difference_codes else code2 match_code =code2 if code1 in difference_codes else code1 new_node = create_node({"id":diff_code}) match_node = find_node_by_id(match_code) edge = create_edge(new_node, match_node, "association") set_edge_property(edge, "Duration", duration_label)set_edge_property(edge, "Reference Count", repetition_count).

[0159] S502. If the difference triple contains two different identity codes, construct two new nodes corresponding to the two different identity codes in the knowledge graph respectively, construct an edge between the two new nodes, and set the duration identifier of the difference triple as the duration property of the edge; set the repetition count of the difference triple as the reference property of the edge.

[0160] Traverse all difference triples and filter out the triples that contain two different identity codes. The filtering is also completed by parsing the data structure of the triples and checking whether both of the two identity codes belong to the set of different identity codes.

[0161] For each triple filtered out, determine the two different identity codes in it respectively, and use the API or command of the knowledge graph management system to create new nodes corresponding to the two different identity codes.

[0162] Construct an edge between the two new nodes, and the type of the edge is defined as "association".

[0163] Extract the duration identifier and the number of repetitions from the differential triple, set the duration identifier as the duration attribute of the edge, and set the number of repetitions as the reference attribute of the edge.

[0164] S503. Query the two nodes and the edge corresponding to the matching triple from the knowledge graph. If the duration identifier of the matching triple is less than the duration attribute of the edge, then update the duration attribute of the edge to the cure duration indicated by the duration identifier of the matching triple; update the sum of the original reference attribute of the edge and the number of repetitions of this matching triple to the new reference attribute of the edge.

[0165] Traverse all matching triples. For each triple, query the corresponding two nodes and the edge between them from the knowledge graph according to the two identity codes therein. The query function provided by the knowledge graph management system can be used for querying through the identity code attribute of the node.

[0166] Extract the duration identifier from the matching triple, obtain the original duration attribute from the edge, and compare them. If the duration identifier of the matching triple is less than the duration attribute of the edge, then update the duration attribute of the edge to the duration identifier of the matching triple. Specifically, use the function compare_duration to compare the durations, and use the function set_edge_property to set the properties of the edge.

[0167] Extract the number of repetitions from the matching triple, obtain the original reference attribute from the edge, add them to get the value of the new reference attribute, and update the reference attribute of the edge.

[0168] S504. Similarly, construct all the drug identity codes included in the drug information and the corresponding diseases into disease-drug triples, and use the disease-drug triples to update the edges and the reference attributes of the edges of the corresponding nodes in the knowledge graph. That is, if there is no edge between the drug node and the disease node corresponding to the disease-drug triple, then generate an edge, and set the time attribute and the reference attribute to the initial values, that is, the number of repetitions and the latest time of this disease-drug triple; if there is an edge between the drug node and the disease node corresponding to the disease-drug triple, then only update the attributes of the edge, and the update method is the same as in steps 501 - 503.

[0169] On the basis of the above embodiments, in order to further reduce the data redundancy of the knowledge base, as an implementable way, add step S6 for deleting invalid data. Specifically, it includes the following steps:

[0170] S601. Regularly obtain the reference attributes of the edges of the knowledge graph.

[0171] Use a mature scheduled task framework, such as the APScheduler library in Python or the Quartz framework in Java, to build a task for regularly obtaining reference attributes. Set the time interval for task execution reasonably according to business requirements and the update frequency of the knowledge graph data. It can be set to execute once a month.

[0172] If the knowledge graph is stored based on RDF, the SPARQL language can be used for querying. Parse and store the query results for subsequent steps. The results can be stored in a database table or a data structure (such as a Python list or dictionary).

[0173] S602. When it is determined that the reference attribute of any side drops to the preset reference count threshold, convert the side and the two connected nodes into triple data, and generate an audit task according to the triple data.

[0174] According to the usage scenario and data characteristics of the knowledge graph, jointly determine the reference count threshold by business experts and data analysts. For example, in a medical knowledge graph, if the reference count of an edge is very low, it may mean that the relevance of the knowledge is relatively low, and the threshold can be set to the minimum value of the currently obtained reference attributes, or the sum of the minimum value and a fixed parameter.

[0175] Traverse the obtained reference attribute data of the edges and find the edges whose reference attribute values are lower than the preset threshold.

[0176] For the filtered edges, obtain the information of the two connected nodes from the knowledge graph, and convert the edge and node information into triple data. The form of the triple can be (node 1, edge type, node 2). Here, get_node_info and get_edge_type are functions to obtain node information and edge type.

[0177] Generate an audit task for each triple data. The audit task should include information such as triple data, audit task ID, task description, etc.

[0178] S603. Dispatch the audit task to the expert audit terminal.

[0179] Develop an interface with the expert audit terminal to ensure that the audit task data can be sent to the terminal accurately and without error. RESTful API can be used for data transmission. Allocate the audit tasks reasonably according to factors such as the expert's professional field and workload. Rule engines or machine learning algorithms can be used to achieve intelligent distribution.

[0180] S604. Receive the review result returned by the expert review terminal. If the review result is to retain, do not process the edges and nodes corresponding to the triple data; if the review result is to delete, delete the edges corresponding to the triple data.

[0181] Develop an interface to receive the result returned by the expert review terminal, parse the returned JSON data, and extract the review task ID and review result.

[0182] If the review result is to retain, do nothing and continue to retain the edges and nodes corresponding to the triple data in the knowledge graph.

[0183] If the review result is to delete, use the API provided by the knowledge graph management system to delete the edge. For example, in an RDF-based knowledge graph, the DELETE statement of SPARQL can be used to delete the edge.

[0184] S605. Filter the isolated nodes in the knowledge graph. The isolated nodes are the nodes without connected edges.

[0185] Use the traversal interface provided by the knowledge graph management system to traverse all the nodes in the knowledge graph. For each node, check whether there are connected edges. For a large-scale knowledge graph, the traversal efficiency can be improved by adopting the method of block traversal or index optimization.

[0186] S606. Delete the isolated nodes in the knowledge graph.

[0187] Call the API provided by the knowledge graph management system to delete the nodes to delete the isolated nodes filtered out from the knowledge graph. For example, in the graph database Neo4j, the Cypher statement can be used to delete the nodes.

[0188] After deleting the nodes, it is necessary to ensure the data consistency of the knowledge graph to avoid the situation of data residue or incorrect reference. Data verification and cleaning operations can be performed after deleting the nodes.

[0189] Since the reference attribute of the edge indicates the number of times the corresponding data is referenced, when the reference times are too few, it means that the element is not frequently used. Send these infrequently used data to the expert review terminal for manual review of its value. If it is determined that it has no value, delete the corresponding edge. When a node has no connected edges, it means that it has not been referenced for a long time and the corresponding drug has been deprecated, and it can be directly deleted.

[0190] In a specific update scenario, the update method includes the following steps:

[0191] 1. Case data preprocessing

[0192] 1.1 The data acquisition unit regularly collects case data from the electronic medical record system and extracts the cure timestamp and cure duration value of each record. 1.2 The time screening unit takes the previous knowledge base update time T as the benchmark, screens the cases with the cure time after T as valid samples, and establishes a sample data set. 1.3 The identification generation unit generates a duration identification for each sample, and the duration identification contains cure duration classification information (such as: short term ≤ 7 days, medium term 8 - 14 days, long term ≥ 15 days).

[0193] 2. Drug information standardization

[0194] 2.1 The information extraction engine analyzes the drug instruction manual and supply chain data, and extracts four-dimensional features of drug name, manufacturer, production batch, and cost parameters. 2.2 The coding mapper calls the pre-built drug feature dictionary to map the combination of (name + manufacturer + batch) to a unique identity code CID, forming a standard drug information set.

[0195] 3. Target data retrieval 3.1 The department classifier determines the associated departments (such as the Department of Respiratory Medicine, the Department of Cardiovascular Medicine) according to the ICD-10 code of the current disease, and delimits the knowledge base retrieval scope. 3.2 The query constructor generates a structured retrieval statement, which includes disease keywords, department limitation conditions, and time range parameters. 3.3 The knowledge base interface executes the retrieval operation and returns a set of target data that meets the conditions, including drug entities and their treatment association information.

[0196] 4. Data matching and graph construction (corresponding to steps S4 - S5) 4.1 The decoding comparison unit reversely analyzes the drug entities in the target data into CIDs, and calculates the intersection CID_common and the difference CID_diff with the current drug information set. 4.2 The triple generator performs the following operations:

[0197] Generate basic triples of <CID_A, association relationship, CID_B> by combining drugs in CID_common pairwise;

[0198] Generate difference triples for combinations involving CID_diff, and mark the type (single difference / double difference);

[0199] Attach the duration identification of the sample source and the duplicate count to all triples. 4.3 The graph update engine dynamically operates the knowledge graph:

[0200] Single difference triples: Create a new CID_diff node and establish an edge with the existing node, and the edge attribute records the shortest duration identification and the reference count;

[0201] Double difference triples: Create a new double node and the associated edge, and set the attributes as above;

[0202] Basic triple: If the length of an existing edge is longer than the new identifier, update it to a shorter value and increment the reference count.

[0203] 5. Knowledge graph optimization module (corresponding to step S6) 5.1 The redundancy detector periodically scans the edge reference attributes. For edges with a reference count lower than the threshold K (e.g., 5 times) for N consecutive periods (e.g., 3 months), generate <CID_X, relationship, CID_Y> triples to be reviewed. 5.2 The task dispatcher pushes the triples to be reviewed to the expert terminal, attaching reference data such as associated drug instructions and clinical guidelines. 5.3 The response processor performs operations based on the expert feedback:

[0204] Retention instruction: Reset the edge reference count to the initial value;

[0205] Deletion instruction: Remove the target edge and check the connectivity of the associated nodes.

[0206] 5.4 The isolated node cleaner periodically traverses the graph, deletes free nodes without connected edges, and releases storage resources.

[0207] In this embodiment, through the dynamic triple generation mechanism, the real-time evolution of the medical knowledge graph is achieved. In particular, the timeliness optimization of the treatment plan is ensured through the competitive update mechanism of the duration identifier. The redundancy cleaning mechanism with expert collaboration is introduced to reduce the risk of misdeletion while maintaining the freshness of knowledge. After testing, the system reduces the redundant data in the knowledge base by 62% and improves the discovery efficiency of new treatment plans by 41%.

[0208] In some embodiments, the medical knowledge base update system may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the medical knowledge base update system can be stored in the memory of the computer terminal and executed by at least one processor to perform (see Figure 1 description) the functions of updating the medical knowledge base.

[0209] In this embodiment, according to the functions it performs, the medical knowledge base update system can be divided into multiple functional modules, such as Figure 2 shown. The functional modules of the system may include: an acquisition module, a first processing module, a retrieval module, a second processing module, and an update module. The modules referred to in the present invention refer to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0210] The acquisition module is used to acquire case data, and the case data includes diseases and treatment plans;

[0211] The first processing module is used to extract drug information from the diagnosis and treatment plan, and the drug information includes an identity code and cost information;

[0212] The retrieval module is used to retrieve target data from the medical knowledge base according to the disease, and the target data includes drug entities related to the disease;

[0213] The second processing module is used to match the drug information with the target data, determine the different identity codes and matching identity codes according to the matching results, and construct multiple triples according to the different identity codes and matching identity codes;

[0214] The update module is used to update the structure and attribute values of the knowledge graph of the medical knowledge base according to the multiple triples;

[0215] The different identity code does not have a matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

[0216] Figure 3 The method for updating the medical knowledge base provided by the embodiments of the present application can be applied to a terminal. Those skilled in the art can understand that the terminal structure involved in the embodiments of the present invention does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the terminal includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The terminal may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable terminal, and other similar computing devices. The components shown in the figure, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the embodiments of the present application described and / or claimed herein.

[0217] Among them, the terminal 300 may include: a processor 310, a memory 320, and a communication unit 330. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the present invention. It can be a bus structure, a star structure, and may also include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0218] Among them, the memory 320 can be used to store the execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can execute some or all of the steps in the above method embodiments.

[0219] The processor 310 is the control center of the storage terminal, connecting various parts of the entire electronic terminal through various interfaces and lines. By running or executing the software programs and / or modules stored in the memory 320, and by invoking the data stored in the memory, it executes various functions of the electronic terminal and / or processes data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions connected together. For example, the processor 310 can only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single arithmetic core or can include multiple arithmetic cores.

[0220] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals. It receives user data sent by other terminals or sends user data to other terminals.

[0221] The present invention also provides a computer storage medium. Among them, the computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the embodiments provided by the present invention. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0222] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present invention, 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 is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disc, etc., various media that can store program codes, including several instructions for causing a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0223] For the same or similar parts among the various embodiments in this specification, reference can be made to each other. In particular, for the terminal embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the descriptions in the method embodiments.

[0224] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the system or module can be in an electrical, mechanical or other form.

[0225] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place, or they can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0226] In addition, in each embodiment of the present invention, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.

[0227] Although the present invention has been described in detail by reference to the accompanying drawings and in conjunction with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention / Any person skilled in the art within the technical scope disclosed by the present invention can easily conceive of changes or substitutions, and they should all be covered within the protection scope of the present invention.

Claims

1. A method for updating a medical knowledge base, characterized in that: include: Acquiring case data, the case data including symptoms and treatment plans; specifically, obtaining the cure time and cure duration of each case data; screening case data with a cure time after the last medical knowledge base update time as sample data; and generating a corresponding duration identifier for the sample data based on the cure duration of the sample data; Extracting drug information from the diagnosis and treatment plan, the drug information including identification code and cost information; Retrieving target data from a medical knowledge base according to the disease condition, wherein the target data includes a drug entity having a relationship with the disease condition; Matching drug information with target data, determining a difference identity code and a matching identity code according to the matching result, and constructing multiple triples according to the difference identity code and the matching identity code; Update the structure and attribute values of the knowledge graph of the medical knowledge base according to the plurality of triples; The difference identity code does not have a matching drug entity in the target data; the matching identity code does have a matching drug entity in the target data; Multiple triples are constructed based on the difference identity coding and the matching identity coding, including: Construct corresponding triples based on the pairwise combination of the identity codes in the drug information, and add the duration identifier of the sample data to the triples; The triples containing differential identity encodings are labeled as differential triples; Mark the triples that do not contain differential identity encoding as matching triples; De-duplicate all triples and record the number of repetitions; Updating the structure and attribute values of the knowledge graph of the medical knowledge base according to the plurality of triples includes: Constructing all drug identity codes and corresponding symptoms contained in the drug information into disease-drug triples, and using the disease-drug triples to update the edges and reference attributes of the corresponding nodes in the knowledge graph; If the difference triple contains a difference identity code and a matching identity code, a new node corresponding to the difference identity code contained in the difference triple is constructed in the knowledge graph according to the difference triple, and an edge is constructed between the new node and the entity node corresponding to the matching identity code, and the duration identifier of the difference triple is set as the duration attribute of the edge; the number of repetitions of the difference triple is set as the reference attribute of the edge; If the difference triple contains two difference identity codes, two new nodes corresponding to the two difference identity codes are constructed in the knowledge graph, and an edge is constructed between the two new nodes. The duration identifier of the difference triple is set as the duration attribute of the edge; the number of repetitions of the difference triple is set as the reference attribute of the edge; Query the two nodes and edges corresponding to the matching triplet from the knowledge graph, and confirm that the duration identifier of the matching triplet is less than the duration attribute of the edge. Then, the duration identifier of the matching triplet will update the duration attribute of the edge to the healing duration indicated by the duration identifier; update the sum of the original reference attribute of the edge and the number of repetitions of the matching triplet to the new reference attribute of the edge.

2. The method according to claim 1, characterized in that Extracting drug information from the diagnosis and treatment plan, the drug information including identification code and cost information, including: Extract drug name, manufacturer, batch and cost information from drug information; Look up the identity code from a pre-built dictionary based on the drug name, manufacturer, and batch.

3. The method according to claim 1, characterized in that Retrieving target data from a medical knowledge base according to the disease condition, wherein the target data includes a drug entity having a relationship with the disease condition, including: Determine the search scope based on the department type corresponding to the disease; Constructing a query statement, wherein the query statement includes the disease and a search scope; Target data is acquired from a medical knowledge base according to the query statement.

4. The method according to claim 1, wherein Match the drug information with the target data and determine the difference identity code and the matching identity code based on the matching results, including: Decoding the drug entity in the target data into a corresponding drug identity code; Calculate the intersection of drug information and decoded target data; Determining the identity code in the drug information that belongs to the intersection as a matching identity code; The identity codes in the drug information that do not belong to the intersection are determined as different identity codes.

5. The method according to claim 1, wherein The method further comprises: Regularly obtain the reference attributes of the edges of the knowledge graph; If it is determined that the reference attribute of any edge has dropped to a preset reference count threshold, the edge and the two connected nodes are converted into triple data, and an audit task is generated based on the triple data; Distributing the audit task to the expert audit terminal; Receive the review result returned by the expert review terminal. If the review result is to retain, do not process the edges and nodes corresponding to the triple data; if the review result is to delete, delete the edges corresponding to the triple data; Filter out isolated nodes in the knowledge graph, where the isolated nodes are nodes without connected edges; Deleting isolated nodes in the knowledge graph.

6. A medical knowledge base updating system, characterized in that: include: An acquisition module is used to acquire case data, including symptoms and treatment plans. Specifically, the module includes: acquiring the cure time and cure duration of each case data; selecting case data with a cure time after the last medical knowledge base update time as sample data; and generating a corresponding duration identifier for the sample data based on the cure duration of the sample data. A first processing module is used to extract drug information from the diagnosis and treatment plan, wherein the drug information includes an identification code and cost information; a retrieval module, configured to retrieve target data from a medical knowledge base according to the disease, wherein the target data includes a drug entity having a relationship with the disease; A second processing module is used to match the drug information with the target data, determine the difference identity code and the matching identity code according to the matching result, and construct multiple triples according to the difference identity code and the matching identity code; An updating module, configured to update the structure and attribute values of the knowledge graph of the medical knowledge base according to the plurality of triples; The difference identity code does not have a matching drug entity in the target data; the matching identity code does have a matching drug entity in the target data; Multiple triples are constructed based on the difference identity coding and the matching identity coding, including: Construct corresponding triples based on the pairwise combination of the identity codes in the drug information, and add the duration identifier of the sample data to the triples; The triples containing differential identity encodings are labeled as differential triples; Mark the triples that do not contain differential identity encoding as matching triples; De-duplicate all triples and record the number of repetitions; Updating the structure and attribute values of the knowledge graph of the medical knowledge base according to the plurality of triples includes: Constructing all drug identity codes and corresponding symptoms contained in the drug information into disease-drug triples, and using the disease-drug triples to update the edges and reference attributes of the corresponding nodes in the knowledge graph; If the difference triple contains a difference identity code and a matching identity code, a new node corresponding to the difference identity code contained in the difference triple is constructed in the knowledge graph according to the difference triple, and an edge is constructed between the new node and the entity node corresponding to the matching identity code, and the duration identifier of the difference triple is set as the duration attribute of the edge; the number of repetitions of the difference triple is set as the reference attribute of the edge; If the difference triple contains two difference identity codes, two new nodes corresponding to the two difference identity codes are constructed in the knowledge graph, and an edge is constructed between the two new nodes. The duration identifier of the difference triple is set as the duration attribute of the edge; the number of repetitions of the difference triple is set as the reference attribute of the edge; Query the two nodes and edges corresponding to the matching triplet from the knowledge graph, and confirm that the duration identifier of the matching triplet is less than the duration attribute of the edge. Then, the duration identifier of the matching triplet will update the duration attribute of the edge to the healing duration indicated by the duration identifier; update the sum of the original reference attribute of the edge and the number of repetitions of the matching triplet to the new reference attribute of the edge.

7. A terminal, characterized in that: include: a memory for storing a medical knowledge base update program; A processor, configured to implement the steps of the medical knowledge base updating method according to any one of claims 1 to 5 when executing the medical knowledge base updating program.

8. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a medical knowledge base update program, which, when executed by a processor, implements the steps of the medical knowledge base update method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Medical data processing method and device, computer equipment and storage medium

    CN112151141A