Method, system and device for constructing a knowledge base based on a large model
Through the knowledge base construction method based on large models, flat redundant storage and embedded associations of knowledge units are achieved, which solves the dependency problem of traditional knowledge bases and knowledge graphs on complex association structures, improves the query efficiency and dynamic update capabilities of the knowledge base, and meets the needs of real-time clinical scenarios.
Patent Information
- Application Number
- CN202511044525.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-29
AI Technical Summary
Existing technologies have significant defects in the expression of knowledge relevance in knowledge bases, dynamic update mechanisms, and complex query efficiency, resulting in poor application effects in real-time clinical scenarios, especially when complex association structures have strong dependencies and expressiveness and efficiency cannot be achieved simultaneously.
A knowledge base construction method based on a large model is adopted. By obtaining the original corpus data for entity type annotation, the subject and its associated attributes are extracted using the large model, and flat redundant storage knowledge units are constructed. The embedded associated information driven by the large model is used to achieve one-click knowledge unit construction and field-level rapid update.
It eliminates the need for dependencies on complex association structures, improves the query efficiency and dynamic update convenience of the knowledge base, can quickly respond to complex query requirements, and provide complete clinical decision support.
Smart Images

Figure CN120542552B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a knowledge base construction method, system and device based on a large model. BACKGROUND
[0002] Traditional knowledge base technology and knowledge graph technology have been widely used in the storage and retrieval of structured knowledge, especially in the field of medical knowledge management and clinical decision support. However, the existing technology still has significant defects in the expression of knowledge correlation, dynamic updating mechanism and complex query efficiency, which restricts its application effect in real-time clinical scenarios.
[0003] For traditional knowledge base technology, a knowledge base system based on vector retrieval is usually used, which has the following key problems:
[0004] (1) Missing implicit association: the causal chain between knowledge units cannot be explicitly expressed. For example, when a user queries the risk of propofol, the system can only return discrete "propofol pharmacological properties" and "hypotension treatment guidelines" entries, and the complete clinical logic "propofol → hypotension risk → need to monitor blood pressure" needs to be manually assembled, resulting in decision delay.
[0005] (2) High cost of dynamic updating: new knowledge needs to be fully reconstructed in the vector space. Taking the listing of a new drug as an example, not only do we need to recalculate the embedding vectors of all related drugs, but also we need to adjust the weight parameters of the Rerank model to adapt to the characteristics of the new drug, consuming thousands of GPU computing hours each time.
[0006] (3) Insufficient support for complex queries: multi-condition combination queries are prone to information omission. Typical scenarios such as querying "anesthesia scheme for spinal surgery in patients with renal dysfunction" may miss critical contraindication information (such as drugs not explicitly marked as "renal dysfunction" but actually contraindicated) due to the system's inability to penetrate the three-layer logic of "renal dysfunction → drug metabolism contraindication → special requirements for spinal surgery".
[0007] While using knowledge graph technology, although it can express the relationship between entities, its architecture has a fundamental bottleneck:
[0008] (1) Storage and maintenance costs skyrocket: when using "entity-edge-entity" triple storage, the number of edges grows exponentially. Actual deployment shows that each new drug entity requires the creation of multiple relationship edges (such as interactions, contraindications, etc.), resulting in increased storage costs.
[0009] (2) Query efficiency deteriorates: multi-hop query response time grows exponentially with depth. Tests show that for queries such as "find a scheme containing propofol and contraindicated for renal failure", when the association path exceeds 3 hops, the response delay exceeds the clinically acceptable 2-second threshold.
[0010] (3) Weak dynamic expansion capability: new relationship types need to be manually reconstructed in the graph. For example, when introducing real-world drug side effect data, the graph Schema must be expanded offline, which takes a long time and cannot meet the rapid iteration requirements of knowledge in public health emergencies (such as updating treatment drugs).
[0011] Therefore, there is a dilemma in the prior art that the dependence on complex association structure is strong, and expressiveness and efficiency cannot be achieved. SUMMARY
[0012] Therefore, the purpose of the present application is to provide a knowledge base construction method, system and device based on a large model to overcome the problem that the dependence on complex association structure is strong, and expressiveness and efficiency cannot be achieved.
[0013] To achieve the above purpose, the present application adopts the following technical solutions:
[0014] On the one hand, a knowledge base construction method based on a large model comprises:
[0015] Obtaining original corpus data of a target field, and performing entity type annotation on the original corpus data through a term library; the original corpus data comprises different corpora, and the corpora comprise electronic medical records, guidelines, and guide documents;
[0016] Extracting a subject and its preset association attributes in the original corpus data through a large model;
[0017] Based on any corpus segment, determining an embedded association information construction control instruction of the corpus segment according to the subject and the preset association attributes, and inputting the embedded association information construction control instruction into the large model to obtain a candidate knowledge unit directly associated with an association attribute field and a subject field;
[0018] Performing initial conflict detection on the candidate knowledge unit based on entity type and semantic consistency, and performing, when the candidate knowledge unit has a conflict, according to a conflict strategy to obtain a knowledge unit set; wherein the knowledge unit set comprises different non-conflicting knowledge units;
[0019] Structuring the fields of the knowledge unit in a json format; the fields comprise a subject of current knowledge, directly related knowledge, a list of contraindications, a concurrent disease management scheme, a list of equipment required for surgery, and version control information; and vectorizing preset fields of the knowledge unit into a database to obtain a knowledge base.
[0020] Optionally, it further comprises:
[0021] Extending the association attribute fields of the knowledge units of the same subject, and updating the knowledge units related to the updated corpus when any association attribute field is obtained.
[0022] Optionally, further comprising:
[0023] In response to the assignment instruction, assigning weights to the preset corpus;
[0024] When the updated corpus conflicts with the corresponding content in the knowledge unit, updating the knowledge unit according to the content with high weight assignment.
[0025] Optionally, further comprising:
[0026] Storing the new and old version corpora in parallel, and time stamping the new and old version corpora; or,
[0027] In response to the field priority setting instruction, updating the priority of the knowledge unit associated with the field.
[0028] Optionally, further comprising:
[0029] When there is duplicate information in any knowledge unit, performing a deduplication operation.
[0030] Optionally, further comprising:
[0031] Recording all field change information to construct a version history table.
[0032] Optionally, further comprising:
[0033] In response to a natural language or fuzzy keyword input by the user, locating the relevant knowledge unit through a pre-stored entity vector index;
[0034] Determining a complete knowledge unit in the relevant knowledge unit by filtering the structured field.
[0035] Optionally, further comprising:
[0036] When the number of complete knowledge units is greater than 1, determining the similarity between different complete knowledge units, determining the complete knowledge unit with high credibility as the target knowledge unit, and returning the user; or,
[0037] When there are different version information in the content of the complete knowledge unit, determining the content with high weight as the content of the target knowledge unit, and returning the user.
[0038] In another aspect, a knowledge base construction system based on a large model comprises:
[0039] An input layer for obtaining original corpus data of a target field, and performing entity type labeling on the original corpus data through a term library; the original corpus data includes different corpora, and the corpora include electronic medical records, guidelines, and guide documents;
[0040] A processing layer is configured to extract a subject and preset associated attributes in original corpus data by using a large model; based on any corpus segment, the embedded associated information construction control instruction of the corpus segment is determined according to the subject and the preset associated attributes, and the embedded associated information construction control instruction is input into the large model to obtain a candidate knowledge unit directly associated with the associated attribute field and the subject field; based on entity type and semantic consistency, the candidate knowledge unit is subjected to initial conflict detection, and when the candidate knowledge unit has a conflict, a conflict strategy is executed to obtain a knowledge unit set; wherein the knowledge unit set includes different non-conflicting knowledge units.
[0041] A storage layer is configured to store the fields of the knowledge unit in a structured manner according to a json format; the fields include a subject of current knowledge, directly related knowledge, a list of contraindications, a complication management scheme, a list of equipment required for surgery, and version control information; and the preset field of the knowledge unit is vectorized and stored to obtain a knowledge base.
[0042] Optionally, a knowledge base construction device based on a large model includes a processor and a memory, and the processor is connected to the memory:
[0043] The processor is configured to call and execute a program stored in the memory.
[0044] The memory is configured to store the program, and the program is used to execute at least the knowledge base construction method based on a large model.
[0045] The technical scheme provided by the embodiment of the present application at least has the following beneficial effects:
[0046] By using the technical scheme provided by the embodiment of the present application, the subject and the preset associated attributes in the original corpus data are extracted by using the large model, so that the candidate knowledge unit associated with the subject and the preset associated attributes is obtained by using the large model, that is, the one-key knowledge unit construction is realized by using the flat redundancy storage and the knowledge embedding driven by the large model, and the dependence of the traditional scheme on the complex associated structure is eliminated. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the technical scheme in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0048] Figure 1 A knowledge base construction method based on a large model provided by the embodiment of the present application is shown in the flowchart;
[0049] Figure 2 A structural schematic diagram of a large model-based knowledge base construction system according to an embodiment of the present application is provided.
[0050] Figure 3 A specific structural schematic diagram of another large model-based knowledge base construction system according to an embodiment of the present application is provided.
[0051] Figure 4 A structural schematic diagram of a large model-based knowledge base construction device according to an embodiment of the present application is provided. DETAILED DESCRIPTION
[0052] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions of the present application will be described in detail below. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0053] The traditional knowledge base construction scheme based on a vector database in the related art is described.
[0054] Corpus vectorization: using a pre-trained model (such as BERT, Sentence-BERT) to convert text into dense vectors and store them in a vector database (such as FAISS, Milvus).
[0055] Retrieval and screening mechanism:
[0056] Keyword retrieval: based on an inverted index to quickly locate documents containing target entities (such as searching for “spinal surgery” to directly return relevant medical records);
[0057] Vector similarity retrieval: recalling items with similar semantics through vector cosine similarity (such as “anesthesia side effects” may recall the case of “postoperative nausea”).
[0058] Rerank optimization: using a Rarank fine-tuning model to reorder the mixed results to improve relevance (such as: the user inputs “anesthesia plan for high-risk patients”, and the items labeled with “ASA IV level contraindication” are preferentially displayed).
[0059] The knowledge graph scheme in the related art is described.
[0060] The knowledge graph emphasizes explicit relationship modeling and is constructed through the following steps:
[0061] Entity and relationship extraction: using a NER model (such as BIO annotation) to extract entities (such as “bupivacaine” “neurotoxicity”), and using an RE model (such as RENet) to identify relationship types (such as “drug-side effects”).
[0062] Graph storage and query: Use a graph database (such as Neo4j) to store "entity-relationship-entity" triples;
[0063] Query example: MATCH (drug)-[:prohibited for]->(disease) WHERE drug = "bupivacaine" RETURN disease.
[0064] Retrieval and reasoning extensions: Infer indirect relationship chains through SPARQL or multi-hop queries (for example, reasoning that "ASA IV patients cannot choose bupivacaine anesthesia" requires joining the path of "ASA IV → contraindicated drugs → bupivacaine").
[0065] Therefore, traditional knowledge base technology has the following defects:
[0066] Implicit associations are missing: For example, the causal chain "propofol → risk of hypotension → need to monitor blood pressure" needs to be pieced together through multiple searches, and a complete association conclusion cannot be directly output;
[0067] High cost of dynamic updates: When new knowledge is added, all relevant vectors need to be recalculated and stored, and the Rerank model needs to be retrained to adapt to the new association rules (for example, the launch of a new drug "X" requires manual design of new features);
[0068] Weak complex query capabilities: For example, when querying "anesthesia plans and contraindications for spinal surgery in patients with renal insufficiency", the system needs to combine keywords ("spinal surgery", "renal insufficiency"), vectors ("anesthesia contraindications") and rerank rules to return results, but may miss embedded related information (for example, the "contraindications" field itself does not include "renal impairment").
[0069] Knowledge graph technology has the following defects:
[0070] High maintenance cost: Edge relationship management takes up a lot of storage resources (e.g., "each entity pair needs to store a relationship edge separately"), and updates need to ensure full Figure 1 Consistency (for example, deleting "Drug X" requires deleting all associated edges simultaneously).
[0071] Low query efficiency: Complex multi-hop queries (e.g., “find all regimens containing propofol that are contraindicated for patients with renal failure”) rely on traversing the graph, and response time increases exponentially with the depth of the association.
[0072] Poor dynamic adaptability: Adding new relationship types (such as "long-term side effects of drugs in real-world data") requires manual expansion of the graph structure, which is difficult to meet the needs of rapid iteration scenarios.
[0073] Efficiency bottleneck: complex association queries need to traverse multi-hop paths, for example, the query "anesthetics for patients with normal cardiac function and postoperative analgesia plan" needs to jump multiple times, and the delay is significant.
[0074] Therefore, as described in the background, the present application has a dilemma of strong dependence on complex association structures and incompatible expression and efficiency.
[0075] Based on this, the embodiment of the present application provides a knowledge base construction method, system and device based on a large model, which realizes "one-key knowledge unit construction" and "field-level fast update" through flat redundant storage and large model-driven knowledge embedding, eliminating the dependence of traditional solutions on complex association structures.
[0076] Figure 1 For the knowledge base construction method based on a large model provided by the embodiment of the present application, please refer to Figure 2 The embodiment can include the following steps:
[0077] Step S101, obtaining original corpus data of a target field, and performing entity type annotation on the original corpus data through a term library; the original corpus data includes different corpora, and the corpora include electronic medical records, guidelines, and guide documents.
[0078] In the embodiment, the target field can be an anesthesiology specialty, and the original corpus data can include electronic medical records, guidelines, various documents, etc. After obtaining the original corpus data, field term enhancement is performed, such as annotating entity types through a term library, such as drug names, surgery types, etc.
[0079] Step S102, extracting a subject and a preset association attribute in the original corpus data through a large model.
[0080] The large model can be a general large language model such as Qwen, DeepSeek, GPT, etc., and can be, for example, Qwen2.5-72B-Instruct, deepseek-V3, GPT-4o, etc., which can realize the extraction function, and is not limited in the present application. The large model extracts the subject (for example, which can be a surgery name) and the preset association attribute (for example, which can be a drug, a contraindication, a complication, etc.) in the original corpus data.
[0081] Step S103, based on any corpus segment, determining an embedded association information construction control instruction of the corpus segment according to the subject and the preset association attribute, and inputting the embedded association information construction control instruction into the large model to obtain a candidate knowledge unit directly associated with the association attribute field and the subject field.
[0082] After knowledge extraction, a control instruction can be input to a large model to obtain a candidate knowledge unit, wherein the large model can be a neural network model, which can implement the execution of the instruction, and the model can be the same as or different from the first large model.
[0083] For example, for the corpus segment "spinal surgery requires patients with coagulation disorders to use epidural anesthesia", the embedded association information can be determined according to the subject (spinal surgery), the preset association attribute (anesthesia scheme, contraindication, alternative scheme), and the control instruction "generate a spinal surgery knowledge unit containing anesthesia scheme, contraindication, and alternative scheme, and require direct association of fields" is constructed, so that the large model produces a candidate knowledge unit.
[0084] For example, the control instruction can also be "extract the operation name and directly associated anesthesia scheme and contraindication from the following text, and output in JSON format".
[0085] Step S104, based on the consistency of entity type and semantics, performing initial conflict detection on the candidate knowledge unit, when the candidate knowledge unit has a conflict, performing according to the conflict strategy to obtain a knowledge unit set; wherein the knowledge unit set includes different non-conflicting knowledge units.
[0086] Determine whether the entity type and semantics in the candidate knowledge unit are consistent, and when they are not consistent, determine that they conflict, and re-execute step S102.
[0087] Step S105, structuring the fields of the knowledge unit in json format; the fields include: the subject of the current knowledge, directly related knowledge, contraindication list, complication management scheme, operation required equipment list, version control information; vectorize the preset field of the knowledge unit into the database to obtain a knowledge base.
[0088] For example, the storage system is deployed as follows:
[0089] 1) Structured data into the database:
[0090] json
[0091] {
[0092] "entityId": "SUR_OP001", the subject of the current knowledge
[0093] "directKnowledge": [... ], directly related knowledge
[0094] "contraindication": [... ], contraindication list
[0095] "complicationManagement": [... ], complication management plan
[0096] "equipmentRequirements": [... ], list of equipment required for the procedure
[0097] "versionControl": {...} version control information
[0098] }
[0099] 2) Vectorize the field of "subject ID", "name", etc. into the database.
[0100] It can be understood that, by using the technical solutions provided in the embodiments of the present application, the subject and the preset associated attribute in the original corpus data are extracted by a large model, so that the candidate knowledge unit associated with the subject and the preset associated attribute is obtained by the large model, that is, by using the flat redundancy storage and the knowledge embedding driven by the large model, one-key knowledge unit construction is realized, and the dependence of the traditional scheme on complex association structure is eliminated.
[0101] In some embodiments, the method provided in the embodiments further includes the following steps:
[0102] The knowledge unit of the same subject is extended in the associated attribute field, and when the update corpus of any associated attribute field is obtained, the knowledge unit related to the update corpus is updated.
[0103] For example, when the same subject (for example, spine surgery) appears update corpus (for example, new ASA classification contraindication), the knowledge unit related to the update corpus is updated.
[0104] For example, if the FDA 2025 guideline updates the contraindication of bupivacaine, the information is written to all associated subjects.
[0105] It can be understood that, by using the technical solutions provided in the embodiments of the present application, when new corpus appears, only the related field is updated, rather than the whole entry is rewritten, and the convenience is improved.
[0106] In some embodiments, the method provided in the embodiments further includes the following steps:
[0107] In response to the assignment instruction, the weight of the preset corpus is assigned;
[0108] When the update corpus conflicts with the corresponding content in the knowledge unit, the knowledge unit is updated according to the content with high weight assignment.
[0109] For example, in the embodiment, the source weight is marked for all fields, for example, the FDA guideline weight = 9, and the literature weight = 6; when the corresponding content in the corpus knowledge unit is updated, the content with high weight is preferred to be updated.
[0110] For example, the old entry shows that "ASA III is operable" conflicts with the new guideline, and the FDA / ASA update is preferred to be adopted, and only the conflict field is modified instead of rewriting the whole entry.
[0111] It can be understood that the technical solution provided by the embodiment of the application can be updated according to the high-reliability content.
[0112] In some embodiments, the method provided by the embodiment further includes the following steps:
[0113] The new and old versions of the corpus are stored in parallel, and the new and old versions of the corpus are time-stamped; or,
[0114] In response to the field priority setting instruction, the priority of the knowledge unit associated with the field is updated.
[0115] For example, when the new and old versions of the corpus are stored, the new and old versions of the corpus are time-stamped, in order to facilitate viewing, the same part of the new and old versions is only kept in one kind, and the new and old corpus and the time stamp are kept for different content.
[0116] For example, when the user explicitly changes the priority of the knowledge entry (for example, marks a specific field as "to be re-verified"), dynamic updating is performed.
[0117] It can be understood that the new and old versions are kept, and the old knowledge is avoided from being completely erased by time-stamping; after the priority is changed, the updating is performed according to the changed priority.
[0118] In some embodiments, the method provided by the embodiment further includes the following steps:
[0119] When there is repeated information in any knowledge unit, a de-duplication operation is performed.
[0120] For example, "preoperative fasting requirements" indicated by multiple guidelines are merged into one.
[0121] In some embodiments, the method provided by the embodiment further includes the following steps:
[0122] All field change information is recorded to construct a version history table.
[0123] In some embodiments, the method provided by the embodiment further includes the following steps:
[0124] In response to a natural language or ambiguous keyword input by a user, a relevant knowledge unit is located through a pre-stored entity vector index;
[0125] A complete knowledge unit is determined in the relevant knowledge unit by screening a structured field.
[0126] For example, when a user makes an inquiry, a structured query (such as "spinal surgery + ASA III level") or natural speech (such as "select an anesthetic plan for a patient with renal insufficiency") is input, and the system quickly locates a relevant knowledge unit through a pre-stored entity vector index.
[0127] In the preliminary screening result or the full library range, a precise search is performed to directly screen a field-level constraint, and a complete knowledge unit meeting all constraints is directly output in response to a requirement for no multi-step splicing.
[0128] For example, when a user inquires about an anesthetic plan for spinal surgery, the content corresponding to the "anesthetic plan" field can be directly and accurately located in the document "spinal surgery" in the preliminary screening result. The plan takes spinal surgery as the main body and builds a document containing knowledge of anesthetic plans, drug contraindications, and complication management around the main body. When a user inquires about an anesthetic plan for spinal surgery, the field content of the anesthetic plan in the document can be directly located, and relevant information can be directly obtained. Unlike a traditional knowledge base, the information required by the user is scattered in different knowledge fragments, which may lead to inaccurate answers due to missing context or incomplete content.
[0129] In some embodiments, the method further comprises:
[0130] When the number of complete knowledge units is greater than 1, the similarity between different complete knowledge units is determined, a complete knowledge unit with a high credibility is determined as a target knowledge unit, and the user is returned; or,
[0131] When there are different version information in the content of the complete knowledge unit, the content with a higher weight is determined as the content of the target knowledge unit, and the user is returned.
[0132] For example, when there are multiple versions or similarity results, the results are comprehensively sorted according to the field source weight (such as FDA / authoritative guidelines greater than literature) and vector similarity, and a high-credibility result is preferentially returned.
[0133] In the embodiments of the present application, the knowledge base storage structure design is described again:
[0134] Flat redundancy storage model:
[0135] Format example: "knowledge unit" in JSON format, directly embedding associated information (such as a surgical plan directly containing contraindicated drug attributes).
[0136] Field design:
[0137] json
[0138] {
[0139] "Subject ID": "SUR_OP001",
[0140] "Subject Type": "surgical operation",
[0141] "Name": "Spinal fusion",
[0142] "Directly Associated Knowledge": {
[0143] "Anesthesia Regimen": {
[0144] "Recommended Drug Combination": ["Ropivacaine", "Propofol"],
[0145] "Contraindication Conditions": [
[0146] {
[0147] "Condition Type": "patient status",
[0148] "Description": "ASA classification IV or higher"
[0149] },
[0150] {
[0151] "Condition Type": "laboratory indicator",
[0152] "Description": "Coagulation dysfunction (PT > 15 seconds)",
[0153] "Associated Drugs": ["Epidural anesthetics"]
[0154] }
[0155] ],
[0156] "Alternative Regimen Guidance": "If propofol is contraindicated, use ketamine + dexmedetomidine instead"
[0157] },
[0158] "Complication Management": {
[0159] "Infection Risk Handling": "Preoperative prophylactic use of vancomycin, and monitor white blood cell count"
[0160] }
[0161] },
[0162] "Version Control": {
[0163] "current": "v202504",
[0164] "lastUpdate": "2025-04-01",
[0165] "priorVersion": "v202503 Note: updated FDA 2025 bupivacaine contraindication guidelines"
[0166] }
[0167] }
[0168] Storage strategy:
[0169] Use a relational database (such as MySQL) or NoSQL (such as MongoDB, Elasticsearch) to achieve internal association through field nesting.
[0170] Vectorize fields such as "subject ID" and "name" to preliminarily filter knowledge units through vector similarity.
[0171] In the embodiment of the present application, taking the anesthesia specialty knowledge base as an example: this scheme can directly combine cross-entity related information such as "anesthesia contraindications for spinal surgery", "anesthesia drug complications", and "patient risk assessment" into the surgical plan item, so that the clinician can obtain complete decision-making basis through one query, without the need for manual integration of multiple scattered knowledge fragments. This design not only reduces the complexity of maintenance, but also significantly improves the query efficiency and scene landing practicality of knowledge, providing a new technical path for the intelligentization of specialty knowledge-intensive fields.
[0172] The embodiment provides a specific embodiment:
[0173]
[0174] Based on a general inventive concept, the present application also provides a large model-based knowledge base construction system for implementing the above method embodiments. Figure 2 A structure diagram of a large model-based knowledge base construction system provided by an embodiment of the present application is shown in the figure, Figure 3 As shown, the system provided by the embodiment of the present application can include:
[0175] An input layer 21 is configured to acquire original corpus data of a target field and perform entity type labeling on the original corpus data through a term library; the original corpus data includes different corpora, and the corpora include electronic medical records, guidelines, and guide documents;
[0176] The processing layer 22 is configured to extract subjects and preset associated attributes of the subjects in the original corpus data by using the large model; based on any corpus segment, the embedded associated information construction control instruction of the corpus segment is determined according to the subjects and the preset associated attributes, and the embedded associated information construction control instruction is input into the large model to obtain a candidate knowledge unit directly associated with the associated attribute field and the subject field; the candidate knowledge unit is subjected to initial conflict detection based on entity type and semantic consistency, and when the candidate knowledge unit has a conflict, the conflict strategy is executed to obtain a knowledge unit set; the knowledge unit set includes different non-conflicting knowledge units.
[0177] The storage layer 23 is configured to store the fields of the knowledge unit in a structured manner according to a json format; the fields include a subject of current knowledge, directly related knowledge, a list of contraindications, a complication management scheme, a list of required equipment for surgery, and version control information; and the preset field vector of the knowledge unit is stored in a database to obtain a knowledge base.
[0178] In some embodiments, the output layer 24 is further configured to locate a relevant knowledge unit by using a pre-stored entity vector index in response to a natural language or fuzzy keyword input by a user; and determine a complete knowledge unit in the relevant knowledge unit by filtering the structured fields.
[0179] In the system in the above embodiments, the specific manner in which each layer performs the operation has been described in detail in the embodiments of the method, and will not be described in detail here.
[0180] Specifically, referring to Figure 3 , Figure 4 A specific structure diagram of another knowledge base construction system based on a large model provided by an embodiment of the present application is shown in the figure. The input layer includes target field corpus (structured and unstructured data); the processing layer includes a preprocessing module, a subject recognition and knowledge merging engine; the storage layer can include a flat redundancy storage database; and the output layer includes a knowledge base query management platform.
[0181] The present application also provides a knowledge base construction device based on a large model for implementing the above method embodiments. Figure 4 A structure diagram of a knowledge base construction device based on a large model provided by an embodiment of the present application is shown in the figure. As shown in the figure, the knowledge base construction device based on a large model of the present embodiment includes a processor 31 and a memory 32, and the processor 31 is connected to the memory 32. The processor 31 is configured to call and execute a program stored in the memory 32; the memory 32 is configured to store the program, and the program is at least used to execute the knowledge base construction method based on a large model in the above embodiments.
[0182] The specific implementation of the knowledge base construction device based on a large model provided in the embodiments of the present application can refer to the implementation of the knowledge base construction method based on a large model of any of the above embodiments, which will not be repeated here.
[0183] It can be understood that the same or similar parts in the above embodiments can be mutually referred to, and the content not described in detail in some embodiments can be referred to the same or similar content in other embodiments.
[0184] It should be noted that in the description of the present application, the terms "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise specified, the meaning of "a plurality of" is at least two.
[0185] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing specific logic functions or other processes, and the various embodiments of the present application include additional implementations in which the order of execution is not necessarily the same as the order shown or discussed, including the implementation of functions according to the involved functions in a substantially simultaneous manner, or in reverse order, which should be understood by those skilled in the art of the embodiments of the present application.
[0186] It should be understood that parts of the present application can be realized by hardware, software, firmware or their combination. In the above implementation, a plurality of steps or methods can be realized by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if realized by hardware, and as in another implementation, it can be realized by any one or their combination of the following technologies known in the art: discrete logic circuit with logic gate circuit for implementing logic function on data signal, application specific integrated circuit with suitable combination logic gate circuit, programmable gate array (PGA), field programmable gate array (FPGA) and the like.
[0187] Those skilled in the art of the present technology can understand that all or part of the steps carried out by the above-mentioned embodiments can be completed by programs instructing relevant hardware, and the programs can be stored in a computer readable storage medium, and the programs include one or a combination of steps of the method embodiments when executed.
[0188] In addition, each function unit in each embodiment of the present application can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be realized in the form of hardware, or in the form of a software function module. When the integrated module is realized in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0189] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0190] In the description of the present specification, the description referring to the terms "one embodiment", "some embodiments", "an example", "a specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0191] Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and are not to be construed as limiting the present application, and those of ordinary skill in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.
Claims
1. A method for constructing a knowledge base based on a large model, characterized in that: include: Obtaining original corpus data of the target domain and annotating the original corpus data with entity types using a term library; The original corpus data includes different corpora, including electronic medical records, guidelines, and guidance documents; Extract the subject and its preset associated attributes from the original corpus data through the large model; Based on any corpus segment, according to the subject and preset association attributes, the embedded association information construction control instruction of the corpus segment is determined, and the embedded association information construction control instruction is input into the large model to obtain candidate knowledge units directly associated with the association attribute field and the subject field; Based on entity type and semantic consistency, the candidate knowledge units are initially detected for conflict. When the candidate knowledge units conflict, the conflict strategy is followed to obtain a knowledge unit set; wherein the knowledge unit set includes different non-conflicting knowledge units; The fields of the knowledge unit are structured and stored in JSON format; the fields include: the main body of current knowledge, directly related knowledge, a list of contraindications, a complication management plan, a list of equipment required for surgery, and version control information; the preset fields of the knowledge unit are vectorized and stored in the database to obtain a knowledge base.
2. The method according to claim 1, characterized in that Also includes: The associated attribute fields of the knowledge units of the same subject are expanded. When the updated corpus of any associated attribute field is obtained, the knowledge units related to the updated corpus are updated.
3. The method according to claim 2, characterized in that Also includes: In response to the assignment instruction, weights are assigned to the preset corpus; When the updated corpus conflicts with the corresponding content in the knowledge unit, the knowledge unit is updated according to the content with a higher weight.
4. The method according to claim 2, characterized in that Also includes: Store the old and new versions of the corpus in parallel and timestamp them. or, In response to the field priority setting instruction, the priority of the knowledge unit associated with the field is updated.
5. The method according to claim 1, wherein Also includes: When there is duplicate information in any knowledge unit, deduplication is performed.
6. The method according to claim 1, characterized in that Also includes: Record all field changes to build a version history table.
7. The method according to claim 1, characterized in that Also includes: In response to natural language or fuzzy keywords input by the user, the relevant knowledge units are located through pre-stored entity vector indexes; By screening the structured fields, a complete knowledge unit is determined among the related knowledge units.
8. The method according to claim 7, characterized in that Also includes: When the number of complete knowledge units is greater than 1, the similarity between different complete knowledge units is determined, and the complete knowledge unit with high credibility is determined as the target knowledge unit and returned to the user; or, When different versions of content exist in a complete knowledge unit, the content with a higher weight is determined as the content of the target knowledge unit and returned to the user.
9. A knowledge base construction system based on a large model, characterized in that: include: The input layer is used to obtain the original corpus data of the target domain and annotate the entity types of the original corpus data using the term library; the original corpus data includes different corpora, including electronic medical records, guidelines, and guidance documents; The processing layer is used to extract the subject and its preset associated attributes from the original corpus data through the large model; based on any corpus segment, determine the embedded associated information construction control instruction of the corpus segment according to the subject and preset associated attributes, and input the embedded associated information construction control instruction into the large model to obtain candidate knowledge units directly associated with the associated attribute field and the subject field; based on the entity type and semantic consistency, perform initial conflict detection on the candidate knowledge units, and when there is a conflict between the candidate knowledge units, execute according to the conflict strategy to obtain a knowledge unit set; wherein, the knowledge unit set includes different non-conflicting knowledge units; The storage layer is used to store the fields of the knowledge unit in a structured manner in JSON format; the fields include: the main body of the current knowledge, directly related knowledge, a list of contraindications, a complication management plan, a list of equipment required for surgery, and version control information; the preset fields of the knowledge unit are vectorized and stored in the database to obtain a knowledge base.
10. A knowledge base construction device based on a large model, characterized in that: The device comprises a processor and a memory, wherein the processor is connected to the memory: The processor is configured to call and execute the program stored in the memory; The memory is used to store the program, and the program is at least used to execute the large model-based knowledge base construction method described in any one of claims 1-8.
Citation Information
Patent Citations
Method and device for automatically constructing domain knowledge base based on large language model
CN116702766A
Large language model medical question-answering system based on medical record knowledge graph
CN117056493A