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

By constructing and updating triples in the medical knowledge base, the problem that the knowledge graph in the existing technology cannot effectively reflect the key characteristics of the diagnosis and treatment plan is solved, and more efficient diagnosis and treatment plan screening and knowledge graph update are achieved.

CN119785950AActive Publication Date: 2025-04-08NORTH CHINA DIGITAL HEALTH TECHNOLOGY CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The knowledge graph construction model of the existing medical knowledge base cannot effectively reflect the key characteristics of the diagnosis and treatment plan, such as treatment costs and cure effects, making it difficult for doctors to directly screen out the optimal diagnosis and treatment plan, which increases the consumption of diagnosis and treatment time and energy.

Method used

By obtaining case data, extracting drug information in the diagnosis and treatment plan, including identity code and cost information, and matching with the target data related to the disease in the medical knowledge base, a triple of different identity codes and matching identity codes is constructed, and the structure and attribute values ​​of the knowledge graph are updated.

Benefits of technology

It reduces the amount of calculations when the knowledge graph is updated, improves the ability to characterize the trends and characteristics of the application of knowledge graphs to diagnosis and treatment plans, and enables doctors to find appropriate diagnosis and treatment plans more easily.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785950A_ABST
    Figure CN119785950A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of knowledge maps, and particularly provides a medical knowledge base updating method and system, a terminal and a storage medium, and the method comprises the steps: obtaining case data which comprises diseases and diagnosis and treatment plans; extracting medicine information from the diagnosis and treatment scheme, wherein the medicine information comprises an identity code and cost information; retrieving target data from a medical knowledge base according to the disease, wherein the target data comprises a drug entity having a relationship with the disease; matching the medicine information with the target data, determining a difference identity code and a matching identity code according to a matching result, and constructing a plurality of triads according to the difference identity code and the matching identity code; and updating the structure and the attribute value of the knowledge graph of the medical knowledge base according to the plurality of triples. Redundant data of the knowledge base can be reduced, and the new treatment scheme discovery efficiency is improved.
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 auxiliary role in helping doctors formulate diagnosis and treatment plans. At present, 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: on the one hand, due to the diversity and variability of diagnosis and treatment plans, one disease often corresponds to a large number of diagnosis and treatment plans, and there are certain duplications between these diagnosis and treatment plans, which leads to redundant data storage problems and increases the burden of data management; on the other hand, this construction method cannot fully reflect the key characteristics of the diagnosis and treatment plans, such as treatment costs, cure effects, etc. This results in that even if doctors obtain a large number of diagnosis and treatment plans, it is difficult to directly select the best plan from them. They still need to rely on their rich clinical experience to identify and select from many plans, which consumes a lot of time and energy, and to a certain extent affects the efficiency and quality of diagnosis and treatment.

[0004] Taking the important elements of the diagnosis and treatment plan as entities and then constructing a knowledge graph can avoid redundant storage. However, this method will make the structure of the knowledge graph more complicated and make it difficult to update the data later. 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: Acquiring case data, wherein the case data includes symptoms and treatment plans; Extracting drug information from the diagnosis and treatment plan, the drug information including identity code and cost information; Retrieving 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; Matching the drug information with the target data, determining the difference identity code and the 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 has no matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

[0007] In an optional embodiment, obtaining case data, wherein the case data includes symptoms and treatment plans, includes: Get the cure time and cure duration for each case data; Filter out case data whose cure time is after the last update time of the medical knowledge base as sample data; According to the healing time of the sample data, a corresponding time identifier is generated for the sample data.

[0008] In an optional embodiment, extracting drug information from the diagnosis and treatment plan, the drug information including identity code and cost information, includes: Extract drug name, manufacturer, batch and cost information from drug information; Look up the identity code from a pre-built dictionary based on drug name, manufacturer, and batch.

[0009] In an optional embodiment, target data is retrieved from a medical knowledge base according to the disease, and the target data includes a drug entity having a relationship with the disease, 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; The target data is acquired from the medical knowledge base according to the query statement.

[0010] In an optional implementation, the drug information is matched with the target data, a difference identity code and a matching identity code are determined according to the matching result, and a plurality of triples are constructed according to the difference identity code and the matching identity code, 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; Determine the identity code in the drug information that belongs to the intersection as a matching identity code; Determine the identity code in the drug information that does not belong to the intersection as a difference identity code; Construct corresponding triples according to the pairwise combination of the identity codes in the drug information, and add the duration identifier of the sample data to the triples; Label the triples containing differential identity encodings as differential triples; Mark the triplets that do not contain differential identity encoding as matching triplets; All triples are deduplicated and the number of repetitions is recorded.

[0011] In an optional implementation, updating the structure and attribute values ​​of the knowledge graph of the medical knowledge base according to the plurality of triples includes: 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 respectively, and an edge is constructed between the two new nodes, 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; 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 updates 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.

[0012] In an optional embodiment, 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 drops 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 keep, 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; Filtering isolated nodes in the knowledge graph, wherein the isolated nodes are nodes without connected edges; Deleting isolated nodes in the knowledge graph.

[0013] In a second aspect, the present invention provides a medical knowledge base updating system, comprising: An acquisition module, used to acquire case data, wherein the case data includes symptoms and diagnosis and treatment plans; A first processing module, for extracting drug information from the diagnosis and treatment plan, wherein the drug information includes an identity 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; The 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 a plurality of triples according to the difference identity code and the matching identity code; An updating module, used for updating the structure and attribute values ​​of the knowledge graph of the medical knowledge base according to the plurality of triples; The difference identity code has no matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

[0014] In a third aspect, a terminal is provided, including: A memory for storing a medical knowledge base update program; A processor is used to implement the steps of the medical knowledge base updating method provided in the first aspect when executing the medical knowledge base updating program.

[0015] 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.

[0016] The beneficial effect of the present invention lies in that the medical knowledge base updating method, system, terminal and storage medium provided by the present invention extract drug information from newly generated case data, and determine the difference identity code and matching identity code in the drug information by matching the drug information with the target data related to the disease retrieved from the medical knowledge base, and construct these difference identity codes and matching identity codes into triplets in pairs, and distinguish the triplets by distinguishing the identity codes of the drugs, and then when updating the knowledge graph according to the triplets, the corresponding updating means are used, and there is no need to traverse the knowledge graph once every update to find the node matching the difference identity code, thereby reducing part of the calculation amount; in addition, by updating the attribute values ​​of the edges in the knowledge graph based entirely on the triplets generated by the matching identity codes, the knowledge graph can represent the application trend of the diagnosis and treatment scheme and the characteristics of different diagnosis and treatment schemes, and suitable diagnosis and treatment schemes can be easily found according to the attribute values ​​in subsequent applications.

[0017] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0020] Figure 2 is a schematic block diagram of a system according to an embodiment of the present invention.

[0021] Figure 3 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0024] The key terms appearing in the present invention are explained below.

[0025] A knowledge base is a system for storing and managing knowledge, which can contain various types of knowledge, such as facts, rules, principles, experience, etc. This knowledge is collated, organized and stored for easy retrieval, query and utilization.

[0026] A knowledge graph is a semantic network that displays knowledge and the relationship between knowledge in a graphical way. A knowledge graph consists of nodes and edges. Nodes represent entities (such as people, organizations, events, concepts, etc.), and edges represent the relationship between entities (such as parent-child relationship, cause-effect relationship, association relationship, etc.). By building a knowledge graph, scattered knowledge can be connected to form an organic whole, so as to better understand and utilize knowledge.

[0027] The data foundation 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, which is mainly reflected in the following aspects: Rich data associations: The knowledge graph graphically displays the relationship 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 associations. For example, in the medical field, the complex relationship between entities such as diseases, symptoms, treatment methods, and drugs in the knowledge graph can enable the medical knowledge base to present medical knowledge more comprehensively and provide richer reference information for doctors' diagnosis and treatment decisions.

[0028] Facilitates knowledge reasoning: The semantic network structure of the knowledge graph facilitates knowledge reasoning. The knowledge base built on the knowledge graph can use its reasoning ability to mine implicit knowledge. For example, in the financial field, through reasoning and analysis of entity relationships such as enterprises, personnel, and transactions in the knowledge graph, the knowledge base can discover potential financial risks and fraudulent behavior patterns.

[0029] Improve data quality: In the process of building a knowledge graph, data needs to be strictly extracted, cleaned and integrated to ensure the accuracy, consistency and completeness of the data. Such high-quality data, as the basis of the knowledge base, can improve the reliability and practicality of the knowledge base. For example, in the field of e-commerce, a product knowledge base based on a knowledge graph can accurately present information such as product attributes, specifications, and usage methods, providing users with better services.

[0030] Support semantic retrieval: The semantic characteristics 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 obtain relevant knowledge based on semantic understanding. For example, in the academic field, when researchers query the knowledge base, the semantic retrieval function based on the knowledge graph can help them find knowledge related to the research topic, not just the literature matching the keywords.

[0031] The medical knowledge base updating method provided in the embodiment of the present invention is executed by a computer terminal, and accordingly, the medical knowledge base updating system runs in the computer terminal.

[0032] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a medical knowledge base updating system. According to different requirements, the order of the steps in the flow chart may be changed, and some may be omitted.

[0033] like Figure 1 As shown, the method includes: S1. Obtain case data, which includes symptoms and treatment plans.

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

[0035] S2. Extract drug information from the diagnosis and treatment plan, wherein the drug information includes an identity code and cost information.

[0036] Conduct in-depth analysis of the obtained diagnosis and treatment plans and extract drug information, including drug identification codes (used to uniquely identify drugs) and cost information. This information will provide important basis for subsequent comparison and update.

[0037] S3. Retrieve target data from the medical knowledge base according to the disease, wherein the target data includes a drug entity having a relationship with the disease.

[0038] According to the symptoms in the case data, the existing medical knowledge base is searched to obtain target data such as drug entities related to the symptoms. These target data are the embodiment of the knowledge already in the knowledge base.

[0039] S4. 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.

[0040] The extracted drug information is matched in detail with the retrieved target data. In this process, the difference identity codes (i.e., the codes of drug entities that do not exist in the target data) and the matching identity codes (the codes of drug entities that exist in the target data) are determined. Based on these codes, multiple triples are constructed in the form of (drug entity, relationship, attribute value), such as (a certain drug, cost, specific amount).

[0041] S5. Update the structure and attribute values ​​of the knowledge graph of the medical knowledge base according to the plurality of triples.

[0042] Using the constructed multiple triples, the structure and attribute values ​​of the knowledge graph of the medical knowledge base are updated. For the drug entities corresponding to the differential identity codes, they are added to the knowledge graph and supplemented with relevant attributes; for the drug entities corresponding to the matching identity codes, their attribute values ​​are updated according to the newly acquired information to ensure that the information in the knowledge graph is more accurate and complete.

[0043] In an embodiment of the present invention, based on step S1, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0044] S101. Obtain the cure time and cure duration for each case data.

[0045] First, clarify the channels for obtaining case data, which can usually be obtained from the hospital's electronic medical record system (EMR), clinical data warehouse (CDR) and other systems. These systems store detailed information about patients from the time of consultation to the end of treatment, including the cure time and time node data related to cure.

[0046] Since different systems have different data storage formats, the acquired data needs to be formatted. 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 date and 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) technology, such as named entity recognition (NER) algorithm, is needed to identify the key information representing the cure time in the text and convert it into a unified date and time format.

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

[0048] S102. Filter out case data whose cure time is after the last medical knowledge base update time as sample data.

[0049] In the medical knowledge base system, there is usually a special record to save the timestamp of each update. The exact time of the last medical knowledge base update is obtained from the metadata management module or log file of the system to ensure the accuracy and completeness of the time record.

[0050] Compare the cure time of each case data obtained in step S101 with the last update time. This filtering operation can be implemented using a database query statement (such as an SQL statement), and a condition is set in the WHERE clause to filter out case data whose cure time is greater than the last update time. For example, in a MySQL database, the statement "SELECT * FROM case_data WHERE cure_time>' last update time'" can be used to obtain sample data that meets the conditions. If the data is stored in other data storage systems (such as NoSQL databases), the filtering operation is performed according to the query syntax of the corresponding system.

[0051] Verify and clean the selected sample data to ensure data quality. Check whether there are missing values, outliers, etc. in the sample data, remove the case data with missing important information (such as key fields such as cure time and symptoms), and further verify or correct outliers (such as obviously unreasonable cure time) to ensure the accuracy of subsequent analysis.

[0052] S103. Generate a corresponding duration identifier for the sample data according to the healing duration of the sample data.

[0053] According to the professional knowledge and actual needs in the medical field, determine the reasonable healing time interval. For example, the healing time can be divided into different intervals such as "short (0-7 days)", "medium (8-30 days)", and "long (31 days and above)". You can also set more detailed time interval division standards based on the characteristics of specific diseases.

[0054] For each sample data's healing time, match it with the set time interval, and generate a corresponding time identifier for the sample data based on the matching result. You can use conditional judgment statements (such as if-elif-else statements in Python) to implement this matching process. For example, if the healing time of a sample data is 5 days, according to the above interval division, a "short" time identifier will be generated for it.

[0055] The generated duration identifier is associated with the corresponding sample data and stored. A new field can be added to the original sample data record to store the duration identifier, or a new data table can be created to record the unique identifier of the sample data (such as the case number) and the corresponding duration identifier, so that the duration identifier information can be easily obtained and used when the sample data is subsequently analyzed and processed.

[0056] In an embodiment of the present invention, based on step S2, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0057] S201. Extract drug name, manufacturer, batch and cost information from drug information.

[0058] The medication records in the electronic medical record are semi-structured or unstructured texts. Natural language processing technology is used to extract the drug name from it, and then the drug information is retrieved from the local database based on the drug name.

[0059] Database query methods include: using SQL query statements to extract the required fields. For example, in a MySQL database, if there is a table called medication_info, which contains fields such as prescription_id, drug_name, manufacturer, batch_number, and cost, the following query statement can be used: SELECT drug_name, manufacturer, batch_number, cost FROM medication_info.

[0060] After extracting the data, you need to validate and clean it. Check whether the field is empty. For the cost field, make sure it is a valid numeric type. For the drug name, manufacturer, and batch, remove leading and trailing spaces, special characters, etc.

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

[0062] 1. Creation and storage of pre-built dictionaries.

[0063] Collect relevant information about the drug, including the drug name, manufacturer, batch, and corresponding identity code. This can be obtained from the database of the drug regulatory department, information provided by the drug manufacturer, and other channels. Organize the collected data into a dictionary, with 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 database for subsequent use.

[0064] 2. Query process.

[0065] If the dictionary is stored in memory, you can directly use the key to query the identity code. If the dictionary is stored in a JSON file, you need to read the file and load it into a dictionary before querying it. If the dictionary is stored in a database, you can use SQL query statements to query the identity code based on the drug name, manufacturer, and batch. For example, in a MySQL database, if there is a table called drug_identity that contains drug_name, manufacturer, batch_number, and identity_code fields, you can use the following query statement: SELECT identity_code FROM drug_identity WHERE drug_name = 'Aspirin' AND manufacturer = 'XX Pharmaceutical Factory' AND batch_number = '20240101'.

[0066] 3. Exception handling.

[0067] During the query process, there may be a situation where no matching items are found. At this time, corresponding exception handling is required, such as logging, returning default values, or prompting the user to manually supplement information.

[0068] In an embodiment of the present invention, based on step S3, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0069] S301. Determine the search scope according to the department type corresponding to the disease.

[0070] First, you need to build a mapping table between disease and department type. This mapping table can be created based on medical expertise, clinical practice experience, and hospital department settings. For example, upper respiratory diseases such as colds and flu usually correspond to respiratory medicine; fractures, joint injuries, and other diseases usually correspond to orthopedics. These mapping relationships can be stored in a database table, and the table structure can contain two fields: disease (disease name) and department (department type).

[0071] In order to ensure the accuracy and completeness of the mapping relationship, you can also refer to authoritative medical guidelines, clinical diagnosis and treatment standards and other materials, and invite medical experts to review and revise them.

[0072] After receiving specific disease information, the disease needs to be accurately identified. If the disease information is in text form, natural language processing (NLP) technology, such as word segmentation, part-of-speech tagging, named entity recognition, etc., is needed to extract key disease names. For example, for the text "the patient suffers from acute gastroenteritis, accompanied by abdominal pain and diarrhea symptoms", NLP technology can identify the disease as "acute gastroenteritis".

[0073] Then, based on the identified disease name, a query is performed in the disease-department mapping table to find the corresponding department type.

[0074] According to the matched department type, the search scope in the medical knowledge base is further determined. Different departments correspond to different knowledge subsets. For example, the search scope of respiratory medicine includes knowledge on the diagnosis, treatment, and medication of respiratory diseases; the search scope of orthopedics involves knowledge on musculoskeletal system diseases, surgical methods, rehabilitation programs, etc.

[0075] In the medical knowledge base, you can set a corresponding index or label for each department type to quickly locate the relevant knowledge area. For example, in the knowledge graph, add a department type label to each node and edge. Once the department type is determined, you can filter out nodes and edges with the department type label as the search scope.

[0076] S302. Construct a query statement, wherein the query statement includes the disease and the search scope.

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

[0078] Combine the determined symptoms and search scope to construct a SPARQL query statement. The basic structure of a query statement usually includes a SELECT clause, a WHERE clause, etc. For example, suppose you want to query drugs related to the symptom of "acute gastroenteritis" and the search scope is the knowledge area of ​​gastroenterology. The SPARQL query statement is as follows: PREFIX rdf:<http: / / www.w3.org / 1999 / 02 / 22-rdf-syntax-ns#> PREFIXmedical:<http: / / example.org / medical#> SELECT ?drug WHERE { ?disease rdf:typemedical:Disease ; medical:name "Acute Gastroenteritis" ; medical:relatedToDepartmentmedical:GastroenterologyDepartment . ?treatment medical:treats ?disease ;medical:usesDrug ?drug . ?drug rdf:type medical:Drug .}.

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

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

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

[0082] After receiving the query statement, the knowledge graph management system will match and search 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 the disease node named "acute gastroenteritis" and the department of gastroenterology in the knowledge graph, and then find the relevant drug node through the relationship between the disease and treatment, and the treatment and drug.

[0083] After executing a query, the knowledge graph management system returns the query results, which are usually presented in the form of tables or RDF triples.

[0084] The returned results are processed, for example, duplicates are removed, data format conversion is performed, etc. The processed results are then returned to the user so that the user can obtain target data such as drugs related to the disease. For example, the query results are returned to the front-end application in JSON format for doctors or patients to view.

[0085] According to the type of department corresponding to the disease, the search scope is accurately determined, an effective query statement is constructed, and the required target data is obtained from the medical knowledge base based on the knowledge graph. This local search method reduces the amount of search calculation by narrowing the search scope.

[0086] In an embodiment of the present invention, based on step S4, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0087] S401. Decode the drug entity in the target data into a corresponding drug identity code.

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

[0089] 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, you may encounter a situation where the drug entity in the target data does not exist in the mapping relationship. At this time, exception handling is required, such as recording logs to indicate that there may be data missing or inconsistent problems. At the same time, you can choose to skip the drug entity or use the default code.

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

[0091] The decoded target data and drug information have a unified data format, generally a set or list type, which facilitates intersection calculation.

[0092] Use the set operation methods provided by the programming language to calculate the intersection. For example, in Python, you can use the intersection method of the set type.

[0093] S403. Determine the identity code in the drug information that belongs to the intersection as the matching identity code.

[0094] Traverse the identity codes in the drug information and check whether each code exists in the intersection. If it exists, it is judged as a matching identity code. This can be implemented using loops and conditional statements. The following is a Python example: matching_codes = [] for code in drug_info_codes: if code inintersection: matching_codes.append(code).

[0095] S404. Determine the identity code in the drug information that does not belong to the intersection as a difference identity code.

[0096] Similarly, the identity codes in the drug information are traversed to check whether each code is not in the intersection. If not, it is determined as a different identity code.

[0097] S405. Construct corresponding triples according to the pairwise combinations of the identity codes in the drug information, and add a duration identifier of the sample data to the triples.

[0098] Use nested loops or combination generation functions to generate pairwise combinations of identity codes in drug information. For example, in Python, you can use the itertools.combinations function: import itertools # Assume duration label duration_label = "short" triples = []for code_pair in itertools.combinations(drug_info_codes, 2): triple = (code_pair[0], "associated", code_pair[1], duration_label) triples.append(triple).

[0099] A triple usually consists of two entities (here, the drug identity code) and the relationship between them, and also adds the duration identifier of the sample data to which they belong. Relationships can be defined according to specific business needs. For example, "association" means that two drugs have a certain association in the same sample data.

[0100] S406. Mark the triples containing the difference identity codes as difference triples.

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

[0102] S407. Mark the triples that do not contain the difference identity codes as matching triples.

[0103] Similarly, all generated triples are traversed to check whether each triple does not contain the difference identity code. If not, the triple is marked as a matching triple.

[0104] S408. Perform deduplication processing on all triples and record the number of repetitions.

[0105] Use a set or dictionary to achieve deduplication. If you use a dictionary, you can use the triple as the key and the number of repetitions as the value.

[0106] In an embodiment of the present invention, based on step S5, an example is given below to illustrate its specific implementation scheme in a non-limiting manner.

[0107] S501. 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.

[0108] First, all difference triplets are traversed to filter out triplets containing a difference identity code and a matching identity code. The filtering can be done by parsing the data structure of the triples (e.g., the tuple containing the identity code and the tag constructed in the previous step) and checking whether the identity code belongs to the difference identity code set and the matching identity code set.

[0109] For each triplet that is filtered out, determine the difference identity code. Use the API or command provided by the knowledge graph management system to create a new node corresponding to the difference identity code. The properties of the node can be set according to actual needs, for example, the identity code is used as the unique identification attribute of the node.

[0110] Find the entity node that matches the identity code, which can be achieved by querying the knowledge graph based on the identity code attributes. Then, build an edge between the new node and the entity node that matches the identity code. The type of edge can be defined as "association".

[0111] Extract the duration identifier and repetition count from the difference triple, set the duration identifier as the duration attribute of the edge, and set the repetition count as the reference attribute of the edge. For example: # The knowledge graph management system used 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, "number of citations", repetition_count).

[0112] S502. 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 respectively, and an edge is constructed between the two new nodes, 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.

[0113] Traverse all difference triplets and filter out the triplets containing two difference identity codes. Similarly, filter out by parsing the data structure of the triplets and checking whether the two identity codes belong to the difference identity code set.

[0114] For each triplet that is screened out, two difference identity codes are determined respectively, and new nodes corresponding to the two difference identity codes are created using the API or command of the knowledge graph management system.

[0115] Constructs an edge between two new nodes, with the edge type defined as "association".

[0116] The duration identifier and the number of repetitions are extracted from the difference triplet, the duration identifier is set as the duration attribute of the edge, and the number of repetitions is set as the reference attribute of the edge.

[0117] S503. 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 updates the duration attribute of the edge to the healing duration indicated by the duration identifier; and updates 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.

[0118] Traverse all matching triples, and for each triple, query the corresponding two nodes and the edge between them from the knowledge graph according to the two identity codes in it. You can use the query function provided by the knowledge graph management system to query by the identity code attribute of the node.

[0119] Extract the duration identifier from the matching triple, get 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, update the duration attribute of the edge to the duration identifier of the matching triple. Specifically, use the compare_duration function to compare the duration, and use the set_edge_property function to set the attribute of the edge.

[0120] Extract the number of repetitions from the matching triples, get the original reference attributes from the edge, add them together to get the new reference attribute value, and update the reference attribute of the edge.

[0121] S504. Similarly, all drug identity codes and corresponding symptoms contained in the drug information are constructed into disease-drug triples, and the edges and reference attributes of the corresponding nodes in the knowledge graph are updated using the disease-drug triples. That is, if there is no edge between the drug node and the symptom node corresponding to the disease-drug triple, an edge is generated, and the time attribute and the reference attribute are set to initial values, that is, the number of repetitions and the latest time of the disease-drug triple; if there is an edge between the drug node and the symptom node corresponding to the disease-drug triple, only the attributes of the edge are updated, and the updating method is the same as steps 501-503.

[0122] On the basis of the above embodiment, in order to further reduce the data redundancy of the knowledge base, as an implementable method, step S6 is added to delete invalid data. Specifically, the following steps are included: S601. Regularly obtain the reference attributes of the edges of the knowledge graph.

[0123] Use a mature scheduled task framework, such as the APScheduler library in Python or the Quartz framework in Java, to build a task for obtaining reference attributes on a scheduled basis. According to business needs and the update frequency of knowledge graph data, set the time interval for task execution reasonably. Set it to execute once a month.

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

[0125] S602. When it is determined that the reference attribute of any edge drops 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.

[0126] Based on the usage scenarios and data characteristics of the knowledge graph, business experts and data analysts jointly determine the citation threshold. For example, in the medical knowledge graph, if an edge has very few citations, it may mean that the knowledge is less relevant. The threshold can be set to the minimum value of the currently obtained citation attribute, or the sum of the minimum value and a fixed parameter.

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

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

[0129] Generate an audit task for each triple data, and the audit task should contain triple data, audit task ID, task description and other information.

[0130] S603. Distribute the audit task to the expert audit terminal.

[0131] Develop an interface with the expert review terminal to ensure that the review task data can be sent to the terminal accurately. You can use RESTful API for data transmission. Rationally distribute review tasks based on factors such as the expert's professional field and workload. You can use rule engines or machine learning algorithms to achieve intelligent distribution.

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

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

[0134] If the review result is to retain, no action is taken and the edges and nodes corresponding to the triple data in the knowledge graph continue to be retained.

[0135] If the audit result is deletion, use the API provided by the knowledge graph management system to delete the edge. For example, in an RDF-based knowledge graph, you can use the SPARQL DELETE statement to delete an edge.

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

[0137] Use the traversal interface provided by the knowledge graph management system to traverse all nodes in the knowledge graph. For each node, check whether it has a connected edge. For large-scale knowledge graphs, block traversal or index optimization can be used to improve traversal efficiency.

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

[0139] Call the node deletion API provided by the knowledge graph management system to delete the filtered isolated nodes from the knowledge graph. For example, in the graph database Neo4j, you can use Cypher statements to delete nodes.

[0140] After deleting a node, you need to ensure the data consistency of the knowledge graph to avoid data residue or incorrect reference. You can perform data verification and cleanup operations after deleting the node.

[0141] Since the reference attribute of the edge indicates the number of times the corresponding data has been cited, when the number of citations is too small, it means that the element is not commonly used. These uncommon data are sent to the expert review terminal for manual review of their value. If they are deemed to have no value, the corresponding edge is deleted. When a node has no connected edges, it means that it has not been cited for a long time and the corresponding drug has been abandoned and can be deleted directly.

[0142] In a specific update scenario, the update method includes the following steps: 1. Case data preprocessing 1.1 The data acquisition unit collects case data from the electronic medical record system at regular intervals and extracts the cure timestamp and cure duration value of each record. 1.2 The time screening unit uses the last knowledge base update time T as a benchmark, screens cases with a cure time after T as valid samples, and establishes a sample data set. 1.3 The identifier generation unit generates a duration identifier for each sample, and the duration identifier contains the cure duration classification information (e.g., short-term ≤ 7 days, medium-term 8-14 days, long-term ≥ 15 days).

[0143] 2. Drug information standardization 2.1 The information extraction engine parses the drug instructions and supply chain data to extract the four-dimensional features of drug name, manufacturer, production batch, and cost parameters. 2.2 The code mapper calls the pre-built drug feature dictionary to map the (name + manufacturer + batch) combination to a unique identity code CID to form a standard drug information set.

[0144] 3. Target data retrieval 3.1 The department classifier determines the associated department (such as respiratory medicine, cardiovascular department) according to the ICD-10 code of the current disease, and defines the search scope of the knowledge base. 3.2 The query builder generates a structured search statement, including disease keywords, department restriction conditions and time range parameters. 3.3 The knowledge base interface executes the search operation and returns the target data set that meets the conditions, including drug entities and their treatment-related information.

[0145] 4. Data matching and graph construction (corresponding to steps S4-S5) 4.1 The decoding and comparison unit reversely parses the drug entity in the target data into CID, and calculates its intersection CID_common and difference CID_diff with the current drug information set. 4.2 The triple generator performs the following operations: Generate the basic triplet of 〈CID_A, association, CID_B〉 for each pair of drugs in CID_common; Generate a difference triple for the combination involving CID_diff, marking the type (single difference / double difference); Add the duration identifier and repetition count of the sample source to all triples. 4.3 Graph Update Engine Dynamic Operation Knowledge Graph: Single difference triple: create a new CID_diff node and establish an edge with the existing node. The edge attribute records the shortest duration identifier and reference count; Double difference triples: create two new nodes and associated edges, and set the attributes as above; Basic triples: If the duration of the existing edge is longer than the new identifier, update it to a shorter value and increment the reference count.

[0146] 5. Knowledge graph optimization module (corresponding to step S6) 5.1 The redundant detector periodically scans the edge reference attributes, and generates a triplet of 〈CID_X, relation, CID_Y〉 to be reviewed for the edge whose number of references is lower than the threshold K (e.g., 5 times) for N consecutive periods (e.g., 3 months). 5.2 The task distributor pushes the triplet to be reviewed to the expert terminal, and attaches reference data such as the drug instructions and clinical guidelines. 5.3 The response processor performs operations based on the expert feedback: Reserve instruction: reset the edge reference count to the initial value; Delete command: removes the target edge and checks the associated node connectivity.

[0147] 5.4 Isolated Node Remover Periodically traverses the graph, deletes free nodes without connected edges, and releases storage resources.

[0148] This embodiment realizes the real-time evolution of the medical knowledge graph through a dynamic triple generation mechanism, especially through the competitive update mechanism of duration identification to ensure the timeliness optimization of treatment plans. The introduction of an expert-coordinated redundant cleaning mechanism reduces the risk of accidental deletion while maintaining the freshness of knowledge. After testing, the system reduces redundant data in the knowledge base by 62% and improves the efficiency of discovering new treatment plans by 41%.

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

[0150] In this embodiment, the medical knowledge base updating system can be divided into multiple functional modules according to the functions it performs, such as Figure 2 As 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 module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0151] An acquisition module, used to acquire case data, wherein the case data includes symptoms and diagnosis and treatment plans; A first processing module, for extracting drug information from the diagnosis and treatment plan, wherein the drug information includes an identity 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; The 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 a plurality of triples according to the difference identity code and the matching identity code; An updating module, used for updating the structure and attribute values ​​of the knowledge graph of the medical knowledge base according to the plurality of triples; The difference identity code has no matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

[0152] Figure 3The medical knowledge base updating method provided for the embodiment of the present application can be applied to the terminal. It will be appreciated by those skilled in the art that the terminal structure involved in the embodiment of the present invention does not constitute a limitation on the terminal, and the terminal may include more or less components than shown, or combine certain components, or arrange different components. In an embodiment 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 personal digital processing, cellular phones, smart phones, wearable terminals, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the embodiments of the present application described and / or required herein.

[0153] The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0154] The memory 320 can be used to store the execution instructions of the processor 310, and 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 perform some or all of the steps in the following method embodiments.

[0155] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process 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. 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 computing core or multiple computing cores.

[0156] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0157] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0158] 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 this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which 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 disk or an optical disk, and other media that can store program codes, including several instructions for enabling 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 each embodiment of the present invention.

[0159] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0160] 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 only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, which can be electrical, mechanical or other forms.

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

[0162] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0163] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for updating a medical knowledge base, characterized in that: include: Acquiring case data, wherein the case data includes symptoms and treatment plans; Extracting drug information from the diagnosis and treatment plan, the drug information including identity code and cost information; Retrieving 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; Matching the drug information with the target data, determining the difference identity code and the 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 has no matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

2. The method according to claim 1, characterized in that Obtain case data, including symptoms and treatment plans, including: Get the cure time and cure duration for each case data; Filter out case data whose cure time is after the last update time of the medical knowledge base as sample data; According to the healing time of the sample data, a corresponding time identifier is generated for the sample data.

3. The method according to claim 1, characterized in that Extracting drug information from the diagnosis and treatment plan, the drug information including identity 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 drug name, manufacturer, and batch.

4. The method according to claim 1, characterized in that: Retrieving 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, 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; The target data is acquired from the medical knowledge base according to the query statement.

5. The method according to claim 2, characterized in that: 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, 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; Determine the identity code in the drug information that belongs to the intersection as a matching identity code; Determine the identity code in the drug information that does not belong to the intersection as a difference identity code; Construct corresponding triples according to the pairwise combination of the identity codes in the drug information, and add the duration identifier of the sample data to the triples; Label the triples containing differential identity encodings as differential triples; Mark the triplets that do not contain differential identity encoding as matching triplets; All triples are deduplicated and the number of repetitions is recorded.

6. The method according to claim 5, characterized in that The structure and attribute values ​​of the knowledge graph of the medical knowledge base are updated according to the plurality of triples, including: 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 respectively, and an edge is constructed between the two new nodes, 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; 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 updates 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. The method according to claim 6, characterized in that 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 drops 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 keep, 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; Filtering isolated nodes in the knowledge graph, wherein the isolated nodes are nodes without connected edges; Deleting isolated nodes in the knowledge graph.

8. A medical knowledge base updating system, characterized in that: include: An acquisition module, used to acquire case data, wherein the case data includes symptoms and diagnosis and treatment plans; A first processing module, for extracting drug information from the diagnosis and treatment plan, wherein the drug information includes an identity 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; The 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 a plurality of triples according to the difference identity code and the matching identity code; An updating module, used for updating the structure and attribute values ​​of the knowledge graph of the medical knowledge base according to the plurality of triples; The difference identity code has no matching drug entity in the target data; the matching identity code has a matching drug entity in the target data.

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

10. 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 as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Clinical medical knowledge graph construction method, device and equipment, and storage medium

    CN111767410A

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

    CN112151141A

  • Commodity recommendation method and system based on combination of twin Transform model and knowledge graph

    CN115934967A

  • Knowledge graph updating method and system based on medical data extraction

    CN116383413A

  • Medical record diagnosis and operation ICD coding method based on mapping knowledge domain

    CN119230090A

Cited By

  • Knowledge base update-oriented redundancy and conflict detection method and system

    CN121233786A

  • Knowledge graph-based tumor reagent intelligent recommendation method and system, and storage medium

    CN121260469A

  • A fine-grained knowledge conflict detection method and system for knowledge base updating

    CN122527730A