Method and device for rapid retrieval and generation of medical diagnosis and treatment plans

By combining a knowledge base built on medical semantic segmentation with a large language model, the problem of low efficiency in medical diagnosis and treatment plan retrieval and generation is solved, achieving efficient and accurate diagnosis and treatment plan generation, adapting to complex and dynamic clinical scenarios, and ensuring the integrity of information and retrieval quality.

CN121434390BActive Publication Date: 2026-08-04GUANGZHOU HOPE BRIDGE COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU HOPE BRIDGE COMPUTER TECH CO LTD
Filing Date
2025-12-19
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

The existing medical diagnosis and treatment plan retrieval and generation processes are inefficient and of low quality, making it difficult to adapt to complex and dynamic clinical scenarios. Furthermore, the semantic incompleteness caused by information segmentation leads to erroneous or incomplete diagnosis and treatment suggestions generated by LLM.

Method used

By combining a knowledge base built on medical semantic segmentation with a large language model, and through collaborative optimization of retrieval rules and cross-modal alignment of medical terms, treatment plans can be generated quickly.

Benefits of technology

It improves the accuracy and efficiency of medical diagnosis and treatment plan retrieval and generation, reduces the complexity of hospital privatization retrieval and diagnosis processes, and ensures the integrity of medical logical units and retrieval quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121434390B_ABST
    Figure CN121434390B_ABST
Patent Text Reader

Abstract

The application discloses a kind of medical diagnosis and treatment scheme fast retrieval and generation method and device, to solve the technical problems that current medical diagnosis and treatment retrieval process is inefficient, retrieval quality is not high, it is difficult to generate effective diagnosis and treatment scheme.The method comprises: obtaining the diagnosis and treatment consultation information input by user, and extracting key medical information from diagnosis and treatment consultation information;According to key medical information, adopt collaborative optimization retrieval rule to retrieve diagnosis and treatment segmentation information from the knowledge base constructed based on medical semantic segmentation;Medical terminology cross-modal alignment is carried out to key medical information, and the type of recommended generation diagnosis and treatment scheme is obtained;According to diagnosis and treatment segmentation information, call pre-trained medical large language model to generate the medical diagnosis and treatment scheme corresponding to diagnosis and treatment scheme type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and healthcare technology, and in particular to a method for rapid retrieval and generation of medical treatment plans, a device for rapid retrieval and generation of medical treatment plans, an electronic device, and a storage medium. Background Technology

[0002] In the medical field, generating treatment plans is a key technology for improving medical efficiency and quality. Traditional medical information processing relies on doctors' clinical experience and manual review of medical literature. This approach is often inefficient and error-prone when faced with massive amounts of medical data and complex cases. With the rapid development of artificial intelligence technologies such as natural language processing, the retrieval and generation of medical treatment plans are gradually becoming more intelligent and automated.

[0003] In recent years, medical information processing technologies based on natural language processing and machine learning have made significant progress. These technologies can effectively analyze unstructured or semi-structured disease information, such as patients' chief complaints, present medical history, past medical history, physical examination results, and auxiliary examination results, and extract key features from them. These technologies not only improve doctors' work efficiency but also reduce errors in human judgment. Especially when general practitioners face complex or rare cases, AI-assisted systems can provide valuable reference information.

[0004] However, despite the achievements of AI technology in the medical field, many challenges remain in achieving rapid retrieval and generation of treatment plans. On the one hand, the efficiency and quality of retrieving treatment plans using a hospital's internal local knowledge base are low. The process of retrieving treatment plans based on a specific hospital's proprietary knowledge base is also highly complex. On the other hand, current retrieval rules are typically predefined, static if-then statements (e.g., IF gender = male THEN, prohibit cervical smears), which cannot adapt to complex and dynamically changing clinical scenarios. Furthermore, when segmenting information, fixed-length sliding windows are commonly used. This method ruthlessly fragments complete medical logical units. For example, a segment might begin with "Contraindications: Contraindicated in pregnant women" but be cut off before "Because this drug may cause fetal malformations." This fragmented information will seriously mislead the LLM (Large Language Model) and lead to the generation of incorrect or incomplete treatment recommendations. Simultaneously, due to the incomplete semantics of segmented content, highly similar but low-relevance segments may be matched during retrieval. For example, a search for "side effects of metformin" might return a section that only mentions the brand name "metformin" but whose main content describes "cardiovascular benefits," resulting in LLM receiving a large amount of irrelevant information. Summary of the Invention

[0005] This invention provides a method for rapid retrieval and generation of medical treatment plans, a device for rapid retrieval and generation of medical treatment plans, an electronic device, and a storage medium, which are used to solve or partially solve the technical problems of low efficiency, poor retrieval quality, and difficulty in generating effective treatment plans in the current medical treatment retrieval process.

[0006] This invention provides a method for rapid retrieval and generation of medical treatment plans, the method comprising:

[0007] Obtain medical consultation information input by the user, and extract key medical information from the medical consultation information;

[0008] Based on the key medical information, collaborative optimization retrieval rules are used to retrieve treatment segment information from a knowledge base constructed based on medical semantic segmentation;

[0009] Perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type;

[0010] Based on the diagnostic and treatment segmentation information, a pre-trained medical language model is invoked to generate a medical diagnostic and treatment plan corresponding to the diagnostic and treatment plan type.

[0011] Optionally, the knowledge base construction process includes:

[0012] Obtain a multimodal dataset; the multimodal dataset is formed by aggregating multiple pieces of diagnosis-related information uploaded by users;

[0013] For each piece of diagnosis and treatment related information, a pre-trained medical semantic boundary recognition model is used to identify the semantic boundary of the diagnosis and treatment related information, and based on the identified semantic boundary, at least one segmentation identifier is dynamically generated.

[0014] Based on the at least one segmentation identifier, the diagnosis and treatment related information is segmented according to semantic segmentation priority to obtain at least one original diagnosis and treatment segmentation information;

[0015] After semantic segmentation, all the original diagnosis and treatment segment information is first cleaned and then vectorized to obtain multiple diagnosis and treatment segment information corresponding to the multimodal dataset.

[0016] Optionally, the semantic segmentation priority includes a first semantic priority and a second semantic priority; the first semantic priority corresponds to semantic integrity; the second semantic priority corresponds to text length constraints; the step of segmenting the diagnosis-related information according to the at least one segmentation identifier and in combination with the semantic segmentation priority to obtain at least one original diagnosis-related segment information includes:

[0017] Based on the at least one segmentation identifier, the diagnosis and treatment related information is pre-segmented to obtain at least one pre-segmented piece of information;

[0018] Determine whether each piece of pre-segmented information satisfies the semantic integrity condition;

[0019] If not, the pre-segmented information that does not meet the semantic integrity condition is taken as the first segmented information, and the second segmented information that can form a semantically complete segment with the first segmented information is determined from the remaining pre-segmented information. The remaining segmented identifiers other than the segmented identifiers between the first segmented information and the second segmented information are used to segment the diagnosis and treatment related information to obtain at least one original diagnosis and treatment segmented information.

[0020] If so, determine whether the text length of each pre-segmented information meets the preset text length threshold;

[0021] When the text length of each pre-segmented information meets the preset text length threshold, all pre-segmented information is directly used as at least one original diagnosis and treatment segmented information of the diagnosis and treatment related information;

[0022] When the length of the pre-segmented text does not meet the preset text length threshold, the pre-segmented text that does not meet the preset text length threshold is used as the third segmented text, and the pre-segmented text that meets the preset text length threshold is used as the fourth segmented text.

[0023] Perform text length constraint processing on the third segment information to obtain at least one fifth segment information;

[0024] Integrate all the fourth segment information and all the fifth segment information to form at least one original diagnosis and treatment segment information of the diagnosis and treatment related information.

[0025] Optionally, performing text length constraint processing on the third segment information to obtain at least one fifth segment information includes:

[0026] The third segment information is labeled with entities, and the entity type of each entity is determined;

[0027] For each entity, the entity density value is calculated by combining the text length of the third segment information and the entity type;

[0028] The third segment information is labeled with medical semantic roles to obtain at least one key role type;

[0029] Based on the entity density value of each entity and the at least one key role type, the third segment information is divided into at least one core operation description and at least one explanatory text information.

[0030] Determine whether the length of each explanatory text message meets a preset text length threshold;

[0031] If so, then the at least one core operation description and the at least one explanatory text information are directly integrated as at least one fifth segment of the third segment information;

[0032] If not, then the explanatory text information whose text length does not meet the preset text length threshold will be further divided to obtain at least one secondary division text information.

[0033] Integrate all secondary segmented text information, all explanatory text information that has not been secondary segmented, and at least one core operation description information as at least one fifth segment information of the third segment information.

[0034] Optionally, retrieving diagnosis and treatment segmentation information from the knowledge base constructed based on medical semantic segmentation using collaborative optimization retrieval rules based on the key medical information includes:

[0035] From the knowledge base constructed based on medical semantic segmentation, at least one candidate diagnosis and treatment segment information with a relevance value greater than or equal to a preset relevance threshold is initially retrieved; each candidate diagnosis and treatment segment information corresponds to a rule priority.

[0036] Determine whether there are any conflicts in the rule priorities of each of the candidate diagnosis and treatment segment information;

[0037] If not, then the target treatment segment information with the highest relevance value under the premise of the highest rule priority is directly determined from the at least one candidate treatment segment information;

[0038] If so, then according to the rule priority from high to low, the candidate diagnosis and treatment segment information that conflict with each other is determined as high-level segment information and low-level segment information, and the conflicting content in the low-level segment information is covered by the high-level segment information to obtain the optimized segment information of the low-level segment information.

[0039] The target treatment segment with the highest relevance value under the premise of the highest rule priority is determined from the high-level segment information, the optimized segment information, and the remaining candidate treatment segment information that does not participate in the coverage of conflicting content;

[0040] By combining the key medical information, a collaborative triggering information chain for the target diagnosis and treatment segment information is constructed to obtain the final retrieved diagnosis and treatment segment information.

[0041] Optionally, the step of combining the key medical information to construct a collaborative triggering information chain for the target diagnosis and treatment segment information, and obtaining the final retrieved diagnosis and treatment segment information, includes:

[0042] Step S01: Based on the key medical information, match the initial rule when the target diagnosis and treatment segment information meets the collaborative triggering conditions from the pre-built rule base, and the rule association graph of the initial rule; the rule association graph includes multiple association rules in a progressive triggering order;

[0043] Step S02: Activate and execute the initial rule, and output the first action result;

[0044] Step S03: Extract an association rule sequentially from the rule association graph, and determine whether the association rule meets the corresponding triggering condition;

[0045] Step S04: If yes, activate and execute the association rule, output the second action result, and if there are still inactive association rules in the rule association graph, jump to step S03; if all association rules in the rule association graph have been activated, jump to step S05; if no, after outputting the third action result, jump to step S05.

[0046] Step S05: Integrate the first action result, all second action results, and the third action result in the output order to form a collaborative triggering information chain for the target diagnosis and treatment segment information;

[0047] Step S06: Integrate the target diagnosis and treatment segment information and the collaborative triggering information chain as the final retrieval output diagnosis and treatment segment information.

[0048] Optionally, the step of performing cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type includes:

[0049] By combining word segmentation and multi-granularity embedding, cross-modal alignment of medical terms is performed on the key medical information to generate first-granularity information at the level of words or entities, second-granularity information at the level of sentences, and third-granularity information at the level of paragraphs.

[0050] Based on a comprehensive analysis of the first granularity information, the second granularity information, and the third granularity information, the type of treatment plan recommended and generated by the key medical information is determined.

[0051] This invention also provides a device for rapid retrieval and generation of medical treatment plans, comprising:

[0052] An information extraction unit is used to acquire medical consultation information input by the user and extract key medical information from the medical consultation information;

[0053] The information retrieval unit is used to retrieve diagnosis and treatment segment information from a knowledge base constructed based on medical semantic segmentation according to the key medical information and by using collaborative optimization retrieval rules.

[0054] A cross-modal alignment unit is used to perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type;

[0055] The solution generation unit is used to generate a medical treatment solution corresponding to the treatment solution type by calling a pre-trained medical big language model based on the treatment segmentation information.

[0056] The present invention also provides an electronic device, the device comprising a processor and a memory:

[0057] The memory is used to store program code and transmit the program code to the processor;

[0058] The processor is used to execute the rapid retrieval and generation method of medical treatment plans as described above, according to the instructions in the program code.

[0059] The present invention also provides a computer-readable storage medium for storing program code for executing the rapid retrieval and generation method of medical treatment plans as described in any of the preceding claims.

[0060] As can be seen from the above technical solutions, the present invention has the following advantages:

[0061] This invention provides a rapid method for retrieving and generating medical treatment plans. It involves acquiring user-inputted medical consultation information and extracting key medical information from it; retrieving treatment segment information from a knowledge base built on medical semantic segmentation using collaborative optimization retrieval rules based on this key medical information; performing cross-modal alignment of medical terms on the key medical information to obtain recommended treatment plan types; and generating the corresponding medical treatment plan based on the treatment segment information using a pre-trained medical language model. This invention combines a knowledge base built on medical semantic segmentation with a large language model, and through the design of collaborative optimization retrieval rules and the integration of cross-modal alignment of medical terms, it rapidly retrieves and efficiently generates medical treatment plans based on key medical information. Using the technical solution provided by this invention not only improves the accuracy and effectiveness of medical treatment plan retrieval and generation but also reduces the complexity of private retrieval and treatment processes in hospitals. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0063] Figure 1 A flowchart illustrating the steps of a method for rapidly retrieving and generating medical treatment plans;

[0064] Figure 2 This is a schematic diagram illustrating the overall process of a method for rapidly retrieving and generating medical treatment plans.

[0065] Figure 3 This is a structural block diagram of a device for rapidly retrieving and generating medical treatment plans. Detailed Implementation

[0066] This invention provides a method for rapid retrieval and generation of medical treatment plans, a device for rapid retrieval and generation of medical treatment plans, an electronic device, and a storage medium, which are used to solve or partially solve the technical problems of low efficiency, poor retrieval quality, and difficulty in generating effective treatment plans in the current medical treatment retrieval process.

[0067] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0068] As an example, AI technology has achieved certain results in the medical field, but achieving rapid retrieval and generation of treatment plans still faces many challenges. On the one hand, the efficiency and quality of retrieving treatment plans using a hospital's internal local knowledge base are not high. The process of retrieving treatment plans based on a specific hospital's proprietary knowledge base is also quite complex. On the other hand, current retrieval rules are usually predefined, static if-then statements (e.g., IF gender = male THEN, prohibit cervical smears), which cannot adapt to complex and dynamically changing clinical scenarios. Furthermore, when segmenting information, fixed-length sliding windows are commonly used. This method ruthlessly breaks up complete medical logic units. For example, a segment might start with "Contraindications: Contraindicated in pregnant women," but be cut off before "Because this drug may cause fetal malformations." This fragmented information will seriously mislead LLMs and lead to the generation of incorrect or incomplete treatment recommendations. Simultaneously, due to the incomplete semantics of segmented content, highly similar but low-relevance segments may be matched during retrieval. For example, a search for "side effects of metformin" might return a section that only mentions the brand name "metformin" but whose main content describes "cardiovascular benefits," resulting in LLM receiving a large amount of irrelevant information.

[0069] Therefore, one of the core inventive points of this invention is to provide a rapid retrieval and generation method for medical treatment plans, addressing the shortcomings of current technologies. Based on ensuring complete medical logical units, it combines a knowledge base built on medical semantic segmentation with a large language model. Through the design of collaboratively optimized retrieval rules and the integration of cross-modal alignment of medical terms, it rapidly retrieves and efficiently generates medical treatment plans based on key medical information.

[0070] Reference Figure 1 The diagram illustrates a flowchart of a method for rapidly retrieving and generating medical treatment plans according to an embodiment of the present invention, which may specifically include the following steps:

[0071] Step 101: Obtain the medical consultation information input by the user, and extract key medical information from the medical consultation information;

[0072] In practical applications, when it is necessary to generate corresponding treatment plans for medical consultation issues, the system needs to obtain the medical consultation information input by the user (such as the doctor can input some basic medical record information of the patient based on actual consultation needs, as well as the key questions they want to consult, etc.). Then, it can automatically analyze keywords to extract key medical information from the input medical consultation information.

[0073] Step 102: Based on the key medical information, retrieve the diagnosis and treatment segment information from the knowledge base constructed based on medical semantic segmentation using collaborative optimization retrieval rules;

[0074] This step mainly uses the key medical information extracted in the previous steps to retrieve diagnosis and treatment segment information from the knowledge base built on medical semantic segmentation using collaborative optimization retrieval rules.

[0075] In some embodiments, the construction process of the knowledge base used in the embodiments of the present invention may include the following steps S11 to S14:

[0076] Step S11: Obtain the multimodal dataset; the multimodal dataset is formed by aggregating multiple diagnosis-related information uploaded by users;

[0077] By aggregating medical diagnosis and treatment-related information, multimodal datasets can be formed. Multimodal datasets contain diverse data types, including Word documents, Excel files, PDFs, and images.

[0078] Step S12: For each piece of diagnosis and treatment related information, a pre-trained medical semantic boundary recognition model is used to identify the semantic boundary of the diagnosis and treatment related information, and based on the identified semantic boundary, at least one segment identifier is dynamically generated.

[0079] Once a multimodal dataset is obtained, a segmentation pattern can be set for the dataset to improve the retrieval efficiency of the knowledge base. A good dataset segmentation pattern will affect the retrieval efficiency and quality of treatment plans.

[0080] Segmentation mode refers to dividing content into several independent segments according to rules. In practical applications, when a user enters medical consultation information, the system automatically analyzes the keywords in the consultation information and calculates the relevance of the keywords to the medical consultation segment information in the knowledge base. Then, based on the relevance ranking, the segment information with the highest relevance is selected and sent to a pre-trained large language model to assist it in processing and generating effective medical treatment plans.

[0081] In the application scenarios of medical diagnosis and treatment plans, "***" or " The segmentation identifier is shown below. An example of its application is as follows:

[0082] ***

[0083] I. Lifestyle Intervention

[0084] Dietary control

[0085] 1. Follow a low glycemic index (GI) diet, reducing refined sugar and saturated fat intake, and increasing dietary fiber (such as whole grains and vegetables). Control your total daily calorie intake; obese patients are advised to lose 5% to 10% of their body weight to improve insulin sensitivity.

[0086] Distribute your meals reasonably, avoid overeating, and consider consulting a nutritionist to develop a personalized plan.

[0087] Sports Management

[0088] 2. Engage in at least 150 minutes of moderate-intensity aerobic exercise (such as brisk walking or swimming) per week, combined with resistance training twice a week.

[0089] Avoid prolonged sitting; light activity after meals (such as a 10-minute walk) can help lower post-meal blood sugar.

[0090] ***

[0091] In this embodiment of the invention, a medical semantic segmentation algorithm is designed to segment medical diagnosis and treatment information. The general segmentation rule is as follows: segmentation is based on diagnostic and treatment logical units (such as "diagnostic criteria" → "treatment plan" → "complication management"). For example:

[0092] "##Diagnostic Criteria## / / Automatically generated structured tags"

[0093] [Required Tests] HbA1c + OGTT

[0094] [Supporting Check] C-peptide release test

[0095] Specifically, during the knowledge base construction phase, the diagnostic logic unit automatically analyzes the semantic content of the knowledge base uploaded by the user to form segmentation tags. Segmenting the knowledge base content semantically improves the accuracy of subsequent user queries. For example:

[0096] Knowledge Base for the Diagnosis and Treatment of Primary Hypertension (Segmented)

[0097] [Required Examinations] Clinic blood pressure (≥140 / 90 mmHg on 3 separate occasions), Ambulatory blood pressure monitoring (24-hour average ≥130 / 80 mmHg)

[0098] [Supporting Examinations] Complete blood count (to rule out anemia and hypertension), serum creatinine (to assess kidney damage), electrocardiogram (to rule out left ventricular hypertrophy)

[0099] To achieve the above content segmentation, this embodiment of the invention employs a multi-task sequence annotation model based on LLM (medical semantic boundary recognition model) to automatically identify semantic boundaries in diagnosis-related information (medical documents). This recognition model, trained on a massive amount of medical literature and clinical guidelines, can accurately identify the following boundaries:

[0100] Chapter titles: such as "Diagnostic Criteria", "Treatment Plan", "Follow-up Management", etc.

[0101] Key logical turning points: such as "however," "in addition," "it should be noted" often mark the beginning of a new argument.

[0102] List items and entries: Accurately identify numbered items such as "1." and "2.", and keep them within a single segment.

[0103] Specifically, this invention employs a medical knowledge-enhanced multi-task sequence annotation architecture, which differs from the single-sequence annotation of conventional LLM. Its specific architecture is as follows:

[0104] The model's bottom layer is a medical knowledge graph embedding layer. Entity embedding vectors from the medical knowledge graph (such as the vector corresponding to "diabetes" and the vector corresponding to "metformin") are integrated into the model's input layer. This allows the model to associate logical relationships between medical entities when identifying boundaries (e.g., "drug treatment" needs to be associated with the "indication-contraindication" relationship), rather than relying solely on text keywords.

[0105] The middle layer is a multi-task learning layer. It is mainly used for simultaneous training of boundary recognition tasks and medical logical classification tasks.

[0106] The boundary recognition task involves labeling "chapter title boundaries," "logical turning point boundaries," and "list item boundaries." For example, labeling "treatment plan" as a chapter title boundary, and the section after "however" as a logical turning point boundary. The medical logic classification task involves labeling the text blocks between boundaries with logical categories. Examples include "diagnostic basis," "drug usage," and "complication warning," thus linking boundary recognition with medical logic.

[0107] The top layer is the attention mechanism optimization layer. Its optimization purpose is to assign higher attention weights to medical entities in the text (such as drug names, examination items, and disease terms) and avoid interference with boundary judgment by non-medical words (such as "in summary" and "see below").

[0108] Based on the improved multi-task sequence labeling architecture, this invention also improves the model's training strategy.

[0109] In the pre-training phase, medical domain corpora (rather than general corpora) are used to incrementally pre-train the basic LLM (such as Llama 2-7B) so that the model can initially grasp the syntax and logic of medical texts (such as the medical expression paradigm of "starting dose 500mg daily").

[0110] The fine-tuning phase employs a "contrastive learning + difficult example mining" strategy. Specifically, contrastive learning involves constructing "positive samples (correctly labeled boundaries)" and "negative samples (incorrectly labeled boundaries, such as segmenting 'Contraindications: Contraindicated during pregnancy' into 'Contraindications: Pregnancy' and 'Contraindicated')" to allow the model to learn to distinguish between "semantic integrity boundaries" and "semantic break boundaries".

[0111] Unlike simple "*" or " "Identifiers: Based on the identified semantic structure, this invention can dynamically generate hierarchical identifiers with rich semantics. This is equivalent to assigning a 'structured label' to each segment."

[0112] For example, the identifier preceding a segment primarily identifies the topic and category of that segment. An example is shown below:

[0113] Metformin: First-line drug of choice. The starting dose is 500 mg daily, taken with meals. Common side effects are gastrointestinal reactions, which usually resolve on their own.

[0114] The segment identifier is mainly used to indicate the end of the segment and its relationship to the next segment. For example:

[0115] "***[Drug]: Metformin: First-line drug of choice."

[0116] ***[Usage]: The starting dose is 500 mg daily, taken with meals.

[0117] ***[Side effects]: Common side effects include gastrointestinal reactions, which usually resolve on their own.

[0118] Step S13: Based on at least one segmentation identifier and combined with semantic segmentation priority, segment the diagnosis and treatment related information to obtain at least one original diagnosis and treatment segmentation information.

[0119] To achieve more effective segmentation, this invention also combines length control with semantic analysis, providing a length control algorithm based on semantic priority coupling of the diagnosis and treatment process.

[0120] First semantic priority: ensuring semantic integrity. The model must first ensure that a complete medical logical unit (such as a complete "treatment plan" entry) must be within a segment.

[0121] Second semantic priority: text length constraint. If a medical logic unit is too long (such as a complex description of a "surgical procedure"), it needs to be segmented at explanatory text with low entity density, rather than being cut in the middle of sentences describing core operational steps.

[0122] The core operation steps are described in the example of “Step 3: Distinguish the judgment rules”, and the fragments describing the logical relationship of “diagnosis and treatment action-object-parameter” are also included (such as “intravenous infusion of insulin, starting dose 0.1U / kg / h”, which includes “intravenous infusion” (action), “insulin” (object) and “0.1U / kg / h” (parameter)).

[0123] Examples of explanatory text with low entity density include “Step 3: Distinguishing Judgment Rules”, and fragments used only to explain the reasons, background or precautions for the core steps (e.g., “can improve insulin sensitivity”, which contains only one entity, “insulin sensitivity”, and is used to explain the effect of weight loss).

[0124] The automatic differentiation between core operation step descriptions and explanatory text with low entity density can be achieved through the following steps:

[0125] The first step is medical entity recognition and density calculation.

[0126] For example, the **"Medical Entity Recognition Model (Baichuan-M2)"** is used to annotate the text segment information and output the type (such as "drug", "dosage", "examination item") and location of each entity.

[0127] The entity density value can be calculated as follows: Entity density = (Number of medical entities × Entity weight) / Text length (number of characters). Entity weights are assigned based on their medical importance (e.g., "Dosage" weight = 3; "Drug Name" weight = 2; "Physiological Indicator" weight = 2; "Explanatory Entities" (e.g., "Insulin Sensitivity") weight = 1).

[0128] Secondly, there is semantic role labeling.

[0129] Medical semantic role annotation was performed on the segmented text information. Four main roles were annotated: "core action", "action object", "action parameter", and "explanation".

[0130] The core actions include "taking", "infusion", "examination", and "surgery"; the objects of the actions include "medication", "examination items", and "lesions"; the action parameters include "dosage", "frequency", "time", and "concentration"; and the explanations include "can reduce side effects", "helps control blood sugar", and "avoid complications".

[0131] Then distinguish the judgment rules.

[0132] Specifically, a description of a core operation step is determined if any of the following conditions are met:

[0133] The entity density value is ≥0.05 (meaning that there is at least one high-weight entity per 20 characters) and includes a role with "core action + action object + action parameters".

[0134] Although the entity density value is <0.05, it belongs to the list item (such as "1. 150 minutes of aerobic exercise per week") and contains specific operational parameters (such as "150 minutes" and "per week").

[0135] If any of the following conditions are met, it is determined to be explanatory text with low entity density:

[0136] Entity density value < 0.03 (i.e., ≤ 1 low-weight entity per 33 characters).

[0137] Semantic roles can contain only "explanation" or "explanation + 1 low-weight entity" (e.g., "can improve insulin sensitivity", which contains "insulin sensitivity" (low-weight entity) + "explanation" role).

[0138] Based on the foregoing description, in a specific implementation, semantic segmentation priority can include a first semantic priority and a second semantic priority. The first semantic priority corresponds to semantic integrity. The second semantic priority corresponds to text length constraints. Therefore, the implementation process of segmenting diagnosis-related information according to at least one segmentation identifier and in conjunction with semantic segmentation priority to obtain at least one original diagnosis-related segment information can include: firstly, pre-segmenting the diagnosis-related information according to at least one segmentation identifier to obtain at least one pre-segmented piece of information; then, determining whether each pre-segmented piece of information satisfies the semantic integrity condition.

[0139] In one scenario, pre-segmented information may not meet the semantic integrity condition. In this case, the pre-segmented information that does not meet the semantic integrity condition can be used as the first segmented information. The second segmented information that can form a semantically complete segment with the first segmented information can be determined from the remaining pre-segmented information. The remaining segmented identifiers other than the segmented identifiers between the first and second segmented information are used to segment the diagnosis and treatment related information to obtain at least one original diagnosis and treatment segmented information.

[0140] In another scenario, each pre-segmented information satisfies the semantic integrity condition. In this case, it can be further determined whether the text length of each pre-segmented information meets the preset text length threshold.

[0141] When the text length of each pre-segmented information meets the preset text length threshold, all pre-segmented information is directly used as at least one original diagnosis and treatment segmented information of diagnosis and treatment related information.

[0142] When the length of pre-segmented information does not meet the preset text length threshold, the pre-segmented information whose text length does not meet the preset text length threshold is first used as the third segment information, and the pre-segmented information whose text length meets the preset text length threshold is used as the fourth segment information; then, text length constraint processing is performed on the third segment information to obtain at least one fifth segment information; then, all fourth segment information and all fifth segment information are integrated as at least one original diagnosis and treatment segment information of diagnosis and treatment related information.

[0143] Furthermore, the implementation process of performing text length constraint processing on the third segment information to obtain at least one fifth segment information may specifically include:

[0144] First, entity annotation is performed on the third segment information, and the entity type of each entity is determined;

[0145] For each entity, the entity density value is calculated by combining the text length and entity type of the third segment information;

[0146] Perform medical semantic role annotation on the third segment information to obtain at least one key role type;

[0147] Next, based on the entity density value of each entity and at least one key role type, the third segment information is divided into at least one core operation description and at least one explanatory text information.

[0148] Then determine whether the length of each explanatory text message meets the preset text length threshold;

[0149] In one scenario, the length of each explanatory text message meets the preset text length threshold. In this case, at least one core operation description message and at least one explanatory text message are directly integrated as at least one fifth segment message of the third segment message.

[0150] In another scenario, there is a situation where the length of the explanatory text information does not meet the preset text length threshold. In this case, the explanatory text information whose length does not meet the preset text length threshold is divided into at least one secondary division text information. All secondary division text information, all explanatory text information that has not been divided into secondary divisions, and at least one core operation description information are integrated as at least one fifth segment information of the third segment information.

[0151] Step S14: After completing semantic segmentation, clean all the original diagnosis and treatment segment information and then vectorize the data to obtain multiple diagnosis and treatment segment information corresponding to the multimodal dataset.

[0152] After semantic segmentation, all original diagnostic segment information is cleaned to remove meaningless characters from the dataset. Data quality is improved by deleting consecutive newline characters, tabs, and spaces.

[0153] Next, data vectorization is performed. Specifically, information from different "languages" (numerical values, text, images, etc.) is translated into the same "intermediate language" (a high-dimensional numerical vector space), and then compared within this common space to see if the information expresses similar meanings. Using an embedding model to convert segmented text blocks into numerical vectors can help to more effectively compress and store large amounts of text information, and also make the matching between user questions and text more accurate.

[0154] In addition to the segmentation mechanism described above, this invention also establishes an innovative retrieval rule. Specifically, there are specialized rules in the medical field. For example, male patients cannot generate examination items for female patients. Configuring these rules can improve the quality of treatment plans.

[0155] This invention designs a dynamic, collaborative, and evolvable rule engine system based on clinical context awareness. Its core innovation lies in upgrading rules from isolated "prohibition checks" to an "intelligent navigation system" that guides the entire diagnostic and treatment plan generation process. For example, currently, a search only yields the conclusion "cannot be checked for item xx," but this solution, by setting a collaborative triggering mechanism for search rules, can trigger suggestions for the next action based on the current search results. Through layered nested triggers, a collaborative triggering action information chain is formed, thereby achieving a more complete guided search and improving the level of diagnostic and treatment automation.

[0156] The rule engine system provides a multi-dimensional clinical context awareness and rule triggering mechanism. This rule engine integrates multi-dimensional clinical context, and the rule triggering conditions far exceed single-variable judgments.

[0157] Table 1: Examples of Multidimensional Clinical Contexts

[0158]

[0159] There are correlations between the various dimensions, so as to determine whether the rules are being followed by multiple dimensions such as the patient's basic information, examination and test information, history of adverse drug reactions, treatment compliance, and current diagnosis and treatment process.

[0160] Secondly, the rule engine system also provides a rule collaboration and priority conflict resolution mechanism. Specifically, this engine introduces a rule priority matrix and a collaboration trigger chain to ensure the orderly operation of the rule system.

[0161] Rule priority matrix: Rules are assigned different priorities (e.g., taboo (highest) > warning > suggestion > hint (lowest)). When two rules conflict in priority, the higher-priority rule can override the conflicting part of the lower-priority rule.

[0162] For example, suppose a recommended rule is retrieved, the content of which includes "SGLT2 inhibitors are recommended to protect the cardiovascular system". If there is a conflict or contradiction with the content retrieved by other rules of priority, this rule information may be overridden by a higher priority contraindication rule "patients with eGFR <45 should not use SGLT2 inhibitors".

[0163] For conflicting information with the same rule priority, different conflict handling methods can be set according to the severity of the rule priority. For example, for two rule information with the same high priority, the more reasonable rule content can be selected for output after comprehensive analysis. For two rule information with the same low priority, the decision on whether to trigger the rule can be made after comprehensive analysis and manual judgment (such as pre-setting both to trigger or neither to trigger, or allowing the user to choose whether to trigger the rule through manual interaction) and then output.

[0164] For example, for two contraindication rules, "Amoxicillin is contraindicated for patients with penicillin allergy" (the patient has a history of penicillin allergy, and the match rate is 100%) and "Amoxicillin is contraindicated for patients with liver failure" (the patient has normal liver function, and the match rate is 0%), the analysis will prioritize outputting "Amoxicillin is contraindicated for patients with penicillin allergy".

[0165] For two suggested rules, you can manually set whether to trigger them, or you can set them to trigger automatically at the same time. For example, "suggestion of dietary control" and "suggestion of probiotic supplementation".

[0166] Considering that the triggering of a rule can lead to a series of associated rules and actions, this invention, after retrieving the necessary diagnostic and treatment segment information, forms a clinical decision-making path by setting up a collaborative triggering action chain mechanism.

[0167] The following is an example of a collaboratively triggered action chain:

[0168] / / 1. Triggering of the primary taboo rule

[0169] if (drugs.contains("metformin") && diagnosis.contains("DKA (diabetic ketoacidosis)")) {

[0170] Action executed: Disable("metformin"); / / Trigger action A

[0171] Execution action: Activate rule("Emergency Insulin Dosing Rule"); / / Trigger action B: Activate deeper rule}

[0172] / / 2. Activated deep rules continue to execute.

[0173] if (rule("Emergency Insulin Dosing Rule").Activated && Blood Glucose Value > 16.7) {

[0174] Action to be performed: Recommended ("Intravenous insulin pump infusion");

[0175] Action executed: Add additional test items ("blood ketones, arterial blood gas analysis"); / / Trigger action C

[0176] }

[0177] Through this collaborative triggering chain mechanism, the clinical thought process of senior doctors can be simulated, thereby achieving a leap from "what cannot be done" to "what should be done now".

[0178] More specifically, the detailed implementation process of collaborative triggering can be divided into the following five steps:

[0179] Step 1: Rule predefinition and association graph construction

[0180] Each rule needs to define three elements in the rule base: triggering condition (e.g., "drug = metformin AND diagnosis = DKA"), execution action (e.g., "disable metformin" "activate associated rule ID: R001"), and associated rule ID (e.g., associated with "emergency insulin medication rule", ID is R001).

[0181] A relationship graph is constructed based on the rules. For example, “Metformin Contraindication Rule (R000)” → “Emergency Insulin Use Rule (R001)” → “Blood Ketone Monitoring Rule (R002)” → “Insulin Dosage Adjustment Rule (R003)”, forming a chain relationship.

[0182] Step 2: Activating the initial rules

[0183] Input: Patient context information from key medical information (e.g., "Diagnosis = DKA, Medication = Metformin, Blood Glucose = 20 mmol / L"); Matching: The rule engine traverses the rule base and matches the initial rule that meets the triggering condition (e.g., R000: "Medication = Metformin AND Diagnosis = DKA"); Activation: Set the status of R000 to "Activated" and enter the execution phase.

[0184] Step 3: Initial rule execution and association rule activation

[0185] Execute the action of the initial rule (R000): Execute "Disable metformin" (output action result); read "Associated rule ID: R001", and check the triggering conditions of R001 (such as "Rule R001 is activated AND blood glucose > 16.7 mmol / L").

[0186] Activate association rule: If the triggering condition of R001 is met (e.g., patient blood glucose = 20mmol / L > 16.7), set the status of R001 to "activated" and enter the execution phase.

[0187] Step 4: Chain-based collaborative triggering

[0188] Execute the action of the association rule (R001): Execute "Recommended intravenous insulin infusion" (output action result); read "Association rule ID: R002", and check the triggering conditions of R002 (such as "Rule R001 has been executed AND blood ketones not monitored").

[0189] Activate deep association rule: If the triggering condition of R002 is met, set the status of R002 to "activated", execute the "add blood ketone test" action, and activate its association rule R003 ("insulin dose adjustment rule").

[0190] Repeat this step until the next "Association Rule ID" of a certain association rule in the rule chain is empty (i.e. there are no subsequent association rules), or the triggering condition of the association rule is not met (e.g., the triggering condition "blood ketones > 3 mmol / L" of R003 is not met, so there is no need to adjust the insulin dose).

[0191] Step 5: Trigger termination and output results

[0192] Termination conditions: There is no corresponding associated rule for the current rule, or the triggering condition of the associated rule is not met, or the treatment endpoint is reached (e.g., "When blood glucose drops below 10 mmol / L, terminate the insulin infusion rule").

[0193] Output: Outputs the action results of all executed rules in the order of triggering, forming a collaborative triggering action chain. Example follows:

[0194] "Metformin (R000) is prohibited."

[0195] Intravenous insulin infusion is recommended (R001);

[0196] Additional blood ketone test (R002);

[0197] Blood ketone levels are normal; no insulin dose adjustment is required (R003 was not performed).

[0198] Based on the preceding discussion, in practical applications, the implementation process of retrieving diagnosis and treatment segmentation information from a knowledge base constructed based on medical semantic segmentation using collaborative optimization retrieval rules, according to key medical information, may specifically include the following steps S21 to S24:

[0199] Step S21: Initially retrieve at least one candidate diagnosis and treatment segment from the knowledge base constructed based on medical semantic segmentation, where the relevance value between the segment and the key medical information is greater than or equal to a preset relevance threshold; each candidate diagnosis and treatment segment corresponds to a rule priority.

[0200] Step S22: Determine whether there are any conflicts in the rule priorities of each candidate diagnosis and treatment segment information;

[0201] Step S23: If not, directly determine the target diagnosis and treatment segment information with the highest relevance value under the premise of the highest rule priority from at least one candidate diagnosis and treatment segment information;

[0202] If so, then according to the rule priority from high to low, the candidate diagnosis and treatment segment information that conflict with each other is determined as high-level segment information and low-level segment information, and the conflicting content in the low-level segment information is covered by the high-level segment information to obtain the optimized segment information of the low-level segment information; from the high-level segment information, the optimized segment information, and the remaining candidate diagnosis and treatment segment information that did not participate in the coverage of conflicting content, the target diagnosis and treatment segment information with the highest relevance value under the premise of the highest rule priority is determined;

[0203] Step S24: Combine key medical information to construct a collaborative triggering information chain for the target diagnosis and treatment segment information, and obtain the final retrieval output of the diagnosis and treatment segment information.

[0204] Furthermore, by combining key medical information, a collaborative triggering information chain for target diagnosis and treatment segment information is constructed to obtain the final retrieved diagnosis and treatment segment information. The implementation process may include steps S01 to S06:

[0205] Step S01: Based on key medical information, match the initial rule when the target diagnosis and treatment segment information meets the collaborative triggering conditions from the pre-built rule base, as well as the rule association graph of the initial rule; the rule association graph includes multiple association rules in a progressive triggering order;

[0206] Step S02: Activate and execute the initial rule, and output the result of the first action;

[0207] Step S03: Extract an association rule from the rule association graph in sequence, and determine whether the association rule meets the corresponding triggering condition;

[0208] Step S04: If yes, activate and execute the association rule, output the second action result, and if there are still inactive association rules in the rule association graph, jump to step S03; if all association rules in the rule association graph have been activated, jump to step S05; if no, after outputting the third action result, jump to step S05.

[0209] Step S05: Integrate the first action result, all second action results, and third action results in the output order as a collaborative triggering information chain for the target diagnosis and treatment segment information;

[0210] Step S06: Integrate the target diagnosis and treatment segment information and the collaborative triggering information chain as the diagnosis and treatment segment information in the final retrieval output.

[0211] Step 103: Perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type;

[0212] Building upon the foregoing, this invention also provides a cross-modal alignment mechanism for medical terminology. For example, aligning the numerical value HbA1c=9.0% with the text "poor blood sugar control." The underlying mathematical principle is as follows:

[0213]

[0214] Table 2: Explanation of Formula Parameters for Cross-Modal Alignment

[0215]

[0216] Table 3: Examples of Dynamic Weights in Medical Scenarios

[0217]

[0218] in,

[0219] For example, suppose the medical record segment corresponding to the key medical information is: "Patient, male, 65 years old, with a 10-year history of type II diabetes, poor blood glucose control (reported irregular medication). In the past week, he has experienced increased thirst, polyuria, and fatigue. Physical examination: alert, poor mental state. Laboratory: HbA1c 9.0%, random blood glucose 15.8 mmol / L."

[0220] By using word segmentation to achieve multi-granularity embedding, the following granularity information can be generated:

[0221] The first-level information corresponding to the fine-grained (word / entity) is: "male", "type II diabetes", "poor blood sugar control", "irregular medication", "excessive thirst", "excessive urination", "worsening fatigue", "HbA1c 9.0%", "random blood glucose 15.8 mmol / L", "clear-headed, poor mental state".

[0222] The second granularity information corresponding to the medium granularity (sentence): "In the past week, polydipsia, polyuria, and fatigue have worsened" (describe new symptoms); "Laboratory: HbA1c 9.0%, random blood glucose 15.8 mmol / L" (provide objective evidence).

[0223] The third level of information corresponding to the coarse-grained (paragraph) is: an overall description of an elderly diabetic patient with poor adherence, which leads to worsening blood sugar and the appearance of typical hyperglycemic symptoms and signs.

[0224] The comprehensive analysis process for the above granularity information is as follows:

[0225] Preliminary understanding: This is a case about poorly controlled diabetes in a man.

[0226] Key symptoms: Focusing on fine-grained terms such as "excessive thirst," "excessive urination," and "worsening fatigue" and medium-grained phrases such as "worsening in the past week," confirmed acute exacerbation.

[0227] Key reason: Focusing on the fine-grained phrase "irregular medication" and the document background "10-year history, poor control", the adherence problem was identified.

[0228] Key evidence: Strong focus on fine-grained values ​​“HbA1c 9.0%” and “random blood glucose 15.8 mmol / L” and medium-grained phrase “laboratory…”, providing biochemical support.

[0229] Overall condition: Note the phrase "clear-headed but mentally weak," reflecting the impact of the illness on the general condition.

[0230] Thus, through this fused final representation rich in multi-granular information, the type of recommended treatment plan can be determined for use by downstream tasks. For example, automatically generating a treatment plan such as "Type 2 Diabetes Treatment Plan".

[0231] Based on the above, in practical applications, the process of performing cross-modal alignment of medical terms on key medical information to obtain the recommended treatment plan type can include: combining word segmentation and multi-granularity embedding to perform cross-modal alignment of medical terms on key medical information, generating first-granularity information at the level of words or entities, second-granularity information at the level of sentences, and third-granularity information at the level of paragraphs; and performing comprehensive analysis based on the first-granularity information, second-granularity information, and third-granularity information to determine the recommended treatment plan type for the key medical information.

[0232] Step 104: Based on the diagnosis and treatment segmentation information, call the pre-trained medical big language model to generate the medical diagnosis and treatment plan corresponding to the diagnosis and treatment plan type.

[0233] Once the diagnostic segmentation information and the type of diagnostic and treatment plan are obtained through rapid retrieval, the corresponding medical diagnostic and treatment plan can be generated by calling the pre-trained Large Language Model (LLM).

[0234] This invention provides a method for rapid retrieval and generation of medical treatment plans. Based on ensuring complete medical logical units, it combines a knowledge base built on medical semantic segmentation with a large language model. Through the design of collaboratively optimized retrieval rules and the integration of cross-modal alignment of medical terminology, it rapidly retrieves and efficiently generates medical treatment plans based on key medical information. Using the technical solution provided by this invention not only improves the accuracy and effectiveness of medical treatment plan retrieval and generation but also reduces the complexity of private retrieval and treatment processes in hospitals.

[0235] For better illustration, refer to Figure 2 This diagram illustrates the overall flow of a method for rapidly retrieving and generating medical treatment plans according to an embodiment of the present invention. It should be noted that this embodiment only provides a brief overview of the general process of rapidly retrieving and generating medical treatment plans. The specific implementation process of each step can be understood by referring to the relevant content in the foregoing embodiments, and will not be elaborated upon here. It is understood that the present invention does not impose any limitations on this.

[0236] The first step is the process of building the knowledge base and setting up retrieval rules, including:

[0237] A multimodal dataset is generated by aggregating multiple pieces of diagnosis and treatment-related information uploaded by users.

[0238] By combining medical semantic boundary recognition and semantic segmentation priority, multiple pieces of diagnosis and treatment related information in the dataset are segmented into multiple original diagnosis and treatment segment information;

[0239] All original diagnostic and treatment segment information is first cleaned and then vectorized to obtain multiple diagnostic and treatment segment information corresponding to the multimodal dataset.

[0240] Based on this diagnostic and treatment segmentation information, collaborative optimization retrieval rules are set up so that in subsequent practical applications, information retrieval can be carried out using collaborative optimization retrieval rules to obtain the required diagnostic and treatment segmentation information.

[0241] Secondly, the user interaction process in actual applications includes:

[0242] Obtain medical consultation information input by the user;

[0243] Key medical information is extracted from medical consultation information based on keyword analysis.

[0244] Based on key medical information and relevance calculations, collaborative optimization retrieval rules are used to retrieve the most relevant diagnosis and treatment segment information from the knowledge base.

[0245] Cross-modal alignment of key medical information with medical terminology is performed to obtain the recommended treatment plan types;

[0246] In the cross-modal alignment of medical terms, word segmentation and multi-granularity embedding are combined to perform cross-modal alignment of key medical information, generating fine-grained information at the word or entity level, medium-grained information at the sentence level, and coarse-grained information at the paragraph level. Based on the comprehensive analysis of the fine-grained, medium-grained, and coarse-grained information, the type of treatment plan recommended for the key medical information is determined. The comprehensive analysis includes focusing on key symptoms, focusing on key evidence, and overall status analysis.

[0247] Finally, based on the diagnosis and treatment segmentation information, a pre-trained medical language model is invoked to generate the medical diagnosis and treatment plan corresponding to the diagnosis and treatment plan type.

[0248] Reference Figure 3 The diagram illustrates a structural block diagram of a rapid retrieval and generation device for medical diagnosis and treatment plans provided by an embodiment of the present invention, which may specifically include:

[0249] The information extraction unit 301 is used to obtain the medical consultation information input by the user and extract key medical information from the medical consultation information;

[0250] The information retrieval unit 302 is used to retrieve diagnosis and treatment segment information from a knowledge base constructed based on medical semantic segmentation according to the key medical information and by adopting collaborative optimization retrieval rules.

[0251] The cross-modal alignment unit 303 is used to perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type;

[0252] The scheme generation unit 304 is used to generate a medical treatment scheme corresponding to the type of treatment scheme by calling a pre-trained medical big language model based on the treatment segmentation information.

[0253] In one optional embodiment, the apparatus further includes a knowledge base construction unit, the knowledge base construction unit comprising:

[0254] The dataset acquisition unit is used to acquire a multimodal dataset; the multimodal dataset is formed by aggregating multiple diagnosis-related information uploaded by users;

[0255] The segment identifier generation unit is used to identify the semantic boundary of each piece of diagnosis and treatment related information using a pre-trained medical semantic boundary recognition model, and dynamically generate at least one segment identifier based on the identified semantic boundary.

[0256] The segmentation processing unit is used to segment the diagnosis and treatment related information according to the at least one segmentation identifier and in combination with semantic segmentation priority, so as to obtain at least one original diagnosis and treatment segmentation information.

[0257] The data vectorization unit is used to perform data cleaning and then data vectorization on all the original diagnosis and treatment segment information after semantic segmentation, so as to obtain multiple diagnosis and treatment segment information corresponding to the multimodal dataset.

[0258] In one optional embodiment, the semantic segmentation priority includes a first semantic priority and a second semantic priority; the first semantic priority corresponds to semantic integrity; the second semantic priority corresponds to text length constraints; the segmentation processing unit includes:

[0259] A pre-segmentation unit is used to pre-segment the diagnosis-related information according to the at least one segmentation identifier to obtain at least one pre-segmentation information.

[0260] A semantic integrity determination unit is used to determine whether each piece of pre-segmented information satisfies the semantic integrity condition;

[0261] The segmentation processing subunit is used to, when there is pre-segmented information that does not meet the semantic integrity condition, take the pre-segmented information that does not meet the semantic integrity condition as the first segmented information, and determine the second segmented information that can form a semantically complete segment with the first segmented information from the remaining pre-segmented information. The remaining segmented identifier other than the segmented identifier between the first segmented information and the second segmented information is used to segment the diagnosis and treatment related information to obtain at least one original diagnosis and treatment segmented information.

[0262] The text length determination unit is used to determine whether the text length of each pre-segmented information meets the preset text length threshold when each pre-segmented information satisfies the semantic integrity condition.

[0263] The original diagnosis and treatment segmentation information direct determination unit is used to directly use all the pre-segmentation information as at least one piece of original diagnosis and treatment segmentation information of the diagnosis and treatment related information when the text length of each piece of pre-segmentation information meets the preset text length threshold.

[0264] The pre-segmentation information further definition unit is used to, when the length of the pre-segmentation information does not meet the preset text length threshold, use the pre-segmentation information whose text length does not meet the preset text length threshold as the third segmentation information, and use the pre-segmentation information whose text length meets the preset text length threshold as the fourth segmentation information;

[0265] A text length constraint processing unit is used to perform text length constraint processing on the third segment information to obtain at least one fifth segment information;

[0266] The segmented information integration unit is used to integrate all the fourth segmented information and all the fifth segmented information as at least one original diagnostic and treatment segmented information of the diagnostic and treatment related information.

[0267] In one optional embodiment, the text length constraint processing unit includes:

[0268] An entity annotation unit is used to annotate the third segment information and determine the entity type of each entity.

[0269] An entity density value calculation unit is used to calculate the entity density value of each entity by combining the text length of the third segment information and the entity type.

[0270] The medical semantic role labeling unit is used to label the third segment information with medical semantic roles to obtain at least one key role type.

[0271] The information segmentation unit is used to divide the third segment information into at least one core operation description information and at least one explanatory text information according to the entity density value of each entity and the at least one key role type.

[0272] The segmented information text length judgment unit is used to determine whether the text length of each piece of explanatory text information meets the preset text length threshold.

[0273] The fifth segment information direct integration unit is used to directly integrate the at least one core operation description information and the at least one explanatory text information as at least one fifth segment information of the third segment information when the text length of each explanatory text information meets the preset text length threshold.

[0274] The secondary division unit is used to perform secondary division on the explanatory text information whose text length does not meet the preset text length threshold when there is explanatory text information whose text length does not meet the preset text length threshold, so as to obtain at least one secondary division text information.

[0275] The fifth segment information integration unit is used to integrate all secondary segmented text information, all explanatory text information that has not been secondary segmented, and the at least one core operation description information as at least one fifth segment information of the third segment information.

[0276] In one optional embodiment, the information retrieval unit 302 includes:

[0277] The preliminary retrieval unit is used to initially retrieve at least one candidate diagnosis and treatment segment information from the knowledge base constructed based on medical semantic segmentation, where the relevance value between the candidate diagnosis and treatment segment information and the key medical information is greater than or equal to a preset relevance threshold; each candidate diagnosis and treatment segment information corresponds to a rule priority.

[0278] The priority conflict judgment unit is used to determine whether there is a conflict between the rule priorities of each of the candidate diagnosis and treatment segment information;

[0279] The first unit for determining target treatment segment information is used to directly determine the target treatment segment information with the highest relevance value from the at least one candidate treatment segment information when there is no conflict between the rule priorities of each candidate treatment segment information.

[0280] The conflict content coverage unit is used to determine the conflicting candidate diagnosis and treatment segment information as high-level segment information and low-level segment information according to the rule priority from high to low when there are conflicting rule priorities among the candidate diagnosis and treatment segment information. The high-level segment information is then used to cover the conflicting content in the low-level segment information to obtain the optimized segment information of the low-level segment information.

[0281] The second unit for determining target treatment segment information is used to determine the target treatment segment information with the highest relevance value under the premise of the highest rule priority from the high-level segment information, the optimized segment information, and the remaining candidate treatment segment information that does not participate in the coverage of conflicting content;

[0282] The collaborative triggering information chain construction unit is used to combine the key medical information to construct the collaborative triggering information chain of the target diagnosis and treatment segment information, and obtain the diagnosis and treatment segment information of the final retrieval output.

[0283] In one optional embodiment, the collaborative triggering information chain construction unit is specifically used to perform the following steps S01 to S06:

[0284] Step S01: Based on the key medical information, match the initial rule when the target diagnosis and treatment segment information meets the collaborative triggering conditions from the pre-built rule base, and the rule association graph of the initial rule; the rule association graph includes multiple association rules in a progressive triggering order;

[0285] Step S02: Activate and execute the initial rule, and output the first action result;

[0286] Step S03: Extract an association rule sequentially from the rule association graph, and determine whether the association rule meets the corresponding triggering condition;

[0287] Step S04: If yes, activate and execute the association rule, output the second action result, and if there are still inactive association rules in the rule association graph, jump to step S03; if all association rules in the rule association graph have been activated, jump to step S05; if no, after outputting the third action result, jump to step S05.

[0288] Step S05: Integrate the first action result, all second action results, and the third action result in the output order to form a collaborative triggering information chain for the target diagnosis and treatment segment information;

[0289] Step S06: Integrate the target diagnosis and treatment segment information and the collaborative triggering information chain as the final retrieval output diagnosis and treatment segment information.

[0290] In one alternative embodiment, the cross-modal alignment unit 303 includes:

[0291] The multi-dimensional granular information generation unit allows users to combine word segmentation and multi-granular embedding to perform cross-modal alignment of medical terms on the key medical information, generating first-granular information at the word or entity level, second-granular information at the sentence level, and third-granular information at the paragraph level.

[0292] The comprehensive analysis unit is used to perform comprehensive analysis based on the first granularity information, the second granularity information, and the third granularity information to determine the type of treatment plan recommended and generated by the key medical information.

[0293] As the device embodiment is basically similar to the method embodiment, it is described in a relatively simple way. For relevant details, please refer to the description of the method embodiment above.

[0294] It should be noted that, in order to enable those skilled in the art to better distinguish data of the same type but with different actual meanings, the embodiments of the present invention use terms such as "first" and "second" to distinguish and describe some technical features. The terms "first" and "second" are used only for data differentiation and have no other special meanings. It is understood that the present invention does not impose any limitations on them.

[0295] This invention also provides an electronic device, which includes a processor and a memory:

[0296] The memory is used to store program code and transfer the program code to the processor;

[0297] The processor is used to execute the rapid retrieval and generation method of medical diagnosis and treatment plan according to the instructions in the program code of any embodiment of the present invention.

[0298] This invention also provides a computer-readable storage medium for storing program code, which is used to execute a method for rapidly retrieving and generating medical treatment plans according to any embodiment of this invention.

[0299] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0300] In the embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

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

[0302] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0303] If the integrated unit is implemented as 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0304] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for quick retrieval and generation of medical diagnosis and treatment plans, characterized in that, include: Obtain medical consultation information input by the user, and extract key medical information from the medical consultation information; Based on the key medical information, collaborative optimization retrieval rules are used to retrieve treatment segment information from a knowledge base constructed based on medical semantic segmentation; Perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type; Based on the diagnostic and treatment segmentation information, a pre-trained medical big language model is invoked to generate a medical diagnostic and treatment plan corresponding to the diagnostic and treatment plan type; The step of retrieving treatment segment information from a knowledge base constructed based on medical semantic segmentation using collaborative optimization retrieval rules based on the key medical information includes: From the knowledge base constructed based on medical semantic segmentation, at least one candidate diagnosis and treatment segment information with a relevance value greater than or equal to a preset relevance threshold is initially retrieved; each candidate diagnosis and treatment segment information corresponds to a rule priority. Determine whether there are any conflicts in the rule priorities of each of the candidate diagnosis and treatment segment information; If not, then the target treatment segment information with the highest relevance value under the premise of the highest rule priority is directly determined from the at least one candidate treatment segment information; If so, then according to the rule priority from high to low, the candidate diagnosis and treatment segment information that conflict with each other is determined as high-level segment information and low-level segment information, and the conflicting content in the low-level segment information is covered by the high-level segment information to obtain the optimized segment information of the low-level segment information. The target treatment segment with the highest relevance value under the premise of the highest rule priority is determined from the high-level segment information, the optimized segment information, and the remaining candidate treatment segment information that does not participate in the coverage of conflicting content; By combining the key medical information, a collaborative triggering information chain for the target diagnosis and treatment segment information is constructed to obtain the final retrieved diagnosis and treatment segment information.

2. The method of claim 1, wherein, The construction process of the knowledge base includes: Obtain a multimodal dataset; the multimodal dataset is formed by aggregating multiple pieces of diagnosis-related information uploaded by users; For each piece of diagnosis and treatment related information, a pre-trained medical semantic boundary recognition model is used to identify the semantic boundary of the diagnosis and treatment related information, and based on the identified semantic boundary, at least one segmentation identifier is dynamically generated. Based on the at least one segmentation identifier, the diagnosis and treatment related information is segmented according to semantic segmentation priority to obtain at least one original diagnosis and treatment segmentation information; After semantic segmentation, all the original diagnosis and treatment segment information is first cleaned and then vectorized to obtain multiple diagnosis and treatment segment information corresponding to the multimodal dataset.

3. The method of claim 2, wherein, The semantic segmentation priority includes a first semantic priority and a second semantic priority; the first semantic priority corresponds to semantic integrity; the second semantic priority corresponds to text length constraints; the step of segmenting the diagnosis-related information according to the at least one segmentation identifier and the semantic segmentation priority to obtain at least one original diagnosis-related segment information includes: Based on the at least one segmentation identifier, the diagnosis and treatment related information is pre-segmented to obtain at least one pre-segmented piece of information; Determine whether each piece of pre-segmented information satisfies the semantic integrity condition; If not, the pre-segmented information that does not meet the semantic integrity condition is taken as the first segmented information, and the second segmented information that can form a semantically complete segment with the first segmented information is determined from the remaining pre-segmented information. The remaining segmented identifiers other than the segmented identifiers between the first segmented information and the second segmented information are used to segment the diagnosis and treatment related information to obtain at least one original diagnosis and treatment segmented information. If so, determine whether the text length of each pre-segmented information meets the preset text length threshold; When the text length of each pre-segmented information meets the preset text length threshold, all pre-segmented information is directly used as at least one original diagnosis and treatment segmented information of the diagnosis and treatment related information; When the length of the pre-segmented text does not meet the preset text length threshold, the pre-segmented text that does not meet the preset text length threshold is used as the third segmented text, and the pre-segmented text that meets the preset text length threshold is used as the fourth segmented text. Perform text length constraint processing on the third segment information to obtain at least one fifth segment information; Integrate all the fourth segment information and all the fifth segment information to form at least one original diagnosis and treatment segment information of the diagnosis and treatment related information.

4. The method of claim 3, wherein, The step of performing text length constraint processing on the third segment information to obtain at least one fifth segment information includes: The third segment information is labeled with entities, and the entity type of each entity is determined; For each entity, the entity density value is calculated by combining the text length of the third segment information and the entity type; The third segment information is labeled with medical semantic roles to obtain at least one key role type; Based on the entity density value of each entity and the at least one key role type, the third segment information is divided into at least one core operation description and at least one explanatory text information. Determine whether the length of each explanatory text message meets a preset text length threshold; If so, then the at least one core operation description and the at least one explanatory text information are directly integrated as at least one fifth segment of the third segment information; If not, then the explanatory text information whose text length does not meet the preset text length threshold will be further divided to obtain at least one secondary division text information. Integrate all secondary segmented text information, all explanatory text information that has not been secondary segmented, and at least one core operation description information as at least one fifth segment information of the third segment information.

5. The method of claim 1, wherein, The step of combining the key medical information to construct a collaborative triggering information chain for the target treatment segment information, and obtaining the final retrieved treatment segment information, includes: Step S01: Based on the key medical information, match the initial rule when the target diagnosis and treatment segment information meets the collaborative triggering conditions from the pre-built rule base, and the rule association graph of the initial rule; the rule association graph includes multiple association rules in a progressive triggering order; Step S02: Activate and execute the initial rule, and output the first action result; Step S03: Extract an association rule sequentially from the rule association graph, and determine whether the association rule meets the corresponding triggering condition; Step S04: If yes, activate and execute the association rule, output the second action result, and if there are still inactive association rules in the rule association graph, jump to step S03; if all association rules in the rule association graph have been activated, jump to step S05; if no, after outputting the third action result, jump to step S05. Step S05: Integrate the first action result, all second action results, and the third action result in the output order to form a collaborative triggering information chain for the target diagnosis and treatment segment information; Step S06: Integrate the target diagnosis and treatment segment information and the collaborative triggering information chain as the final retrieval output diagnosis and treatment segment information.

6. The method of claim 1 to 5, wherein, The step of performing cross-modal alignment of medical terminology on the key medical information to obtain the recommended treatment plan type includes: By combining word segmentation and multi-granularity embedding, cross-modal alignment of medical terms is performed on the key medical information to generate first-granularity information at the level of words or entities, second-granularity information at the level of sentences, and third-granularity information at the level of paragraphs. Based on a comprehensive analysis of the first granularity information, the second granularity information, and the third granularity information, the type of treatment plan recommended and generated by the key medical information is determined.

7. A device for quick search and generation of medical diagnosis and treatment plans, characterized in that, include: An information extraction unit is used to acquire medical consultation information input by the user and extract key medical information from the medical consultation information; The information retrieval unit is used to retrieve diagnosis and treatment segment information from a knowledge base constructed based on medical semantic segmentation according to the key medical information and by using collaborative optimization retrieval rules. A cross-modal alignment unit is used to perform cross-modal alignment of medical terms on the key medical information to obtain the recommended treatment plan type; The solution generation unit is used to generate a medical treatment solution corresponding to the treatment solution type by calling a pre-trained medical big language model based on the treatment segmentation information. The information retrieval unit includes: The preliminary retrieval unit is used to initially retrieve at least one candidate diagnosis and treatment segment information from the knowledge base constructed based on medical semantic segmentation, where the relevance value between the candidate diagnosis and treatment segment information and the key medical information is greater than or equal to a preset relevance threshold; each candidate diagnosis and treatment segment information corresponds to a rule priority. The priority conflict judgment unit is used to determine whether there is a conflict between the rule priorities of each of the candidate diagnosis and treatment segment information; The first unit for determining target treatment segment information is used to directly determine the target treatment segment information with the highest relevance value from the at least one candidate treatment segment information when there is no conflict between the rule priorities of each candidate treatment segment information. The conflict content coverage unit is used to determine the conflicting candidate diagnosis and treatment segment information as high-level segment information and low-level segment information according to the rule priority from high to low when there are conflicting rule priorities among the candidate diagnosis and treatment segment information. The high-level segment information is then used to cover the conflicting content in the low-level segment information to obtain the optimized segment information of the low-level segment information. The second unit for determining target treatment segment information is used to determine the target treatment segment information with the highest relevance value under the premise of the highest rule priority from the high-level segment information, the optimized segment information, and the remaining candidate treatment segment information that does not participate in the coverage of conflicting content; The collaborative triggering information chain construction unit is used to combine the key medical information to construct the collaborative triggering information chain of the target diagnosis and treatment segment information, and obtain the diagnosis and treatment segment information of the final retrieval output.

8. An electronic device, comprising: The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the rapid retrieval and generation method of medical diagnosis and treatment plan according to any one of claims 1-6 according to the instructions in the program code.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the rapid retrieval and generation method of medical treatment plans according to any one of claims 1-6.