Intelligent medicine classification method based on large model semantic recognition and multilevel verification

By using a large language model and a multi-level verification mechanism, the limitations of static mapping and the lag in dynamic updates in drug classification methods are solved. This enables efficient identification and reliable verification of non-standard expressions, improves the accuracy and security of drug classification, and facilitates the rapid entry of new drugs into the database.

CN120910263APending Publication Date: 2025-11-07WONDERS INFORMATION +1

Patent Information

Application Number
CN202511009775.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing drug classification methods suffer from limitations of static mapping, slow dynamic updates, and a lack of semantic understanding and reliability control. This results in insufficient ability to identify and classify non-standard expressions and new drugs, affecting the safety and efficiency of clinical applications.

Method used

It adopts a four-layer architecture based on a large language model, including static mapping, semantic parsing, credibility verification and dynamic learning. By constructing a structured mapping table, introducing a large language model and multi-factor confidence assessment, and combining internal and external knowledge retrieval and prompt word engineering, it can achieve in-depth analysis of drug information and automated risk classification.

Benefits of technology

It significantly improves the ability to handle non-standard expressions, increases the accuracy of drug identification, ensures the interpretability and reliability of classification results, shortens the time for new drug entry into the database, and enhances the system's safety and responsiveness in clinical scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910263A_ABST
    Figure CN120910263A_ABST
Patent Text Reader

Abstract

The technical scheme of the invention discloses an intelligent medicine classification method based on large model semantic recognition and multi-level verification. According to the method, a large language model is introduced on the basis of static mapping, internal and external knowledge retrieval and cue word engineering are combined, and the processing capacity for non-standard expressions (such as abbreviation, wrongly written characters, mixed use of commodity names / chemical names and the like) is remarkably improved; according to actual measurement of a three-A hospital, the non-standard medicine identification accuracy rate reaches 92.7% and is improved by about 41% compared with that of a traditional method; according to the method, a multi-level credible verification mechanism is constructed, automatic risk grading is achieved through multi-factor evaluation modes such as semantic factors, clinical context and model confidence, a multi-factor confidence threshold value is set, high-risk samples are 100% manually rechecked, it is ensured that classification results can be explained and audited, and the accuracy of risk assessment is improved. And the safety and reliability of the system in a clinical high-risk scene are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an intelligent drug classification method based on large language model semantic recognition and multi-level verification, which is suitable for clinical auxiliary decision-making, drug review system and drug safety management system, and belongs to the cross field of artificial intelligence and digital medicine. BACKGROUND

[0002] In the context of the increasing popularity of medical informatization, in the face of complex drug information, accurately identifying and classifying various drug names has become a key link in multiple application scenarios such as clinical auxiliary decision-making, drug review, and patient drug safety management. The current commonly used drug classification method mainly includes mapping table query based on static rule matching and manual intervention. This technology mainly has the following three technical bottlenecks: (1) Static mapping limitations: Traditional rule matching methods rely on standardized expression of drug names, and are difficult to cover non-standard expressions such as mixed use of trade names / chemical names and spelling variations, resulting in low matching coverage and unstable classification effect; (2) Dynamic update lag: Drug types are constantly updated, and new drugs and new dosage forms are constantly emerging. Manual maintenance of mapping tables is long in cycle, low in efficiency, high in cost, and difficult to adapt to new drug launches in a timely manner, resulting in insufficient recognition and classification ability for new drugs; (3) Lack of semantic understanding ability and credibility control: Some existing methods introduce deep learning models to enhance semantic recognition ability, such as the drug classification method based on RNN model proposed in CN117828404A patent, which improves the semantic understanding ability to a certain extent. However, compared with large language models, such models have insufficient semantic analysis ability and poor generalization, and lack a credibility control mechanism for classification result verification, affecting the safety guarantee of the system in clinical key scenarios. SUMMARY

[0003] The purpose of the present application is to propose an intelligent drug classification method based on the four-layer architecture of "static mapping-semantic analysis-credible verification-dynamic learning".

[0004] In order to achieve the above purpose, the technical scheme of the present application discloses an intelligent drug classification method based on large model semantic recognition and multi-level verification, characterized in that it comprises the following steps:

[0005] Step 1: Based on the drug library, a structured drug information classification mapping table is constructed, and a triple of <trade name-chemical name-drug classification> is used as the basic data structure for static mapping matching of the input original drug name, and the matching success result is output. The drug name that fails to match is classified into a to-be-identified set;

[0006] Step 2, construct a drug classification knowledge base, retrieve the to-be-identified set to enhance the generation of extracted knowledge context, construct a prompt word context for guiding the large language model to generate drug information in combination with the prompt word engineering, and infer the <trade name-chemical name> structured result corresponding to the prompt word context based on the large language model;

[0007] Step 3, construct a diagnostic drug information knowledge base, retrieve the <trade name-chemical name> pair generated in step 2 to enhance the generation of extracted knowledge context, combine prompt word engineering, and simultaneously use the drug information classification mapping table in step 1 as a reference system to construct a prompt word context for guiding the large language model to output a multi-factor confidence score;

[0008] Set a confidence threshold;

[0009] If the drug name recognition result output by the large language model is higher than the confidence threshold, it is considered to be reliable, and based on the drug information classification mapping table, a static mapping is performed, and the current <drug name-trade name-chemical name> is updated to the drug classification knowledge base;

[0010] If the drug name recognition result output by the large language model is lower than the confidence threshold, the drug name recognition result is classified into the to-be-clustered set;

[0011] Step 4, classify the to-be-clustered set through semantic clustering, construct a known category classification center representation, vectorize the to-be-clustered set, and calculate the similarity to each center;

[0012] Set a similarity threshold:

[0013] If the drug name in the to-be-clustered set is greater than the similarity threshold, it is classified;

[0014] If there is a drug name in the to-be-clustered set with a similarity less than the similarity threshold, it is classified into the to-be-manually-audited set for subsequent manual auditing and verification.

[0015] Preferably, the step 1 includes the following steps:

[0016] Step 101, after obtaining the original drug name information, perform preprocessing operations;

[0017] Step 102, extract the trade name, chemical name, and classification category from the standard drug library accumulated and sorted by the medical institution in long-term business activities to construct a drug information classification mapping table C map :

[0018]

[0019] In the formula, represents the trade name, represents the chemical name, c kn represents the total number of categories, and represents the category of the drug;

[0020] Step 103, static mapping matching is performed on the drug name, and the pre-processed drug name set is:

[0021] D clean = {d1, d2,..., di,..., dn} n}

[0022] In the formula, D clean represents the pre-processed drug name set, and d i represents the i-th drug name;

[0023] The matching function is defined as follows:

[0024]

[0025] The above formula indicates that as long as the trade name or chemical name is a substring in the drug name, it is considered to be matched;

[0026] The drug name without matching is classified into the set D unmatch to be identified.

[0027] Preferably, the step 2 comprises the following steps:

[0028] Step 201, constructing a drug classification knowledge base, based on extracting core content containing drug attributes in drug management, clinical use and medical information resources from public channels, forming an initial drug classification knowledge base KB med ;

[0029] Step 202, for each drug name d i ∈ D unmatch , context knowledge information K s related thereto is obtained through network search engine;

[0030] Step 203, based on retrieval enhancement generation technology, the original drug name to be identified is searched in the drug classification knowledge base KB med to obtain information content K med with similar semantics;

[0031] Step 204, constructing a prompt word context for guiding a large model to generate drug information, combining the network retrieval recall information K s and the knowledge base retrieval information K med to construct a prompt word context with a prompt word template, guiding the large language model LLM to adopt a chain thinking mode to carry out reasoning, and generating the trade name and chemical name corresponding to the original drug name:

[0032]

[0033] wherein, denotes the generated trade name, denotes the generated chemical name, and Prompt denotes the constructed prompt context.

[0034] Preferably, the template for constructing the prompt in step 204 can select a CHAT prompt template.

[0035] Preferably, the step 3 comprises the following steps:

[0036] Step 301, structured or unstructured information containing "disease-drug" relationships in electronic medical records, prescription records, and medication guidelines is extracted to constitute a diagnostic drug information knowledge base KB diag ;

[0037] Step 302, based on the search enhancement generation technology, the diagnostic drug information knowledge base KB diag obtains information content with similar semantics:

[0038]

[0039] wherein, K diag is the relevant diagnostic drug information returned after retrieval, and Retrieve(·) denotes a retrieval function;

[0040] Step 303, a multi-factor confidence evaluation mechanism is constructed for evaluating whether the generation result of the large language model can be used as the input of the next step, including the following factors:

[0041] a semantic consistency factor S name , which measures whether the <trade name-chemical name> generated by the model is the same drug entity as the original drug name in semantics;

[0042] a clinical context consistency factor S diag , which measures whether the <trade name-chemical name> generated by the model has clinical context consistency with the historical information in the actual diagnosis process as the original drug name;

[0043] a model confidence factor S model , which is the mean value of token-level probability returned by the model itself;

[0044] Step 304, based on the multi-factor evaluation mechanism constructed in step 303, a prompt context is constructed to guide the large model to output a multi-factor confidence score, which guides the model to use the chain thinking reasoning mechanism of the large model to carry out reasoning, and generates each multi-factor confidence score and the corresponding explanation reasons:

[0045] (S name , Sdiag S model ,cot)=LLM(Prompt)

[0046] wherein, cot represents the explanation reason of the output, and Prompt represents the constructed prompt word context;

[0047] Step 305, calculating the total confidence average value as the final output confidence S i :

[0048]

[0049] Setting the confidence threshold θ s , performing binary classification processing:

[0050] If S i ≥ θ s , it is considered that the drug combination generated by the large model is credible, and the f match Static mapping matching: if the matching is successful, it is updated to the drug classification knowledge base KB med :

[0051]

[0052] If the matching fails, it is considered that the large language model generation has errors or belongs to other categories, and is classified into the to-be-clustered set;

[0053] If S i < θ s , it is considered that the drug combination generated by the large language model is not credible, and is classified into the to-be-clustered set.

[0054] Preferably, in the step 304, the template of the prompt word can select the CHAT prompt word template.

[0055] Preferably, the step 4 comprises the following steps:

[0056] Step 401, constructing a classification center representation of known categories, and the drug information classification table C map in step 1 is classified according to the category C=(c1, c2,..., c n );

[0057] The drug names under each category are converted into embedding vectors through a vectorization method:

[0058] v kj =Emb(d kj )

[0059] wherein, d kj represents the drug name under the kth category; Emb(·) is a vectorization model;

[0060] For each category c k , calculate the average vector of all drug names in this category c k , and obtain the category center of this category c k :

[0061]

[0062] In the formula, represents the vector center of category c k , and D k represents the set of all drug names in the kth drug category.

[0063] Step 402, vectorize the drug names in the clustering set, and convert them into embedding vectors using the same vectorization method:

[0064] v i = Emb(d i )

[0065] Calculate the cosine similarity S i,k between v i and all category center vectors:

[0066]

[0067] Take the category corresponding to the maximum cosine similarity as the candidate classification k * :

[0068] k * = max(S i,k )

[0069] Set a similarity threshold θ k :

[0070] If S i,k ≥ θ k , classify d i as c k ;

[0071] If S i,k < θ k , it is classified into the "to-be-manually-audited set" and enters the subsequent manual verification process.

[0072] Compared with the prior art, the present application has the following beneficial effects:

[0073] 1. The present application introduces a large language model based on static mapping, combined with internal and external knowledge retrieval and prompt word engineering, significantly improving the processing capability for non-standard expressions (such as abbreviations, misspelled words, and mixed use of trade names / chemical names, etc.); According to the actual measurement of a third-class hospital, the accuracy rate of non-standard drug identification reaches 92.7%, which is about 41% higher than that of traditional methods;

[0074] 2. The application constructs a multi-level trusted verification mechanism, realizes automatic risk grading through multi-factor evaluation methods such as semantic factors, clinical context and model confidence, sets multi-factor confidence thresholds, and manually reviews 100% of high-risk samples to ensure that the classification results are interpretable and auditable, and improve the safety and reliability of the system in clinical high-risk scenarios;

[0075] 3. Relying on semantic clustering and artificial feedback mechanism to build a "recognition-verification-supplement" closed loop process to realize the continuous evolution of the drug classification knowledge base; through weekly updates of the knowledge base, new drug storage and rule effectiveness can be completed within 72 hours, breaking through the technical bottleneck of the lagging update of traditional static knowledge base and improving the response ability of the system to changes in clinical drug use. BRIEF DESCRIPTION OF DRAWINGS

[0076] Figure 1 The present application is an intelligent drug classification method based on large model semantic recognition and multi-level verification overall flowchart;

[0077] Figure 2 It illustrates that the present application constructs a structured drug information classification mapping table based on the existing standard drug library, uses a triple of <trade name-chemical name-drug classification> as the basic data structure, performs static mapping matching on the input original drug name, outputs the matching success result, and classifies the drug names that fail to match successfully into the "to be recognized set";

[0078] Figure 3 It illustrates that the present application constructs a drug classification knowledge base, introduces an external search engine, retrieves the "to be recognized set" in S1 to enhance the generation of extracted knowledge context, combines the prompt word engineering to construct the prompt word context for guiding the large model to generate drug information, and obtains the corresponding <trade name-chemical name> structured result based on the large model reasoning;

[0079] Figure 4 It illustrates that the present application designs a verification intelligent agent and establishes a multi-factor confidence evaluation mechanism: a drug information knowledge base is constructed, the <trade name-chemical name> pair generated in S2 is retrieved to enhance the generation of extracted knowledge context, the prompt word engineering is combined, and at the same time, the drug information classification mapping table in S1 is used as a reference system to construct the prompt word context for guiding the large model to output multi-factor confidence scores; set the confidence threshold, the results higher than the threshold are considered to be trusted, based on the drug information classification mapping table for static mapping matching, and at the same time, this <drug name-tradename-chemical name> is updated to the drug classification knowledge base; the drug names below the threshold are classified into the "to be clustered set";

[0080] Figure 5The application classifies the "to-be-clustered set" through semantic clustering, constructs a known category classification center representation, vectorizes the "to-be-clustered set", calculates the similarity with each center, sets a similarity threshold, and if the similarity is greater than the threshold, the classification is performed; if there is a drug name with a similarity less than the threshold, it is classified into the "to-be-manually audited set" and subsequent manual auditing and verification are performed. DETAILED DESCRIPTION

[0081] The application will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the application and not used to limit the scope of the application. Furthermore, it should be understood that after reading the content taught by the application, those skilled in the art can make various modifications or changes to the application, and these equivalent forms also fall within the scope defined by the appended claims of the application.

[0082] The intelligent drug classification method based on large model semantic recognition and multi-level verification disclosed by the embodiment of the application adopts a four-layer architecture of "static mapping-semantic analysis-trustworthy verification-dynamic learning", wherein:

[0083] The static mapping layer: a triple mapping table is used to realize preliminary filtering, and standard names are preferentially identified and matched;

[0084] The semantic analysis layer: the retrieval augmentation generation (RAG) technology and the large model chain thinking reasoning (cot) mechanism are introduced to realize deep analysis of non-standard names that are not matched;

[0085] The trustworthy verification layer: through a multi-factor evaluation (semantic consistency, clinical background relevance, model confidence) mechanism, automatic hierarchical screening is realized to ensure safety and controllability;

[0086] The dynamic learning layer: relying on semantic clustering and artificial feedback, a closed-loop knowledge base weekly update mechanism is constructed to continuously improve the adaptability of the system to new drugs and non-standard names.

[0087] Based on the four-layer architecture of "static mapping-semantic analysis-trustworthy verification-dynamic learning", the application specifically includes the following steps:

[0088] S1. Based on the existing standard drug library, a structured drug information classification mapping table is constructed, a triple of <trade name-chemical name-drug classification> is used as the basic data structure, the input original drug name is statically mapped and matched, the matching success result is output, and the drug name that fails to be successfully matched is classified into the "to-be-identified set";

[0089] S2. Construct a drug classification knowledge base, introduce an external search engine, and retrieve the "to-be-identified set" in S1 to enhance the generation of extracted knowledge and enhance the context, combine the prompt word engineering to construct the prompt word context of the drug information generated by the large model, and obtain the corresponding <trade name-chemical name> structured result based on the large model reasoning;

[0090] S3. Design a verification intelligent agent and establish a multi-factor confidence evaluation mechanism:

[0091] Construct a diagnostic drug information knowledge base, retrieve the <trade name-chemical name> pair generated by S2 to generate extracted knowledge and enhance the context, combine the prompt word engineering, and at the same time use the drug information classification mapping table in S1 as a reference system to construct the prompt word context of the large model outputting multi-factor confidence scores;

[0092] Set a confidence threshold;

[0093] If the drug name recognition result output by the large model is higher than the threshold, it is considered to be reliable, and based on the drug information classification mapping table, a static mapping is performed, and the <drug name-tradename-chemical name> is updated to the drug classification knowledge base;

[0094] If the drug name recognition result output by the large model is lower than the threshold, the drug name recognition result is classified into the "to-be-clustered set";

[0095] S4. Classify the "to-be-clustered set" through semantic clustering, construct a known category classification center representation, vectorize the "to-be-clustered set", calculate the similarity to each center, and set a similarity threshold: if the drug name in the "to-be-clustered set" is greater than the threshold, it is classified; if there is a drug name in the "to-be-clustered set" with a similarity less than the threshold, it is classified into the "to-be-manually reviewed set" and subsequently manually reviewed and verified.

[0096] In an embodiment of the application, a preferred implementation is that the above S1 further includes the following steps:

[0097] S1-1. Obtain original drug name information, which may include but is not limited to tradename, chemical name, generic name, mixed name, and other non-standardized drug name expression forms, and perform preprocessing operations to improve the accuracy of subsequent matching:

[0098] f norm (d)=Preprocessing(d)

[0099] In the formula: Preprocessing(·) is a preprocessing function, including full-width half-width conversion, case unification, special symbol removal, etc.; d is the original drug name information;

[0100] S1-2. Based on the standard drug library extracted from the trade name, chemical name and classification category accumulated and sorted by the medical institutions in the long-term business activities such as prescription management, drug review, medical record screening, a drug information classification mapping table is constructed:

[0101]

[0102] In the formula, C map represents the drug information classification mapping table, represents the trade name, represents the chemical name, c k represents the drug classification category, and n represents the total number of categories.

[0103] S1-3. The drug name is matched statically, and the pretreated drug name set is:

[0104] D clean ={d1,d2,...,d n}

[0105] In the formula, D clean represents the pretreated drug name set, and d i represents the i th drug name.

[0106] The matching function is defined as follows:

[0107]

[0108] The above formula indicates that as long as the trade name or the chemical name is a substring in the drug name, it is considered to be matched.

[0109] The drug name without matching is classified into the “to-be-identified set” D unmatch :

[0110]

[0111] In the embodiment of the application, a preferred implementation manner is that the above S2 further includes the following steps:

[0112] S2-1. Constructing a drug classification knowledge base, based on the core content containing drug properties extracted from drug management, clinical use and medical information resources from public channels, an initial drug classification knowledge base KB med is formed.

[0113] S2-2. Introducing external knowledge retrieval, for each to-be-identified drug name d i ∈D unmatch , context knowledge information related thereto is obtained through network search engine:

[0114] K s= Search(d i )

[0115] In the formula, Search(·) represents an external knowledge retrieval module, which can include web page titles, abstracts, specification contents, etc.

[0116] S2-3. Retrieving the drug classification knowledge base KB based on the RAG (Retrieval Augmentation Generation) technology for the to-be-identified original drug name med to obtain information content similar in semantics:

[0117] K med = Retrieve(KB med , d i ), d i ∈ D unmatch

[0118] In the formula, K med is the relevant drug classification information returned after retrieval, and Retrieve(·) represents a retrieval function.

[0119] S2-4. Constructing a prompt word context to guide a large model to generate drug information, combining the network retrieval recall information K s with the knowledge base retrieval information K med to construct a prompt word context using a prompt word template, guiding the model to use a Chain-of-Thought (CoT) mode to carry out reasoning, and generating the trade name and chemical name corresponding to the original drug name:

[0120]

[0121] In the formula, represents the generated trade name, represents the generated chemical name, Prompt represents the constructed prompt word context, and LLM(·) represents a large language model.

[0122] In the embodiments of the present application, a more preferred implementation is that the template for constructing the prompt word in S2-4 can select a CHAT (Character, History, Ambition, Task) prompt word template.

[0123] In the embodiments of the present application, a preferred implementation is that the above S3 further includes the following steps:

[0124] S3-1. Extracting structured or unstructured information containing “disease-drug” relationships in electronic medical records, prescription records, medication guidelines, etc., to constitute a diagnosis drug information knowledge base KB diag .

[0125] S3-2. Based on the RAG technology, the generated To retrieve the diagnostic drug information knowledge base KB diag Get semantically similar information content:

[0126]

[0127] In the formula, K diag The relevant diagnostic drug information returned after retrieval;

[0128] S3-3. Construct a multi-factor confidence evaluation mechanism to evaluate whether the generated results of the large model can be used as the input of the next step, which can be divided into the following factors:

[0129] Semantic consistency factor S name , measure whether the <trade name-chemical name> generated by the model is the same drug entity as the original drug name in semantics, and the prompt word template can be:

[0130] "Known relevant diagnostic drug information K diag , drug information classification mapping table C map , original drug name d i and <trade name Chemical name > are they the same drug in semantics? Please give a score (0-1) and explain the reason"

[0131] Clinical context consistency factor S diag , measure whether the <trade name-chemical name> generated by the model and the original drug name have clinical context consistency with the historical information in the actual diagnosis process, and the prompt word template can be:

[0132] "Known relevant diagnostic drug information K diag , drug information classification mapping table C map , judge whether the generated drug combination <original drug name d i , trade name Chemical name > conforms to the clinical use scene, and whether it is consistent with the actual information in the diagnosis information knowledge base. Please give a score (0-1) and explain the reason"

[0133] Model confidence factor S model , token-level probability mean returned by the model itself;

[0134] S3-4. Combined with the multi-factor evaluation mechanism constructed in S3-3, construct a prompt word context that guides the large model to output multi-factor confidence scores based on the prompt word template, guide the model to carry out reasoning in the cot way, and generate each multi-factor confidence score and the corresponding explanation reason:

[0135] (S name ,S diag ,S model ,cot)=LLM(Prompt)

[0136] In the formula, cot represents the explanation reason of the output, and Prompt represents the constructed prompt word context;

[0137] S3-5. Calculate the total confidence average as the final output confidence S i :

[0138]

[0139] Set the confidence threshold θ s , and perform binary classification processing:

[0140] If S i ≥ θ s , it is considered that the drug combination generated by the large model is credible, and f match in S1-3 is executed. med Static mapping matching: if the matching is successful, update to the drug classification knowledge base KB

[0141]

[0142] If the matching fails, it is considered that the large model generation has errors or belongs to other categories, and is classified into the “to-be-clustered set”;

[0143] If S i < θ s , it is considered that the drug combination generated by the large model is not credible, and is classified into the “to-be-clustered set”.

[0144] In the embodiment of the application, a more preferred implementation is that the template for constructing the prompt word in S3-4 can select the CHAT prompt word template.

[0145] In the embodiment of the application, a preferred implementation is that the above S4 further includes the following steps:

[0146] S4-1. Construct a classification center representation of the known category, and the drugs in the drug information classification table C map in S1 that have been clearly classified according to the category C=(c1, c2,..., c n );

[0147] Convert the drug names under each category into embedded vectors through a vectorization method:

[0148] v kj =Emb(d kj )

[0149] In the formula: d kj This represents the name of the drug under the k-th drug category; Emb(·) is a vectorized model, preferably a model such as Med-BERT;

[0150] For each category c k Calculate the category c k The average vector of all drug names is used to obtain the category c. k The "classification center":

[0151]

[0152] In the formula, Represents category c k The vector center, D k This represents the set of all drug names under the k-th drug category;

[0153] S4-2. Vectorize the drug names in the "to be clustered set" and convert them into embedding vectors using the same vectorization method:

[0154] v i =Emb(d i )

[0155] Calculate v k Cosine similarity S between the center vectors of all categories i,i :

[0156]

[0157] The category corresponding to the maximum cosine similarity is taken as the candidate classification k. * :

[0158] k * =max(S) i,k )

[0159] Set the similarity threshold θ k :

[0160] If S i,k ≥θ k , then d t Classified as C k kind;

[0161] If S i,k <θ k They are categorized into the "Pending Manual Review Set" and will proceed to the subsequent manual verification process.

Claims

1. An intelligent drug classification method based on large model semantic recognition and multi-level verification, characterized in that, Comprise the following steps: Step 1, based on the drug library, construct a structured drug information classification mapping table, adopt a ternary group of <trade name-chemical name-drug classification> as a basic data structure, perform static mapping matching on the input original drug name, output a matching success result, and classify the drug name that fails to be successfully matched into a to-be-identified set; Step 2, construct a drug classification knowledge base, perform retrieval enhancement on the to-be-identified set to generate an extracted knowledge enhanced context, combine a prompt word engineering to construct a prompt word context for guiding a large language model to generate drug information, and infer <trade name-chemical name> structured results corresponding to the prompt word context based on the large language model; Step 3, construct a diagnostic drug information knowledge base, perform retrieval enhancement on the <trade name-chemical name> pair generated in step 2 to generate an extracted knowledge enhanced context, combine a prompt word engineering, and simultaneously use the drug information classification mapping table in step 1 as a reference system to construct a prompt word context for guiding a large language model to output a multi-factor confidence score; Set a confidence threshold; If the drug name recognition result output by the large language model is higher than the confidence threshold, it is considered to be reliable, a static mapping is performed based on the drug information classification mapping table, and the current <drug name-trade name-chemical name> is updated to the drug classification knowledge base; If the drug name recognition result output by the large language model is lower than the confidence threshold, the drug name recognition result is classified into a to-be-clustered set; Step 4, classify the to-be-clustered set through semantic clustering, construct a known category classification center representation, vectorize the to-be-clustered set, and calculate the similarity to each center; Set a similarity threshold: If the drug name in the to-be-clustered set is greater than the similarity threshold, it is classified; If there is a drug name in the to-be-clustered set with a similarity less than the similarity threshold, it is classified into a to-be-manually reviewed set for subsequent manual review and verification.

2. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 1, characterized in that, The step 1 comprises the following steps: Step 101, after obtaining the original drug name information, perform a preprocessing operation; Step 102, based on the medical institutions in long-term business activities accumulated standard drug library extracted trade name, chemical name and its classification category, build drug information classification mapping table C map : In the formula, denotes a trade name, denotes a chemical name, c k denotes a drug classification category, n denotes the total number of categories; Step 103, perform static mapping matching on the drug name, and let the set of preprocessed drug names be: D clean = {d1, d2,..., d n} In the formula, D clean denotes the set of drug names after preprocessing, d i denotes the i-th drug name; Define the matching function as follows: The above formula means that as long as the trade name or the chemical name is a substring in the drug name, it is considered to be matched; For the drug names without matching into the set D to be identified unmatch .

3. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 2, characterized in that, The step 2 comprises the following steps: Step 201, constructing a drug classification knowledge base, based on extracting the core content containing drug attributes in drug management, clinical use and medical information resources from public channels, forming an initial drug classification knowledge base KB med ; Step 202, obtaining the context knowledge information K related to the drug name d i ∈D unmatch obtaining the context knowledge information K related to the drug name d through a network search engine s ; Step 203, searching the drug classification knowledge base KB based on the search enhanced generation technology on the original drug name to be identified med Obtaining semantic similar information content K med ; Step 204, build the prompt word context guiding the large model to generate drug information, and recall information K s With the knowledge base retrieval information K med Combine the prompt word template to build the prompt word context, guide the large language model LLM to carry out reasoning in a chain thinking mode, and generate the trade name and chemical name corresponding to the original drug name: wherein, denotes the generated product name, denotes the generated chemical name, Prompt denotes the constructed prompt context.

4. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 3, characterized in that, The template for constructing the prompt word in step 204 can select a CHAT prompt word template.

5. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 3, characterized in that, The step 3 comprises the following steps: Step 301, structured or unstructured information containing "disease-drug" relationship in electronic medical records, prescription records, medication guidance is extracted to constitute a diagnostic drug information knowledge base KB diag ; Step 302, based on the search enhancement generation technique, generate a query for the semantic similar information content from the information content in the knowledge base KB To search the diagnostic drug information knowledge base KB diag Get semantic similar information content: In the formula, K diag To retrieve relevant diagnostic drug information returned after searching, Retrieve(·) represents a retrieval function. Step 303, construct a multi-factor confidence evaluation mechanism for evaluating whether the large language model generation result can be used as the input of the next step, including the following factors: semantic consistency factor S name measures whether the <brand-name-chemical-name> generated by the model is semantically the same drug entity as the original drug name; Clinical context consistency factor S diag measures whether the <brand-name-chemical-name> generated by the model is clinically contextually consistent with historical information from actual diagnosis processes; Model confidence factor S model , the mean of token-level probabilities returned by the model itself; Step 304, based on the multi-factor evaluation mechanism constructed in step 303, construct a prompt word context for guiding the large model to output a multi-factor confidence score based on the prompt word template, guide the model to use a large model chain thinking reasoning mechanism to carry out reasoning, and generate each multi-factor confidence score and the corresponding explanation reason: (S name ,S diag ,S model ,cot) = LLM(Prompt) In the formula, cot represents the output explanation reason, and Prompt represents the constructed prompt word context; Step 305, compute the total confidence average as the final output confidence S i : Setting a confidence threshold θ s , performing a binary classification process: If S i ≥ θ s , the drug combination generated by the large model is considered to be reliable, and the step 103 is executed. match Static mapping matching: if the matching is successful, update to the drug classification knowledge base KB med . If the matching fails, it is considered that the large language model generation has an error or belongs to other categories, and is classified into a to-be-clustered set; If S i <θ s If the drug combination generated by the large language model is considered to be unreliable, it is classified into the clustering set.

6. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 5, characterized in that, In the step 304, the template of the prompt word can select a CHAT prompt word template.

7. The intelligent drug classification method based on large model semantic recognition and multi-level verification according to claim 5, characterized in that, The step 4 comprises the following steps: Step 401, constructing a classification center representation of known categories, for the drug information classification table C in step 1 map The drugs that have been explicitly classified according to the categories C = (c1, c2,..., c n ) The drug names under each category are converted into embedding vectors by a vectorization method: v kj = Emb(d kj ) In the formula, d kj represents the name of the drug under the kth drug category; Emb(·) is a vectorization model; For each category c k , the average vector of all drug names in this category c k is calculated to obtain the category center of this category c k : wherein denotes the vector center of the category c k denotes the set of all drug names under the kth category of drug categories k denotes the set of all drug names under the kth category of drug categories In step 402, the drug names in the set to be clustered are vectorized into embedding vectors using the same vectorization method: In step 402, the drug names in the set to be clustered are vectorized into embedding vectors using the same vectorization method: v i = Emb(d i ) Compute v i Cosine similarity S between all category center vectors i,k : Taking the class corresponding to the maximum cosine similarity as the candidate classification k * : k * = max(S i,k ) Setting a similarity threshold value θ k : If S i,k ≥ θ k , then d i is classified as c k lass; If S i,k <θ k , is included in the "to be manually reviewed set" and enters the subsequent manual verification process.

Citation Information

Patent Citations

  • Drug classification model generation method and device, drug classification method and device and electronic equipment

    CN117828404A

Cited By

  • Traditional Chinese medicine identification method and system based on large model, electronic equipment and storage medium

    CN121306603A

  • Traditional Chinese Medicine Identification Methods, Systems, Electronic Devices, and Storage Media Based on Large Models

    CN121306603B