Diagnosis and treatment path mining method and system based on internet hospital dialogue data

By applying a multi-stage extraction and fusion method of large language models in Internet hospital dialogue data and combining with the review mechanism, the problem of difficulty in drawing diagnosis and treatment processes in the existing technology is solved, and high-quality diagnosis and treatment process mining is achieved, which is in line with medical standards and has good operability.

CN119905276AActive Publication Date: 2025-04-29RENJI HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE +2

Patent Information

Application Number
CN202510379840.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-29
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to effectively extract diagnosis and treatment processes from Internet hospital dialogue data, there are problems of error transmission and lack of diagnostic process mining methods for medical dialogue.

Method used

A multi-stage extraction and fusion method based on a large language model is proposed, combined with the review mechanism, and by identifying medical entities, analyzing contextual relationships, extracting sub-chains and filtering logical rules, finally generating a standardized diagnosis and treatment path.

Benefits of technology

It effectively solves the problem of error transmission in the traditional pipeline framework extraction method, and realizes the high-quality mining of diagnosis and treatment processes from Internet hospital dialogue data, complies with medical standards and is highly operable and universal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119905276A_ABST
    Figure CN119905276A_ABST
Patent Text Reader

Abstract

The invention relates to the crossing field of natural language processing and biomedicine, and discloses a diagnosis and treatment path mining method and system based on internet hospital dialogue data, and the method comprises the steps: obtaining medical dialogue data, and carrying out the preprocessing of the data; designing an instruction to guide the large language model to identify and label medical entities in the doctor-patient dialogue, and distributing a preset label for each medical entity; the medical entities are subdivided into four classes, namely, feature, examination, disease and treatment; analyzing a context relationship between entities through a large language model, and extracting sub-chains with logic relevance; strict examination and logic rule filtering are carried out on the sub-chain, so that the medical rationality and clinical significance of the sub-chain are ensured; and fusing the sub-chains to generate a standardized diagnosis and treatment path. According to the method, the diagnosis and treatment process in the medical dialogue is effectively mined, and the method not only conforms to the specification of the medical field, but also has relatively high operability and universality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the intersection of natural language processing and biomedicine, and in particular to a diagnosis and treatment path mining method and system based on Internet hospital conversation data. Background Art

[0002] In modern Internet hospitals, the conversation data between doctors and patients contains a large amount of diagnosis and treatment knowledge, covering the entire process from patient symptom description, examination information, doctor diagnosis to treatment plan. Using this data to mine the diagnosis and treatment process can help identify key steps in diagnosis and treatment and provide scientific decision support.

[0003] Medical conversation information extraction is an emerging research direction in the field of medical information extraction, which aims to extract key information (such as clinical terms and their attributes, treatment plans, etc.) from doctor-patient conversations in order to automatically generate electronic medical records (EMRs), thereby reducing the burden of doctors writing narrative reports. Early studies introduced information extraction methods based on heuristic rules (such as character matching, regular expressions, etc.), but the results were not ideal. In order to capture more complex interdependencies between entity pairs, recent studies aim to enhance information extraction models through external modules, such as the SOTA rule-based framework of LogicRE, which first learns logical rules based on the output logarithm of the trained neural model, and then refines the predicted relationship of the neural model by learning good rules; MILR first learns logical rules from annotated data, and then trains a neural model that is penalized by auxiliary losses for reflecting violations of the learned rules. However, the above two frameworks have error propagation problems due to their pipeline characteristics.

[0004] Large language models (LLMs) have shown great potential in the field of medical information extraction with their powerful reasoning and language capabilities combined with extensive knowledge reserves. These models can understand diverse terminology and perform efficient information extraction according to predetermined rules. However, existing research on LLM-based information extraction mainly focuses on entity relationship extraction, and the mining of diagnosis and treatment processes on medical conversation data remains to be explored. How to design a reasonable extraction method to extract diagnosis and treatment processes from Internet hospital conversation data to meet the needs of scientific decision support is still a challenging problem.

[0005] In summary, there is an urgent need for a method that can realize diagnosis and treatment process mining based on medical conversation data to solve the above problems. Summary of the invention

[0006] In view of this, the present invention proposes a diagnosis and treatment process mining method based on Internet hospital conversation data. First, in order to solve the problem of error propagation in traditional pipeline framework extraction methods, the present invention proposes an LLM-based review mechanism, which performs filtering before the fusion stage according to a priori rules to block the error propagation in the extraction stage. Second, in order to solve the current lack of diagnosis process mining methods based on medical conversations, the present invention proposes a diagnosis and treatment process mining method based on multi-stage extraction and fusion of large models for conversation data, which can identify the physical location and logical relationship of entities in the conversation, extract sub-chains, and then generate high-quality process links through filtering and fusion strategies. A diagnosis and treatment path mining method based on Internet hospital conversation data, comprising the following steps: Acquire medical conversation data and pre-process the data; design instructions to guide the large language model to identify and annotate medical entities in doctor-patient conversations, and assign a pre-set label to each medical entity; medical entities are subdivided into four categories in the present invention, namely: characteristics, examinations, diseases and treatments; analyze the contextual relationship between entities through the large language model, and extract sub-chains with logical associations; strictly review and filter the sub-chains according to logical rules to ensure their medical rationality and clinical significance; integrate the sub-chains to generate a standardized diagnosis and treatment path.

[0007] The preprocessing includes: removing noise data: using natural language processing (NLP) technology to eliminate irrelevant content, including system prompts, meaningless pauses, repeated sentences, emoticons, and irrelevant topics; removing sensitive information: desensitizing information involving patient privacy; removing redundant information: merging repeated consultation questions or multiple inquiries about the same symptoms; standardizing expressions: unifying the format of medical terminology; optimizing storage formats: converting cleaned data into a structured format that is easy to analyze.

[0008] The fusion includes: traversing the disease set, fusing the examination-disease and disease-treatment sub-chains with the same disease, and then based on the examination set, fusing the feature-examination and examination-disease sub-chains with the same examination, forming a main chain from feature to examination, and then from examination to disease to treatment; for the remaining isolated sub-chains, first calculate the similarity between the nodes in the sub-chain and the nodes with corresponding labels in the main chain. If the similarity exceeds the preset threshold, the large model is used to determine whether the sub-chain can be fused with the main chain; if the similarity does not reach the threshold, the sub-chain is directly discarded; and finally a complete diagnosis and treatment process is formed.

[0009] The design instructions guide the large language model to identify and annotate medical entities in doctor-patient dialogues, and assign a preset label to each medical entity; medical entities are subdivided into four categories in the present invention, namely: characteristics, examinations, diseases and treatments; including: dividing medical entities into four categories: characteristics, examinations, diseases and treatments; characteristics are: symptoms, signs or clinical manifestations, including at least headaches and fever; examinations are: medical examinations or tests, including at least blood tests and CT scans; diseases are: diagnoses made by doctors, including at least pneumonia and diabetes; treatments are: treatment plans, including at least drugs, surgery, physical therapy, lifestyle adjustments, and lifestyle adjustments; use LLM to automatically extract medical entities in text; assign predefined labels to each identified entity; unify synonyms or medical terms in different forms of expression.

[0010] The large language model is used to analyze the contextual relationship between entities and extract sub-chains with logical associations, including: using the model to analyze the conversation context and identify the potential logical relationship between entities; standardizing sub-chains with similar or diverse expressions, retaining frequently occurring sub-chains, and filtering out low-frequency specific sub-chains. Setting a frequency threshold to retain sub-chains with broad representation; and deleting isolated sub-chains that lack statistical significance.

[0011] Strictly review and filter the subchains according to logical rules to ensure their medical rationality and clinical significance, including: defining the constraint set C = {symptoms → examination, examination → disease, disease → treatment} to ensure that the subchains conform to the medical diagnosis and treatment logic; using the medical knowledge base and clinical guidelines to verify the rationality of the subchains. Eliminate the following abnormal subchains: missing examination links: directly from "symptoms → disease"; wrong order: "treatment → disease".

[0012] The second aspect of the present invention provides a diagnosis and treatment path mining system based on Internet hospital conversation data, comprising: The preprocessing unit obtains medical conversation data and preprocesses the data; the entity labeling unit designs instructions to guide the large language model to identify and label medical entities in doctor-patient conversations, and assigns a pre-set label to each medical entity; medical entities are subdivided into four categories in the present invention, namely: characteristics, examinations, diseases and treatments; the sub-chain extraction unit analyzes the contextual relationship between entities through the large language model and extracts sub-chains with logical associations; the review and filtering unit strictly reviews and filters the sub-chains according to logical rules to ensure their medical rationality and clinical significance; the sub-chain fusion unit fuses the sub-chains to generate a standardized diagnosis and treatment path.

[0013] The third aspect of the present invention provides an electronic device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via lines; the at least one processor calls the instructions in the memory so that the electronic device executes the above-mentioned diagnosis and treatment path mining method based on Internet hospital conversation data.

[0014] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions that, when executed on a computer, enable the computer to execute the above-mentioned diagnosis and treatment path mining method based on Internet hospital conversation data.

[0015] The present invention has the following beneficial effects: Aiming at the field of medical information extraction, this paper proposes a novel diagnosis and treatment process mining method based on Internet hospital conversation data, which solves the error propagation problem of traditional pipeline framework extraction methods. In addition, based on a unique review mechanism and a multi-stage large model extraction fusion strategy, this method effectively mines the diagnosis and treatment process in medical conversations, which not only conforms to the norms of the medical field, but also has strong operability and universality. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flow chart of a diagnosis and treatment path mining method based on Internet hospital conversation data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0018] feature: In medicine, "characteristics" refer to the hallmark manifestations of a disease, condition, or health state, usually manifested as symptoms, signs, or physiological changes. Characteristics can be self-reported symptoms by patients (e.g., pain, fatigue) or signs discovered by doctors through examination (e.g., lumps, fever). Disease characteristics are the key basis for helping to diagnose and differentiate different diseases. Characteristics can also include genes, molecular markers, or imaging manifestations, which usually help further clinical judgment.

[0019] examine: Examination refers to a systematic evaluation of patients through various clinical methods in order to diagnose, monitor and evaluate the progression of a disease or the effectiveness of treatment. Examinations can be physical (such as physical examinations) or laboratory or imaging (such as blood tests, X-rays, MRIs, etc.). Examinations help doctors understand the patient's health status, identify potential pathological changes, and provide a basis for treatment decisions. Examinations usually include the following types: Physical examination: Assessment of the patient's physical condition through palpation, auscultation, and inspection.

[0020] Laboratory tests: Tests and analyses of samples of blood, urine, sputum, etc.

[0021] Imaging examination: Use imaging techniques such as X-ray, ultrasound, CT, MRI, etc. to check the condition of internal organs.

[0022] disease It can also be called diagnosis, which refers to the abnormality or disorder of the body's physiology, psychology or function, usually manifested as a group of abnormal symptoms, signs and / or biochemical indicators, which may be caused by infection, genetics, immune disorders, environmental factors, etc. Disease may affect one or more systems of the body, leading to the obstruction or damage of healthy functions, affecting the patient's quality of life and survival.

[0023] deal with Treatment, also known as treatment, refers to a series of medical interventions and means aimed at alleviating, curing or managing diseases to improve the patient's health. Treatment includes medication, surgery, physical therapy, psychotherapy, nutritional intervention, lifestyle changes and other methods. The purpose of treatment is to control symptoms, restore function or prevent further deterioration of the disease.

[0024] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the diagnosis and treatment path mining method based on Internet hospital conversation data in the embodiment of the present invention includes: Obtain medical conversation data and pre-process the data; Design instructions to guide the large language model to identify and label medical entities in doctor-patient dialogues, and assign a pre-set label to each medical entity; medical entities are subdivided into four categories in the present invention, namely: characteristics, examinations, diseases, and treatments; Analyze the contextual relationship between entities through a large language model and extract sub-chains with logical associations; Strictly review and filter the subchains according to logical rules to ensure their medical rationality and clinical significance; Integrate each sub-chain to generate a standardized diagnosis and treatment pathway.

[0025] In the data preprocessing stage, the doctor-patient dialogue data in the Internet hospital is firstly cleaned and denoised to ensure the accuracy and effectiveness of the subsequent analysis process. The main task of this stage is to remove redundant information and noise that are meaningless to the analysis, improve data quality, and ensure that the processed data can reflect the real doctor-patient interaction content. Specific operations include: Removing noise data: Identifying and eliminating irrelevant and unstructured content such as system prompts, meaningless pauses, repeated sentences, emoticons, and irrelevant topics through natural language processing technology; Removing sensitive information: In order to protect patient privacy and comply with laws and regulations, sensitive information involving personal privacy in doctor-patient dialogues (such as name, ID number, contact information, etc.) must be desensitized during the preprocessing process. Removing redundant information: Identifying and removing redundant information in doctor-patient dialogues. For example, for repeated consultation questions or situations where the same symptoms are asked multiple times, these duplicate items can be merged or filtered out to reduce information redundancy in the data set and ensure the efficiency and representativeness of the analysis. Through these cleaning and denoising steps, it is ensured that the final data set has high-quality language structure and medical relevance, providing reliable basic data for subsequent entity labeling, path mining, and in-depth analysis.

[0026] In the entity tagging stage, a large language model (LLM) is used to identify and annotate medical entities in the doctor-patient dialogue. This process aims to accurately extract key medical information from natural language text for further analysis and processing. Through the powerful reasoning ability of LLM, multiple medical entities in the text can be identified and a pre-set label can be assigned to each entity. Medical entities are subdivided into four categories in the present invention, namely: features, examinations, diseases and treatments. These categories cover various types of information commonly seen in medical dialogues, as follows: Features: refers to the symptoms, signs or other clinical manifestations described by the patient in the dialogue, such as headache, cough, fever, etc. Features are usually the initial clues for doctors to make a diagnosis. Examinations: include various medical examinations recommended by doctors to confirm or exclude a certain disease, such as blood tests, imaging examinations (such as X-rays, CT scans), physiological tests, etc. Disease: refers to the judgment of the disease or pathological state made by the doctor based on the patient's symptoms, signs and examination results, for example, pneumonia, diabetes, coronary heart disease, etc. Treatment: refers to the treatment plan recommended or implemented by the doctor based on the diagnosis results, including drug therapy, surgery, physical therapy, lifestyle adjustments, etc.

[0027] In the subchain extraction stage, the medical entities in the doctor-patient dialogue are first analyzed in depth through the large language model to explore the potential logical relationship between entities in the context. The model identifies the connection and dependency of entities and extracts subchains with semantic relevance between entities. Furthermore, the term normalization process is performed on the medical entities in the extracted subchains to unify similar or different medical terms into standardized expressions to reduce the diversity and complexity of language expression and improve the accuracy and consistency of subsequent analysis. During the processing, for those subchains that appear frequently, the system will retain one of them to avoid redundancy and ensure the simplicity and efficiency of data; for subchains with fewer repetitions, they are considered to represent individual-specific medical phenomena and may not have broad statistical significance, so they are filtered out. In order to ensure the rationality of this process, the system sets a filtering threshold to screen according to the frequency of subchain occurrence and the universality of the medical facts it represents, ensuring that the subchains that are finally retained have high representativeness and effectiveness, and avoiding the interference of individual anomalies on the analysis results.

[0028] In the review and filtering stage, the extracted subchains are strictly screened and filtered according to the preset prior rules. The core goal of this process is to ensure that the diagnosis and treatment paths finally mined are consistent with medical common sense and can reflect the real clinical diagnosis and treatment process. In order to achieve this goal, the present invention adopts a multi-dimensional rule filtering strategy, which mainly includes the constraint relationship within the process and the rationality test of the diagnostic logic. Specifically, the constraint set within the process is precisely defined as: C = {symptoms → examination, examination → disease, disease → treatment}. This constraint set reflects the typical diagnosis and treatment sequence in the medical field: first, the doctor is guided to examine by symptoms, then the disease diagnosis is made according to the examination results, and finally the treatment plan is formulated according to the diagnosis results. The application of filtering rules requires that the extracted subchains must follow this basic logic. In addition, the review and filtering stage also conducts an in-depth test on the rationality of the diagnostic logic. For example, with the support of the medical knowledge base and clinical guidelines, the system can identify and eliminate those subchains that do not conform to medical facts. For example, some sub-chains may show "symptoms → disease" without going through the necessary examination steps, or show "treatment → disease" and reverse the diagnosis and treatment process. These sub-chains will be considered inconsistent with reasonable medical diagnosis and treatment logic and will be filtered out.

[0029] In the subchain fusion stage, the present invention adopts a two-stage fusion strategy, through step-by-step reasoning and refined processing, to ensure that the final generated diagnosis and treatment path is both in line with medical logic and has a high degree of standardization. First, in the first stage of fusion, the disease is used as the core node for reasoning and connection, and the main chain is expanded to both ends as much as possible. The system merges the existing diagnosis and treatment chains to simplify the path and make the chain of each disease node more standardized and clear. In the second stage of fusion, the similarity between the isolated subchain entity and the main chain entity is first calculated. If the similarity exceeds the preset threshold, the large model is used to further determine whether the subchain can be fused with the main chain; otherwise, the subchain is discarded. For the retained isolated subchain, the similarity between the subchain node and the corresponding label node of the main chain is further calculated. When the similarity exceeds the threshold, it is handed over to the large model to determine whether the fusion can be completed. This process effectively eliminates the diagnosis and treatment paths with too strong individual specificity and converts them into standard paths that conform to general medical practices.

[0030] As a preferred method, the specific steps include: S1. In the data preprocessing stage, the doctor-patient conversation data in the Internet hospital is comprehensively cleaned and denoised, including removing noise data: identifying and eliminating irrelevant and unstructured content, such as system prompts, meaningless pauses, emoticons, and irrelevant topics; removing sensitive information: desensitizing sensitive information involving personal privacy in doctor-patient conversations (such as name, ID number, contact information, etc.); removing redundant information: identifying and removing redundant information in doctor-patient conversations, such as repeated consultation questions or multiple inquiries about the same symptoms; S11. Remove noise data such as emoticons, special symbols, garbled characters, etc. in the conversation; build a noise word list , remove the data in the noise vocabulary in the conversation through regular expressions, , in Represents the filtered conversation, represents the regular expression filtering noise, Represents the original conversation, Indicates to remove content. ; S12. Process sensitive information and use the open source entity recognition model (NER) for sensitive information detection to detect and replace sensitive information in the conversation. , in Indicates the conversation after processing sensitive information, replacing the identified sensitive entities to ensure anonymity; S13, remove redundant information, vectorize the dialogue between two adjacent sentences based on context similarity and calculate the cosine similarity, , in Indicates two adjacent conversations. express The cosine similarity of , it is determined to be redundant. In the present invention, it is set The value is 0.65.

[0031] S2. In the entity tagging stage, a prompt-based large language model (LLM) is used to identify and label medical entities in the doctor-patient dialogue; multiple medical entities in the text are identified based on LLM, and a pre-set label is assigned to each entity; medical entities are subdivided into four categories in the present invention, namely: characteristics, examinations, diseases and treatments; The prompt content is as follows: “You are a professional doctor, and your job is to add appropriate labels to medical entities in medical consultation dialogues; Please observe the following points: The label must be one of [characteristics, examination, disease, treatment], and other label contents are prohibited; Characteristics include symptoms, signs or other clinical manifestations, examinations include various medical examinations or tests, diseases refer to Western medical diseases, and treatments include medication, surgery, physical therapy, lifestyle adjustments, etc.

[0032] Add to the conversation in the form of <label> before the medical entity, such as 'I've been feeling a bit <characteristic> dizzy lately'; Each entity can only have one tag added to it; Here is an example: {dialogue} # Please add appropriate labels to the medical entities in the medical consultation dialogue according to the information provided. "; S3. In the subchain extraction stage, the potential logical relationship between entities in the context is mined through the large language model, the connection and dependency of entities are identified, and subchains with semantic relevance between entities are extracted; further, the medical entities in the subchains are extracted, and term normalization is performed to unify similar or different medical terms into standardized expressions; then, for subchains with a number of repetitions greater than a threshold, only one is retained; for subchains with a number of repetitions less than the threshold, they are considered to represent individual-specific medical phenomena and have no broad statistical significance, and are filtered out; S31. Use a large language model to mine the potential logical relationships between entities in context, identify the connections and dependencies between entities, and extract subchains with semantic associations between entities. The specific contents of prompt are as follows: “You are a professional doctor and your job is to identify and associate medical entities in medical consultation conversations; Please observe the following points: There will be a <label> annotation before the medical entity. You only need to identify the logical relationship of the entity after the label in the conversation; Identify the process relationship between entities and represent it as a chain of [<label A> entity A-<label B> entity B]. For example, in 'Patient: Doctor, I have a severe headache recently. What should I do? \nDoctor: Have you checked your blood pressure?', [<feature> headache-<check> blood pressure] should be extracted; The physical location where an entity appears often indicates a procedural relationship in the diagnosis and treatment process.

[0033] It is very important to consider whether your chain meets the logical relationship in the conversation and whether it conforms to medical common sense; Here is an example: {dialogue} # Please extract the entity subchain in the medical consultation dialogue based on the information provided. "; S32, dividing the entity set by label, and prompting the large model to merge terms in each entity set based on the instruction; for example, in the disease set, "knee arthritis" and "hip arthritis" will be merged into "osteoarthritis"; The specific contents of prompt are as follows: “You are a professional doctor and your job is to identify the medical entities in the list and combine them into a smaller list; Please observe the following points: The medical entities in the list are all nouns representing {label}; These entities may have the same meaning, but the nouns represent different situations. You can merge them, such as "knee arthritis" and "hip arthritis" will be merged into "osteoarthritis"; You can appropriately expand the scope of interpretation of nouns to improve your merging efficiency; The medical list is as follows: {list}” S33, based on the prompt model, unify the entity terms in the subchain into standardized expressions; The specific contents of prompt are as follows: "You are a professional doctor. Your job is to map the medical entities in the subchain into standardized expressions. Note that you can only choose the standardized representation that is closest to the entity in the current subchain from the given list. # Standardized representation list of {label 1}: {label 1_list} # Standardized representation list of {label2}: {label2_list} # Input: {Subchain to be converted} ##The following is a sample for your reference {Example}” S34. For subchains with a number of repetitions greater than the threshold, only one is retained; for subchains with a number of repetitions less than the threshold, they are considered to represent individual-specific medical phenomena without broad statistical significance and are filtered out.

[0034] S4. The present invention adopts a multi-dimensional rule filtering strategy, which mainly includes the constraint relationship within the process and the rationality check of the diagnostic logic. Define the constraint set within the process: , in, Indicates symptoms (Symptom), that is, the patient's complaints or manifestations. Indicates examination, including clinical examination, imaging examination, laboratory examination, etc. Indicates disease, a disease diagnosed through examination and analysis. Treatment refers to the intervention measures taken for the diagnosed disease, requiring the extracted subchain to follow one of the constraints. In addition, with the support of the medical knowledge base and clinical guidelines, the rationality of the diagnostic logic is deeply tested. Subchains that are inconsistent with medical facts are identified and eliminated.

[0035] S41. Define the constraints set within the process and verify whether the subchain complies with the constraints based on regular expressions. , in, represents the filtered subchain, Indicates filtering subchains that do not meet the constraints according to the regular expression. Indicates the subchain to be filtered. Represents a set of constraints.

[0036] S42. Use the instruction prompt big model to verify the subchain at the semantic and content level based on the process constraints and further combine with the medical knowledge base k: , in It is the reply of the big model. Represents the retrieval of knowledge from a medical knowledge base.

[0037] The specific contents of prompt are as follows: “You are a professional doctor. Your job is to judge whether the subchain conforms to medical facts. You will be given some relevant documents. Please refer to them and make a professional judgment. # Document {retrieved medical knowledge} # Input: {Subchain to be judged} ## Please judge whether this subchain is consistent with medical facts. Please note that the output can only be [Conform to / Not Conform to], and any redundant or erroneous output may cause the system to crash. ” S5. In the subchain fusion stage, a two-stage fusion strategy is adopted. In the first stage of fusion, the disease is used as the core node for reasoning connection, and the chain is expanded to the maximum extent possible at both ends to form a main chain. In the second stage of fusion, the similarity between the isolated subchain entity and the entity in the main chain is first calculated. If the similarity is greater than the threshold, the large model is used to further determine whether the subchain can be fused, otherwise the subchain is discarded; S51. Traverse the disease set, merge the examination-disease and disease-treatment sub-chains with the same disease, and then, based on the examination set, merge the feature-examination and examination-disease sub-chains with the same examination, to form a main chain from feature to examination, and then from examination to disease to treatment.

[0038] S52. For the remaining isolated subchains, first calculate the similarity between the nodes in the subchain and the nodes with corresponding labels in the main chain: , in represents the node in the subchain, Indicates that nodes with the same label in the main chain are linked if the similarity exceeds the threshold , the big model will determine whether the sub-chain can be merged with the main chain; if the similarity does not reach the threshold, the sub-chain will be directly discarded; in the present invention, here Set to 0.65; The specific contents of the large model prompt are as follows: “You are a professional doctor and your job is to determine whether the two strands can fuse; # Input: {Subchain 1 to be judged} {Subchain 2 at the access point in the main chain} ## Determine whether the two chains can be merged. Note that the output can only be [yes / no]. Any redundant or erroneous output may cause the system to crash. ” The above describes the diagnosis and treatment path mining method based on Internet hospital conversation data in an embodiment of the present invention. The following describes the diagnosis and treatment path mining device based on Internet hospital conversation data in an embodiment of the present invention: An embodiment of the present invention also provides an electronic device, which may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium may be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each module may include a series of instruction operations in the electronic device. Furthermore, the processor may be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the electronic device.

[0039] The electronic device may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the electronic device structure in this embodiment does not constitute a limitation on the electronic device, and may include more or fewer components, or combine certain components, or arrange components differently.

[0040] An embodiment of the present invention provides a structure of an electronic device, which may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) (for example, one or more processors) and memories, and one or more storage media for storing applications or data (for example, one or more mass storage devices). Among them, the memory and the storage medium can be short-term storage or permanent storage. The program stored in the storage medium may include one or more modules, each module may include a series of instruction operations in the electronic device. Furthermore, the processor can be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the electronic device.

[0041] The electronic device may also include one or more power supplies, one or more wired or wireless network interfaces, one or more input and output interfaces, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that the electronic device structure does not constitute a limitation on the electronic device, and may include more or less components than the aforementioned, or combine certain components, or arrange the components differently.

[0042] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the steps of the aforementioned method.

[0043] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0044] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0045] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A diagnosis and treatment path mining method based on Internet hospital conversation data, characterized in that: The following steps are involved: Obtain medical conversation data and pre-process the data; Design instructions to guide the large language model to identify and label medical entities in doctor-patient conversations, assigning each medical entity a pre-set label; medical entities are subdivided into four categories: characteristics, examinations, diseases, and treatments; Analyze the contextual relationship between entities through a large language model and extract sub-chains with logical associations; Strictly review and filter the subchains according to logical rules to ensure their medical rationality and clinical significance; Traverse the disease set, merge the examination-disease and disease-treatment sub-chains with the same disease, and then merge the feature-examination and examination-disease sub-chains with the same examination based on the examination set, forming a main chain from feature to examination, and then from examination to disease to treatment; For the remaining isolated sub-chains, the similarity between the nodes in the sub-chain and the nodes with corresponding labels in the main chain is first calculated. If the similarity exceeds the preset threshold, the large model will determine whether the sub-chain can be merged with the main chain; if the similarity does not reach the threshold, the sub-chain will be directly discarded; finally, a complete diagnosis and treatment process is formed.

2. According to claim 1, a diagnosis and treatment path mining method based on Internet hospital conversation data is characterized in that: The pre-processing comprises: Remove noisy data: Use natural language processing (NLP) technology to remove irrelevant content, including system prompts, meaningless pauses, repeated sentences, emoticons, and irrelevant topics; Remove sensitive information: Desensitize information involving patient privacy; Remove redundant information: merge repeated consultation questions or content that asks about the same symptoms multiple times; Standardized expression: unified format of medical terminology; Storage format optimization: Convert the cleaned data into a structured format.

3. According to claim 1, a diagnosis and treatment path mining method based on Internet hospital conversation data is characterized in that: The design instructions guide the large language model to identify and label medical entities in the doctor-patient dialogue and assign a pre-set label to each medical entity; including: Medical entities are divided into four categories: characteristics, examinations, diseases, and treatments; Characterized by: symptoms, signs or clinical manifestations, including at least headache and fever; Examinations are: medical examinations or tests, including at least blood tests and CT scans; Diseases are: diagnoses made by doctors, including at least pneumonia and diabetes; Treatment is: a treatment plan that includes at least medication, surgery, physical therapy, and lifestyle adjustments; Automatically extract medical entities from text using LLM; Assign a predefined label to each identified entity; Unify medical terms that are synonymous or have different expressions.

4. According to claim 1, a diagnosis and treatment path mining method based on Internet hospital conversation data is characterized in that: The process of analyzing the contextual relationship between entities through a large language model and extracting subchains with logical associations includes: Use the model to analyze the conversation context and identify the potential logical relationships between entities; Standardize similar or diversely expressed subchains, retain frequently occurring subchains, and filter low-frequency specific subchains; Set frequency thresholds to retain subchains that are broadly representative; Isolated subchains lacking statistical significance were removed.

5. According to claim 1, a diagnosis and treatment path mining method based on Internet hospital conversation data is characterized in that: The subchains are reviewed and filtered by logical rules to ensure their medical rationality and clinical significance, including: Define the constraint set C = {symptoms → examination, examination → disease, disease → treatment} to ensure that the subchain conforms to the medical diagnosis and treatment logic; Use medical knowledge base and clinical guidelines to verify the rationality of subchains; Remove the following abnormal subchains: Lack of inspection link: directly from "symptoms → disease".

6. A diagnosis and treatment path mining system based on Internet hospital conversation data, characterized in that: The system comprises: A preprocessing unit, which obtains medical conversation data and preprocesses the data; The entity tagging unit designs instructions to guide the large language model to identify and label medical entities in doctor-patient conversations, and assigns a pre-set label to each medical entity; medical entities are subdivided into four categories: characteristics, examinations, diseases, and treatments; The subchain extraction unit analyzes the contextual relationship between entities through a large language model and extracts subchains with logical associations; Review and Filter Unit: strictly review and filter the subchains according to logical rules to ensure their medical rationality and clinical significance; The subchain fusion unit traverses the disease set, fuses the examination-disease and disease-treatment subchains with the same disease, and then, based on the examination set, fuses the feature-examination and examination-disease subchains with the same examination, forming a main chain from feature to examination, and then from examination to disease to treatment; For the remaining isolated sub-chains, the similarity between the nodes in the sub-chain and the nodes with corresponding labels in the main chain is first calculated. If the similarity exceeds the preset threshold, the large model will determine whether the sub-chain can be merged with the main chain; if the similarity does not reach the threshold, the sub-chain will be directly discarded; finally, a complete diagnosis and treatment process is formed.

7. An electronic device, comprising a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory so that the electronic device executes each step of the diagnosis and treatment path mining method based on Internet hospital conversation data as described in any one of claims 1-5.

8. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the diagnosis and treatment path mining method based on Internet hospital conversation data as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Disease knowledge map construction method and platform system, device, and storage medium

    CN109271530A

  • Multimodal auxiliary disease diagnosis system and device based on knowledge reasoning

    CN116130091A

  • DRG high-compilation high-suit behavior identification method and device, electronic equipment and medium

    CN117786123A

  • Enterprise information processing method and device based on large language model, equipment and storage medium

    CN119293308A

  • System and method for extracting oncological information of prognostic significance from natural language

    US20180121618A1

Cited By

  • Medical behavior compliance auditing method and system based on AI model

    CN121122622A