A Big Data-Based Intelligent Medication Recommendation Method

By quantifying the matching of drug side effects with life scenarios and combining it with expected efficacy scores, personalized medication recommendations were achieved, solving the problem of conflict between drug side effects and life scenarios in the existing system and improving medication adherence and treatment effectiveness.

CN121938554BActive Publication Date: 2026-07-17FUJIAN PROVINCIAL HOSPITAL

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
FUJIAN PROVINCIAL HOSPITAL
Filing Date
2026-03-27
Publication Date
2026-07-17

Smart Images

  • Figure CN121938554B_ABST
    Figure CN121938554B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent medication recommendation method based on big data, belonging to the field of intelligent medication technology. Specifically, it includes: collecting patients' daily activity characteristics and medical record data; screening drugs with matching indications and no contraindications based on diagnostic information and test results to obtain a preliminary drug set; determining the patient's life scenario category based on their occupation and daily routine, and calculating the life scenario interference value of each drug based on a preset interference coefficient library; screening a reference group similar to the target patient, and calculating the expected efficacy score of each drug by analyzing their follow-up visit records; normalizing the interference value and efficacy score, weighting them according to preset weights to obtain a comprehensive fit, and selecting the drug with the highest fit for output. This invention integrates patients' daily life scenarios into medication decision-making, achieving a fusion of clinical effectiveness and life feasibility, and improving medication adherence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent medication technology, specifically to an intelligent method for recommending medication regimens based on big data. Background Technology

[0002] In the context of rapid development in healthcare information technology, big data-based medication recommendation systems have become important tools for clinical decision support. Current technologies typically analyze clinical data such as patient diagnostic information, laboratory test results, and past medication history, combined with indications, contraindications, and drug interaction rules in drug databases, to select the theoretically optimal medication regimen for patients. For example, some systems employ collaborative filtering or deep learning models to mine medication patterns among similar patients from massive historical medical records to predict effective treatments for current patients.

[0003] However, these methods generally suffer from a fundamental flaw: they assume by default that patients are "rational individuals," meaning that as long as the recommended medication is medically safe and effective, patients will strictly adhere to the doctor's orders. But in real clinical settings, patients' medication behavior is significantly influenced by numerous non-clinical factors, including occupational characteristics, work-rest patterns, personal medication habits, economic status, and social support. For example, some medications may cause side effects such as drowsiness and dizziness. For patients who need to drive or perform delicate operations, these side effects will directly interfere with their normal work and life, potentially leading them to reduce the dosage, change the timing of medication, or even discontinue medication on their own, ultimately resulting in treatment failure or disease progression.

[0004] Current technologies lack quantitative analysis of patients' daily life scenarios and fail to consider the degree of conflict between drug side effects and patients' specific life situations. This disconnect between "clinically optimal" and "life-feasible" results in recommended medication regimens being significantly compromised in practice, creating a vicious cycle of "recommendation—non-adherence—poor efficacy—re-recommendation," which not only wastes medical resources but may also delay patients' treatment and reduce their quality of life. Summary of the Invention

[0005] The purpose of this invention is to provide an intelligent method for recommending medication regimens based on big data, thereby solving the following technical problems:

[0006] Current technologies lack quantitative analysis of patients' daily life scenarios and fail to consider the degree of conflict between drug side effects and patients' specific life situations. This disconnect between "clinically optimal" and "life-feasible" results in recommended medication regimens being significantly compromised in practice, creating a vicious cycle of "recommendation—non-adherence—poor efficacy—re-recommendation," which not only wastes medical resources but may also delay patients' treatment and reduce their quality of life.

[0007] The objective of this invention can be achieved through the following technical solutions:

[0008] A method for intelligently recommending medication regimens based on big data includes the following steps:

[0009] S1: Collect the daily activity characteristics of the target patient through the human-computer interaction interface, and retrieve the patient's medical record data from the hospital information system. The daily activity characteristics include occupation type, work and rest pattern and medication habits. The medical record data includes diagnostic information, test results and past medication history.

[0010] S2: Based on the diagnostic information and test results, query the contraindication matching database, and screen drugs from the drug database whose indications match the diagnostic information and do not contain contraindicated components corresponding to the abnormal indicators in the test results, to obtain a preliminary set of drugs;

[0011] S3: Determine the life scenario category of the target patient based on the occupation type and work-rest pattern, extract the side effects recorded in the drug instructions of each drug in the initial screening drug set, match the extracted side effects with the life scenario category based on the preset side effect-scenario interference coefficient library, and calculate the interference value of each initial screening drug for the life scenario of the target patient.

[0012] S4: Select historical patients with the same diagnostic information and the same age range as the target patient from the historical medical record database to form a reference patient group. Extract the medication records and follow-up records of each drug in the initial screening drug set from the reference patient group, and calculate the expected efficacy score of each initial screening drug.

[0013] S5: Normalize and transform the interference values ​​of the life scenarios and the expected efficacy scores respectively, and calculate the comprehensive suitability of each screening drug according to the preset fusion weight. Select the screening drug with the highest comprehensive suitability as the recommended drug output.

[0014] As a further aspect of the present invention: the specific process of screening the initial drug set in S1 is as follows:

[0015] Acquire the diagnostic information and test results of the target patient. The diagnostic information includes the disease code and disease name, and the test results include the name of the abnormal indicator and its detection value. Construct a contraindication matching library. The contraindication matching library contains the mapping relationship between drug ingredients and contraindication indicators. Each mapping relationship records the rule that a specific drug ingredient is prohibited from use when there is a specific abnormal test indicator.

[0016] Extract the indication labels and ingredient lists of each drug from the drug database; match the diagnostic information with the indication labels of each drug, and filter out drugs whose indication labels contain the disease name or disease code in the diagnostic information to obtain a candidate drug set;

[0017] For each drug in the candidate drug set, its ingredient list is extracted, and each ingredient is queried against the contraindication matching database to determine whether any ingredient of the drug exists in the contraindication rule corresponding to the abnormal index in the test results; if any ingredient of a drug matches a contraindication rule, the drug is removed from the candidate drug set; the remaining candidate drug set after the removal operation is determined as the initial screening drug set.

[0018] As a further aspect of the present invention: the specific process for determining the category of life scene in S3 is as follows:

[0019] The system obtains the occupation type and daily routine of the target patient through the human-computer interaction interface. The occupation type includes occupation name and industry category, and the daily routine includes working hours, rest day arrangement and sleep time interval. The system constructs a life scene classification tag library, which contains multiple preset scene category tags. Each scene category tag is associated with a set of occupational characteristic keywords and a set of daily routine characteristic intervals.

[0020] The process involves extracting the occupational name and industry category from the target patient's occupational type to generate an occupational feature word sequence; extracting the work hours, rest day arrangements, and sleep time intervals from the target patient's daily routine to generate a daily routine feature value sequence; performing keyword matching between the occupational feature word sequence and the set of occupational feature keywords associated with each scene category label to calculate the occupational matching degree; calculating the interval membership degree between the daily routine feature value sequence and the set of daily routine feature intervals associated with each scene category label to obtain the daily routine matching degree; performing a weighted sum of the occupational matching degree and the daily routine matching degree to obtain the comprehensive matching degree between the target patient and each scene category label; and selecting the scene category label with the highest comprehensive matching degree as the target patient's life scene category.

[0021] As a further aspect of the present invention: the specific process for obtaining the interference value of the living scene in S3 is as follows:

[0022] Obtain the drug instructions for each drug in the initial screening drug set, and extract the drug's side effect list from the drug instructions. The side effect list contains several side effect entries, and each side effect entry corresponds to a side effect name.

[0023] Obtain the target patient's life scenario category, which is a scenario category label selected from a preset life scenario classification label library that matches the target patient's occupation type and work-rest pattern; retrieve a preset side effect-scenario interference coefficient library, which contains multiple interference coefficient records, each interference coefficient record consisting of a side effect name, scenario category label, and interference coefficient value;

[0024] For each side effect entry in the current drug's side effect list, a matching search is performed in the side effect-scenario interference coefficient database using the side effect name of the entry and the target patient's life scenario category as the query key.

[0025] If a matching interference coefficient record is found, the interference coefficient value in that record is obtained; if no matching interference coefficient record is found, the interference coefficient value of the side effect is set to zero; the interference coefficient values ​​corresponding to all side effect entries of the current drug are summed to obtain the cumulative interference coefficient of the drug; the cumulative interference coefficient is determined as the interference value of the drug for the target patient's life scenario.

[0026] As a further aspect of the present invention: the specific construction process of the preset side effect-scene interference coefficient library is as follows:

[0027] Retrieve medical records of several historical patients from the historical medical record database. Each record contains the patient's scenario category tag, medication record, and follow-up visit record. The follow-up visit record contains medication behavior identifier and description of the reason for discontinuation of medication.

[0028] Extract the drug instructions for the drugs used from the medication records of each historical patient, and obtain a list of the drug's side effects from the drug instructions;

[0029] We analyzed the medication behavior markers in the follow-up visit records of each historical patient and screened out historical patients whose medication behavior markers indicated that they reduced their dosage or discontinued their medication on their own. We further analyzed the descriptions of the reasons for discontinuing medication in the screened historical patients and screened out historical patients whose descriptions of the reasons for discontinuing medication contained preset side effect keywords, thus forming a set of patients with side effect-related non-compliance.

[0030] Using each side effect name and its scenario category label for each historical patient as a composite key, count the first number of patients with the same side effect name and the same scenario category label among all historical patients, and the second number of patients with the same side effect name and the same scenario category label in the set of patients with side effect-related non-compliance.

[0031] Calculate the ratio of the second number of people to the first number of people, and use this ratio as the initial interference coefficient of the side effect name under the scene category label; iterate through all combinations of side effect names and scene category labels to obtain the initial interference coefficient matrix;

[0032] Normalize each initial interference coefficient in the initial interference coefficient matrix to obtain a standard interference coefficient mapped to a preset value range; store each set of side effect name, scene category label and its corresponding standard interference coefficient as an interference coefficient record in the side effect-scene interference coefficient library.

[0033] As a further aspect of the present invention: the specific calculation process for the expected efficacy score in S4 is as follows:

[0034] Obtain the medication records and follow-up visit records of each historical patient in the reference patient group. The medication records include a drug identification field, and the follow-up visit records include a description of the reason for the follow-up visit and a treatment plan adjustment field.

[0035] The process involves analyzing the "Reason for Follow-up Visit" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Reason for Follow-up Visit" field contains the preset keyword "poor treatment efficacy," and recording them as the first candidate set; analyzing the "Treatment Plan Adjustment" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Treatment Plan Adjustment" field contains records of changing drug labels or increasing dosages due to efficacy issues, and recording them as the second candidate set; and taking the union of the first candidate set and the second candidate set to form the set of patients with poor treatment efficacy.

[0036] For each drug in the initial screening drug set, the number of historical patients in the reference patient group whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of users; the number of historical patients in the ineffective treatment patient set whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of failures; the difference between the number of users and the number of failures is calculated to obtain the number of effective patients for the drug; the ratio of the number of effective patients to the number of users is calculated, and this ratio is used as the expected efficacy score for the drug.

[0037] As a further aspect of the present invention: the specific calculation process for the overall suitability of each initially screened drug in S5 is as follows:

[0038] Obtain the normalized daily life scenario interference value and normalized expected efficacy score for each initially screened drug; obtain the preset efficacy weight coefficient and interference weight coefficient, wherein the sum of the efficacy weight coefficient and interference weight coefficient is one.

[0039] For each initially screened drug, the product of the normalized expected efficacy score and the efficacy weight coefficient is calculated to obtain a first weighted value; the difference between the first and normalized life scenario interference values ​​is calculated, and the product of the difference and the interference weight coefficient is used as a second weighted value; the first weighted value and the second weighted value are added together to obtain the overall suitability of the initially screened drug.

[0040] As a further aspect of the present invention: In step S5, if two or more preliminary screening drugs have equal overall suitability and both are at their maximum values, then the drug instructions for each preliminary screening drug are obtained, and the daily dosing frequency and single dosing dose are extracted from the drug instructions; the daily dosing frequency of each preliminary screening drug is compared, and the drug with the lowest daily dosing frequency is selected as the recommended drug; if the daily dosing frequency is equal, then the single dosing dose of each drug is compared, and the drug with the lowest single dosing dose is selected as the recommended drug.

[0041] The beneficial effects of this invention are:

[0042] 1) Traditional medication recommendation methods only focus on the matching relationship between disease diagnosis and drug indications, assuming that patients will unconditionally comply with medical advice, but neglecting the decisive influence of patients' occupational characteristics and work-rest patterns on their medication behavior. It is understandable that patients who need to drive or work at heights would find it difficult to adhere to medications with drowsiness side effects, even if the medication is highly effective. Therefore, this invention collects patients' occupational types and work-rest patterns to construct individualized life scenario categories and establishes a side effect-scenario interference coefficient library, quantitatively matching the side effects listed in the drug instructions with the patient's specific life scenarios. When a drug's side effects significantly interfere with a patient's daily work or life, its life scenario interference value increases accordingly and will be automatically suppressed in the recommendation decision. This mechanism ensures that the recommendation results are highly compatible with the patient's actual life while guaranteeing efficacy, eliminating the inherent contradiction between "clinically optimal" and "lifestyle feasibility" from the source. This eliminates the difficult choice between "treatment" and "work" for patients, significantly improving medication adherence and ensuring that the treatment plan is fully implemented.

[0043] 2) This invention, by analyzing non-adherence data from real-world follow-up visit records, establishes the side effect-scenario interference coefficient based on actual clinical feedback, significantly improving the authenticity and reliability of the calculation of life scenario interference values. Traditional methods for assessing drug side effects only consider the incidence rate recorded in the drug instructions, failing to answer the crucial question: "Under what circumstances would this side effect become intolerable for the patient?" In fact, the impact of the same side effect varies drastically in different life scenarios. For example, drowsiness might be only a mild discomfort for a retired elderly person, but for a professional driver, it could directly lead to discontinuation of medication. This invention obtains patient follow-up visit records from a historical medical record database and, by analyzing the medication behavior markers and discontinuation reason descriptions in these records, accurately identifies real cases of patients reducing their dosage or discontinuing medication on their own due to side effects. When patients proactively inform the doctor during follow-up visits that they "discontinued medication on their own because drowsiness affected their work," or when the doctor's record clearly states that "the patient reported that the side effect was intolerable and requested a change of medication," these follow-up visit records constitute strong evidence that a specific side effect led to non-adherence in a specific life scenario. By statistically analyzing the ratio of the number of patients who did not adhere to medication for each side effect in each scenario category to the total number of users, the interference coefficient constructed in this invention is directly derived from patients' actual medication behavior feedback rather than theoretical deduction. This mechanism enables the life scenario interference value to truly reflect the actual degree of interference of different side effects on different life scenarios, avoiding weight assignment based on subjective assumptions and providing a reliable data foundation for subsequent recommendation decisions.

[0044] 3) This invention constructs a multi-dimensional fusion decision-making mechanism to achieve truly personalized and precise recommendations. The quality of a medication regimen cannot be determined solely by its efficacy; it also requires finding the optimal balance between efficacy and the patient's quality of life. This invention normalizes the interference value of daily life scenarios and the expected efficacy score separately, and then weights and fuses them through preset weights to obtain the comprehensive suitability of each drug. This mechanism allows for dynamic adjustment of the balance between efficacy and life interference based on the actual situation of different patients. For example, efficacy can be appropriately emphasized for patients with critical illnesses, while life compatibility can be appropriately emphasized for those with special occupations or high requirements for daily routines. When multiple drugs have the same comprehensive suitability, this invention further introduces daily dosing frequency and single dosing dosage as a progressive selection criterion, prioritizing the regimen with the least medication burden. This progressive decision-making mechanism, from a two-dimensional balance of "efficacy-life interference" to a refined comparison of "dosing complexity," ensures that the recommendation results minimize the interference with the patient's daily life while ensuring efficacy, and also takes into account the convenience of medication administration, truly achieving precise medication recommendations that vary from person to person and from life scenario to life scenario. Attached Figure Description

[0045] The invention will now be further described with reference to the accompanying drawings.

[0046] Figure 1 This is a schematic diagram of a method for intelligently recommending medication plans based on big data, according to the present invention. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] Please see Figure 1 As shown, this invention is an intelligent medication recommendation method based on big data, comprising the following steps:

[0049] S1: Collect the daily activity characteristics of the target patient through the human-computer interaction interface, and retrieve the patient's medical record data from the hospital information system. The daily activity characteristics include occupation type, work and rest pattern and medication habits. The medical record data includes diagnostic information, test results and past medication history.

[0050] First, when target patients visit the clinic, a human-computer interaction interface deployed in the doctor's office or on the patient's mobile device guides the patient or their family to input non-clinical characteristics closely related to daily life. Standardized input options are provided, such as preset categories for occupation like "driver," "programmer," and "construction worker," or allowing free text input which is then converted into standardized labels through natural language processing. Daily routines are collected through structured forms, including start and end times of workdays, rest day arrangements, average sleep duration and time periods. Medication habits are collected based on patient preferences for drug dosage forms (e.g., willingness to receive injections, preference for extended-release formulations), and the regularity of past medication use (e.g., frequent missed doses). This data is encapsulated into a daily activity feature vector.

[0051] Simultaneously, the medical record data of the target patient is automatically retrieved from the hospital information system using a communication protocol conforming to medical data interface standards (such as HL7 / FHIR). Diagnostic information includes disease codes (such as ICD-10 codes) for the primary diagnosis and complications, along with the corresponding disease names. Laboratory test results include the names of laboratory tests, test values, and abnormality indicators (such as ALT values ​​for liver function, eGFR values ​​for kidney function, and white blood cell count in a complete blood count), as well as imaging findings. Past medication history includes the names of medications recorded in historical prescriptions, the start and end dates of medication use, dosage, frequency, and the doctor's evaluation of treatment effectiveness. All of the above data is linked and integrated using the target patient's unique identifier (such as outpatient number or inpatient number) as an index, and stored in an in-memory database or cache to form a basic patient feature database for subsequent steps.

[0052] S2: Based on the diagnostic information and test results, query the contraindication matching database, and screen drugs from the drug database whose indications match the diagnostic information and do not contain contraindicated components corresponding to the abnormal indicators in the test results, to obtain a preliminary set of drugs;

[0053] A contraindication matching library was pre-built, storing in a structured format rules prohibiting the use of drug components against specific abnormal test results. For example, the rule "metformin - eGFR < 30 ml / min" indicates that metformin should be contraindicated when the patient's estimated glomerular filtration rate is below 30; "atorvastatin - transaminase > 3 times the upper limit of normal" indicates that statins should be contraindicated or adjusted when transaminase levels are significantly elevated. These rules are derived from drug instructions, clinical guidelines, and drug interaction knowledge bases and are updated regularly.

[0054] In practice, the disease name or code from the diagnostic information of the target patient obtained in S1 is first read and used as a query condition to filter out all drugs whose indication labels match the diagnosis from the drug database, forming a candidate drug set. Each record in the drug database contains fields such as generic name, brand name, indication label (e.g., "for type 2 diabetes"), and ingredient list (e.g., "each tablet contains 500mg of metformin hydrochloride").

[0055] Subsequently, for each drug in the candidate drug set, each component in its ingredient list was extracted and compared one by one with the contraindication matching library. Specifically, abnormal indicators in the patient's test results (such as eGFR = 25 ml / min) were matched with rules in the contraindication matching library related to that indicator, checking whether any component of the drug appeared in any successfully matched contraindication rule. If so, the drug was considered to contain a contraindicated component that conflicted with the patient's current physiological state and was removed from the candidate set. For example, if the patient's eGFR was 25, all drugs containing metformin were removed. After completing the contraindication verification for all drugs, the remaining drugs constituted the initial screening drug set. Drugs posing a clear safety risk to the patient were excluded, provided the treatment direction was correct.

[0056] S3: Determine the life scenario category of the target patient based on the occupation type and work-rest pattern, extract the side effects recorded in the drug instructions of each drug in the initial screening drug set, match the extracted side effects with the life scenario category based on the preset side effect-scenario interference coefficient library, and calculate the interference value of each initial screening drug for the life scenario of the target patient.

[0057] First, the occupational types and work-rest patterns collected by S1 need to be mapped to predefined life scenario category labels. A life scenario category label library was constructed, containing several common scenario category labels, such as "driver," "precision operator," "clerk requiring daytime alertness," "shift worker with irregular work-rest schedule," and "retired homebody." Each scenario category label is associated with a set of occupational characteristic keywords (e.g., "driver" is associated with "driver, driver, designated driver") and a set of work-rest characteristic intervals (e.g., "driver's" work hours typically cover the core daytime hours). The system extracts keywords from the target patient's occupational type and numerical features from their work-rest patterns (e.g., the start and end points of workdays, whether there is a lunch break, etc.), calculating the occupational matching degree (the weighted sum of the number of matching keywords and their weights) and the work-rest matching degree (the membership degree of feature values ​​falling into each scenario's work-rest interval). The overall matching degree between the target patient and each scenario category label is obtained through weighted summation, and the highest value is selected as the patient's life scenario category.

[0058] Next, for each drug in the initial screening set, the list of side effects from its package insert is extracted from the drug database. This list is typically in a structured or semi-structured format, such as "Common: Drowsiness (incidence >10%), Dizziness (1%-10%)". Each side effect name (e.g., "Drowsiness") is extracted. Then, a pre-defined side effect-scenario interference coefficient library is retrieved. The construction process of this library will be detailed later; its core is that each record consists of a side effect name, a scenario category label, and an interference coefficient value. The interference coefficient value is a standardized numerical value between 0 and 1, reflecting the average degree of interference of the side effect on the normal life of patients in that scenario category. For example, the library might record an interference coefficient of 0.9 for "Drowsiness - Driver" and 0.2 for "Drowsiness - Retirement at Home".

[0059] For each side effect name of the current medication, a matching search is performed in the side effect-scenario interference coefficient database using the side effect name and the patient's life scenario category as the key. If a matching record is found, the corresponding interference coefficient value is obtained; if no match is found (e.g., a rare side effect has no historical data), the interference coefficient for that side effect is set to 0 (i.e., considered to have no known interference). After iterating through all the side effects of the current medication, all the obtained interference coefficient values ​​are summed to obtain the cumulative interference coefficient of the medication, which is the interference value of the medication for the target patient's life scenario. The larger the interference value, the more serious the potential interference of the medication's side effect on the patient's life scenario, and the higher the likelihood of the patient not adhering.

[0060] This side effect-scenario interference coefficient library is built based on historical medical record data through data mining. It retrieves a large number of historical patients' medical records from the database. Each record includes a scenario category tag for that patient (pre-labeled based on their occupation and daily routine, using the same labeling method as S3), medication records (including the identifiers of the medications used), and follow-up visit records. The follow-up visit records contain two key fields: first, a medication behavior identifier, which is selected or filled in by the doctor based on the patient's complaints during the follow-up visit, such as "self-reduced dosage," "self-discontinued medication," "took medication on time," etc.; second, a description of the reason for discontinuing medication. If the patient discontinues medication, the doctor will record the specific reason, such as "discontinued medication due to drowsiness affecting work," "discontinued medication due to perceived improvement in symptoms," etc.

[0061] First, the medication records of all historical patients are analyzed to obtain a list of side effects for each drug (extracted from the drug instructions). Then, for each historical patient, the system uses the name of each side effect of the drug they used and its corresponding scenario category tag as a key to associate the patient's medication behavior identifier and the description of the reason for discontinuation. The system filters out patients whose medication behavior identifier is "self-reduction" or "self-discontinuation," and further filters out patients who discontinued medication whose description of the reason for discontinuation contains preset side effect keywords (such as "drowsiness," "dizziness," and "nausea"). These patients are considered to have non-adherence behavior that is likely caused by side effects. These patients are included in the "side effect-related non-adherence patient set."

[0062] Next, for each combination of (side effect name, scenario category label), the total number of patients with that combination across all historical patients (i.e., the number of patients who have used the drug with that side effect and belong to that scenario category) is counted, denoted as the first number; then, the number of patients belonging to the side effect-related non-compliance patient set under that combination is counted, denoted as the second number. The ratio of the second number to the first number is calculated to obtain the initial interference coefficient for that side effect under that scenario category. This ratio essentially reflects the actual probability of non-compliance behavior when patients with specific life scenarios encounter a specific side effect. All combinations of side effect names and scenario category labels are iterated to obtain the initial interference coefficient matrix. To eliminate bias caused by differences in sample size between different combinations, the coefficients in the matrix are normalized, for example, by using min-max normalization to map them to the [0,1] interval, obtaining the standard interference coefficient. Finally, each group (side effect name, scenario category label, standard interference coefficient) is stored as a record in the side effect-scenario interference coefficient database.

[0063] S4: Select historical patients with the same diagnostic information and the same age range as the target patient from the historical medical record database to form a reference patient group. Extract the medication records and follow-up records of each drug in the initial screening drug set from the reference patient group, and calculate the expected efficacy score of each initial screening drug.

[0064] To evaluate the actual efficacy of each initial screening drug in similar populations, a reference patient population was formed by selecting patients from a historical medical record database who shared the same primary diagnosis (e.g., both had "type 2 diabetes") and were within the same predefined age range (e.g., 18-30 years, 31-45 years, 46-60 years, etc.). This population was homogeneous with the target patients in terms of disease and age, two key factors influencing efficacy, and could serve as a reliable reference for predicting efficacy.

[0065] For each drug in the initial screening drug set, the number of patients in the reference patient group whose medication records contain the drug's identifier is first counted, denoted as "Number of Users". Then, the follow-up visit records of these patients are analyzed in detail. These follow-up visit records contain two key information sources: first, a field describing the reason for the follow-up visit, recording the patient's chief complaint, such as "poor blood sugar control" or "ineffective medication"; second, a field describing treatment plan adjustments, recording the doctor's adjustments to the original treatment plan based on the follow-up visit, such as "replacing with [drug name]" or "increasing the dosage".

[0066] Natural language processing (NLP) was used to analyze these two fields: patients whose follow-up visit reason description field contained preset keywords for poor efficacy (such as "ineffective," "poor," "no effect," "not meeting standards") were selected and denoted as the first candidate set; simultaneously, patients whose treatment plan adjustment field contained records of changing drug identification due to efficacy issues (such as "switched to another drug name") or increasing dosage due to efficacy issues (such as "increased dosage") were selected and denoted as the second candidate set. The union of the first and second candidate sets yielded the "poor efficacy patient set" for that drug. Patients in this set were considered to have failed to achieve satisfactory efficacy during actual medication use.

[0067] The number of patients in the group with poor efficacy is recorded as the "number of failures". The difference between the "number of users" and the "number of failures" gives the "number of effective patients" in the reference group. Finally, the ratio of effective patients to users is calculated, and this ratio is used as the expected efficacy score for the drug. This score is a value between 0 and 1; the closer it is to 1, the better the drug's efficacy in a similar population.

[0068] S5: Normalize and transform the interference values ​​of the life scenarios and the expected efficacy scores respectively, and calculate the comprehensive suitability of each screening drug according to the preset fusion weight. Select the screening drug with the highest comprehensive suitability as the recommended drug output.

[0069] First, both scores are normalized, mapping them to a unified 0-1 range. The normalization method can employ min-max standardization, transforming the data based on the maximum and minimum values ​​from historical data. Next, a preset fusion weight is obtained, which can be adjusted according to clinical application scenarios: for example, for general chronic disease management, the efficacy weight can be set to 0.6 and the lifestyle interference weight to 0.4; for patients with specific occupations, the lifestyle interference weight can be appropriately increased. The overall fit is calculated as: Efficacy Weight × Normalized Efficacy Score + Interference Weight × (1 - Normalized Lifestyle Interference Value). The sum of the interference weight and efficacy weight is 1. After weighted calculation, each drug receives an overall fit value between 0 and 1, which comprehensively reflects the drug's overall advantages in both efficacy and lifestyle compatibility. Finally, the drug with the highest overall fit is selected as the recommended treatment plan and presented to doctors and patients through the doctor's workstation or patient-side app.

[0070] It is worth noting that this invention considers the patient's daily life scenarios as a decision-making dimension of equal importance to clinical indicators. Its core lies in recognizing that the success of drug treatment depends not only on the match between the drug and the disease, but also on the patient's adherence to treatment. Traditional recommendation methods often assume patients are "rational individuals," ignoring the behavioral constraints of individuals in the real world. This invention, however, integrates the patient's life and work needs into the recommendation algorithm, ensuring that the recommended solutions are highly compatible with the patient's occupational characteristics and daily routines while guaranteeing efficacy, thereby improving medication adherence from the source. This "clinical-life dual-dimensional optimization" paradigm expands medication recommendation from simply "disease treatment" to "holistic patient care," providing a new technological path for achieving precision medicine and personalized treatment.

[0071] In a preferred embodiment of the present invention, the specific process of screening the initial drug set in S1 is as follows:

[0072] First, the system needs to obtain the target patient's diagnostic information and test results. For example, the doctor may record in the electronic medical record that the patient's primary disease is "essential hypertension (ICD-10 code I10)," and a recent test report shows that "alanine aminotransferase (ALT) is 85 U / L, exceeding the upper limit of normal." This information forms the basis for medication safety. Next, the system will refer to a pre-built contraindication matching database. This database is a collection of knowledge compiled from authoritative information in drug instructions, clinical guidelines, and drug interaction databases. It clearly records the rules for prohibiting the use of each drug component and specific abnormal test indicators. For example, "drugs containing nifedipine are contraindicated when the liver function indicator ALT exceeds 80 U / L," because nifedipine's metabolism depends on the liver, and abnormal liver function can easily lead to drug accumulation and toxicity. Next, the system retrieves the indication labels and ingredient lists of all candidate drugs from the drug database. The indication label is the applicable disease clearly marked when the drug was approved, such as "for essential hypertension," while the ingredient list details all the chemical components contained in the drug. By comparing patients' diagnostic information with the indication labels of drugs, drugs whose indication labels explicitly include "essential hypertension" or its corresponding code are screened out. These drugs are effective in treating the target disease, thus obtaining a preliminary set of candidate drugs, such as nifedipine, enalapril, and hydrochlorothiazide. Based on this, for each drug in the candidate set, each component in its ingredient list is extracted and matched against contraindication rules in a contraindication matching library associated with abnormal patient indicators (such as elevated ALT). For example, when examining nifedipine, the contraindication library found a rule that "nifedipine is contraindicated in cases of abnormal liver function (ALT > 80 U / L)," and the patient's ALT was exactly 85 U / L, meeting this contraindication condition. Therefore, nifedipine was deemed to pose a safety risk and needed to be removed from the candidate set. After checking all candidate drugs against the rules of ingredients and contraindications, the final set of drugs that are both appropriate for the symptoms and have no clear contraindications is the initial screening set. For example, enalapril and hydrochlorothiazide may remain as relatively safe antihypertensive drugs even when liver function is abnormal. This lays a safe and appropriate foundation for further evaluation of the drug's suitability for the patient's life.

[0073] By employing rigorous contraindication matching rules, medications that, while appropriate for the symptoms, may harm the patient can be excluded at the very beginning of the recommendation process. This ensures that all subsequent assessments are based on absolute safety, avoiding medication risks caused by overlooking abnormal individual test results. Simultaneously, this step rapidly reduces thousands of medications to a finite set that meets basic criteria, significantly alleviating the computational burden of subsequent refined assessments and allowing the recommendation system to focus on truly worthwhile options. For the entire medication recommendation methodology, this fundamental screening step is the first line of defense ensuring the safety and reliability of the recommendation results. It directly echoes the progressive decision-making logic of "safety first, then effectiveness, then suitability," providing an indispensable prerequisite for ultimately generating personalized medication plans that meet both medical requirements and fit the patient's lifestyle.

[0074] In another preferred embodiment of the present invention, the specific process for determining the life scene category in step S3 is as follows:

[0075] First, it's necessary to obtain the occupation type and daily routine information entered by the target patient through the human-computer interaction interface. For example, when a patient seeks medical attention, they might fill in their occupation as "taxi driver," industry category as "transportation," and daily routine as "working from 7 am to 7 pm daily, with one day off per week, and sleeping from 11 pm to 6 am." This information directly reflects the basic framework of the patient's daily activities, as occupation determines a person's main daytime activities and environment, while daily routine determines their time allocation and fatigue level. Next, a pre-built life scenario classification tag library will be invoked. This library is designed based on extensive population surveys and medical common sense, and contains multiple preset scenario category tags, such as "long-duration driving / operating machinery," "high-intensity mental labor," "outdoor physical labor," "shift work," and "home recuperation." Each scenario tag is associated with a corresponding set of occupational characteristic keywords and a set of daily routine characteristic intervals. For example, the scenario tag "long-term driving / operating machinery" includes occupational characteristic keywords such as "driver, driver, pilot, forklift operator" and work-rest characteristic ranges such as "continuous working time greater than 6 hours" and "night driving hours"; while "high-intensity mental labor" is associated with keywords such as "programmer, analyst, designer" and work-rest characteristics such as "irregular working hours and need for high concentration".

[0076] Subsequently, key information is extracted from the occupation types entered by the patient. For example, the core word "driver" is extracted from the occupation title "taxi driver," and related words such as "transportation" may be extracted from the industry category "transportation," forming a sequence of occupational feature words. Similarly, specific values ​​are extracted from the patient's work-rest patterns, such as 12-hour workdays, 7-day rest intervals, and 7-hour sleep duration, forming a set of work-rest feature value sequences. For each preset scenario category label, the system compares the patient's occupational feature word sequence with the set of occupational feature keywords associated with that label. The occupational matching degree is obtained by calculating the number of matching keywords or the similarity between the two. For example, the word "driver" matches the keywords in the "long-distance driving" scenario label, so the occupational matching degree of that label is high; while the matching degree is very low for irrelevant labels such as "programmer." Simultaneously, the system compares the patient's daily routine feature value sequence with the daily routine feature interval set for each scenario label, determining whether these values ​​fall within the corresponding interval or calculating their proximity to the interval, thus obtaining the daily routine matching degree. For example, a patient working continuously for 12 hours clearly meets the interval requirement of "continuous working time greater than 6 hours" in the "long-distance driving" scenario, therefore their daily routine matching degree is also high. After obtaining the occupational matching degree and daily routine matching degree for each scenario label, the system performs a weighted sum of the two according to preset weights (e.g., occupation accounts for 60%, daily routine accounts for 40%) to calculate the comprehensive matching degree between the patient and each scenario label. Finally, the scenario category label with the highest comprehensive matching degree is selected as the final life scenario category for the target patient. For example, for this taxi driver, calculations show that the matching degree of the "long-distance driving / operating machinery" label is much higher than other labels, so the system determines it as the patient's life scenario category.

[0077] It's understandable that a patient's occupation and daily routine are core components of their daily life, directly determining their physical and mental needs at different times of the day. Medication side effects can interfere with these needs. Without systematically extracting and categorizing this information, subsequent side effect interference assessments cannot be conducted, as each patient's occupation and routine are vastly different and cannot be directly linked to a pre-defined interference coefficient library. By constructing a scenario classification label library, the complex individual life characteristics can be abstracted into a limited number of representative typical scenarios, making subsequent matching and calculation possible. The advantages of this approach are twofold: firstly, it standardizes the processing of patient life information, allowing the algorithm to efficiently access pre-stored interference coefficients; secondly, through dual matching of occupation and routine, it more accurately captures the patient's true life state, avoiding biases caused by a single dimension. It's understandable that only by accurately identifying which life scenario the patient belongs to can the actual interference level of different drug side effects on that scenario be assessed in a targeted manner. This allows for prioritizing drugs that have the least impact on the patient's work and life while ensuring efficacy, ultimately improving medication adherence and treatment effectiveness.

[0078] In another preferred embodiment of the present invention, the specific process for obtaining the interference value of the living scene in step S3 is as follows:

[0079] First, for each drug in the initial screening set, its instruction leaflet needs to be obtained individually. For example, for the two antihypertensive drugs retained after the initial screening, enalapril and hydrochlorothiazide, their electronic instruction leaflets need to be retrieved. Drug instruction leaflets are legally binding technical documents approved by the National Medical Products Administration. The "Adverse Reactions" section clearly lists the various side effects that the drug may cause using standardized medical terminology. For example, the enalapril instruction leaflet lists "dizziness, dry cough, fatigue," while the hydrochlorothiazide instruction leaflet lists "dizziness, hypokalemia, photosensitivity." By parsing these structured electronic documents, the names of the corresponding side effects for each drug are extracted, forming a side effect list for that drug. Each side effect corresponds to an independent entry; for example, the enalapril side effect list includes two entries: "dizziness" and "dry cough."

[0080] Next, the previously identified life scenario categories for the target patient are retrieved. For example, based on the steps described above, this patient, a taxi driver, is categorized under the "long-duration driving / operating machinery" scenario. This scenario category label is selected from a pre-defined life scenario classification label library, representing the core scenarios in the patient's daily activities where safety and alertness are most critical. Subsequently, a pre-built side effect-scenario interference coefficient library is retrieved. This library was learned by analyzing massive amounts of historical patient follow-up records and medication behavior data. It stores the degree of interference of each side effect on each life scenario. For example, "dizziness" has a high interference coefficient for the "long-duration driving" scenario because dizziness directly impairs the driver's balance and judgment, significantly increasing the risk of accidents; while "dry cough" has a low interference coefficient for the same scenario because coughing, although uncomfortable, usually does not directly endanger driving safety.

[0081] For the currently evaluated drug, such as enalapril, the system iterates through each side effect entry in its side effect list. For the side effect "dizziness," it uses "dizziness" as the side effect name and "long-distance driving" as the scenario category label, combining these two into a query condition and searching the side effect-scenario interference coefficient database. Since the database does indeed contain a record of the interference coefficient for "dizziness" on "long-distance driving," the system retrieves the stored interference coefficient value. Next, it processes the next side effect, "dry cough," again using "dry cough" and "long-distance driving" as query conditions. If a corresponding record exists in the database, its value is retrieved; otherwise, if not (e.g., the impact of "dry cough" on driving is not explicitly recorded), the system sets the interference coefficient value for that side effect to zero. After searching all side effects, the interference coefficient values ​​for all enalapril side effects are summed to obtain the cumulative interference coefficient of the drug. This value represents the interference value of enalapril for the taxi driver's life scenario. The same process is repeated for hydrochlorothiazide to calculate its cumulative interference coefficient. These values ​​will serve as a key basis for subsequent assessments of the compatibility between the drug and the patient's life scenario.

[0082] It's understandable that the side effects of each medication are often diverse, and the degree to which different side effects interfere with the same daily life varies significantly, making it impossible to summarize them with a single, general indicator. By precisely matching individual side effects with specific life scenarios, we can capture the differentiated impact of different side effects on patients' core activities. For example, dizziness and drowsiness are far more harmful to driving than dry mouth or weakness in the limbs. Simply lumping all side effects together would mask this crucial difference, leading to distorted assessments. However, by using a pre-defined interference coefficient library, we can transform the real medication feedback from thousands of patients in historical big data into quantifiable coefficients, ensuring that assessment results are based on real-world evidence rather than subjective speculation. The benefits of this approach are twofold: firstly, it provides doctors and patients with intuitive and comparable quantitative evidence, clearly explaining why a certain medication is unsuitable for patients in a particular profession; secondly, by summing up the comprehensive interference values, we can conduct horizontal comparisons between different medications, providing a clear ranking basis for subsequent recommendation decisions. This allows for the precise identification of medications that minimize disruption to patients' daily work and life, while ensuring efficacy and safety. This eliminates medication non-adherence issues caused by side effects and life conflicts at the source, ensuring that patients can fully implement the treatment plan and ultimately achieve better treatment results.

[0083] In another preferred embodiment of the present invention, the specific construction process of the preset side effect-scene interference coefficient library is as follows:

[0084] First, a large amount of historical patient medical records needs to be retrieved from the historical medical record database. Each record contains the patient's scenario category tag, medication records, and follow-up visit records. The scenario category tag is pre-labeled based on the patient's past occupation and work-rest patterns, according to the aforementioned scenario classification method. For example, a record might be labeled as "long-distance driving." The medication records detail the names of the medications the patient has used, the dates of administration, and other information. The follow-up visit records include the doctor's notes on the patient's medication behavior during subsequent visits, such as "whether the dosage was reduced on their own" or "whether the medication was discontinued on their own," as well as the patient's stated reasons for discontinuing the medication, such as "I felt very dizzy after taking the medication and couldn't drive, so I stopped taking it myself." These follow-up visit records are first-hand clinical information collected by doctors during consultations, truly reflecting the patient's actual behavior and subjective feelings during medication use.

[0085] Next, for each patient's history, the system extracts the name of each medication used from their medication records, then retrieves the corresponding medication's instruction leaflet, and obtains a complete list of side effects from the "Adverse Reactions" section of the leaflet. For example, a patient whose scenario tag is "long-distance driving" has medication records showing that they have used "enalapril." The system then extracts the enalapril instruction leaflet and obtains a list of side effects including "dizziness, dry cough, and fatigue."

[0086] Subsequently, the medication behavior markers in each patient's follow-up visit records were analyzed to identify those whose medication behavior markers were recorded by the doctor as "self-reduction of dosage" or "self-discontinuation of medication." These markers indicate that the patient did not follow medical advice during medication use, and such non-compliance often has a reason. For these selected patients, the descriptions of the reasons for discontinuing medication in their follow-up visit records were further analyzed, such as "dizziness after taking the medication, affecting driving" or "drowsiness all day after taking the medication, unable to work." Natural language processing technology was used to identify whether these descriptions contained preset side effect keywords, such as "dizziness," "drowsiness," "nausea," and "fatigue." Only patients whose descriptions of the reasons for discontinuing medication contained side effect keywords were included in the "side effect-related non-compliance patient set." This screening process ensured that the non-compliance behaviors included in the statistics were indeed caused by side effects, rather than by poor efficacy, economic reasons, or other factors.

[0087] Next, using the name of each side effect and its associated scenario category label for each historical patient as the key, two rounds of statistical analysis are conducted. In the first round, the total number of patients with the same side effect name and scenario category label is counted. For example, the number of patients who used medications with "dizziness" as a side effect and whose scenario category was "long-distance driving" is recorded as the first number. In the second round, the number of patients with the same side effect name and scenario category label in the previously constructed "side effect-related non-compliance patient set" is counted. For example, among patients using medications with "dizziness" as a side effect in the aforementioned "long-distance driving" scenario, the number who voluntarily reduced their dosage or discontinued medication due to "dizziness" is recorded as the second number. These two rounds of statistical analysis are possible because the historical medical records fully document the patient's medication information, side effect information, and scenario information. By linking this information, the actual impact of a specific side effect on a specific population can be reconstructed.

[0088] Then, for each combination of side effect name and scenario category label, the ratio of the second number of patients to the first number of patients is calculated. For example, in the "long-distance driving" scenario, if there are a total of 500 patients using medication with the side effect of "dizziness," and 300 of them reduce their dosage or stop taking the medication on their own due to "dizziness," then the ratio for this combination is 0.6. This ratio represents the proportion of patients who do not adhere to a certain side effect in a specific scenario; the higher the proportion, the more severe the interference of the side effect on this scenario. By iterating through all possible combinations of side effect names and scenario category labels, an initial interference coefficient matrix is ​​obtained, where each value in the matrix represents the initial interference coefficient of a certain side effect on a certain scenario.

[0089] Finally, since the initial sample size may vary across different combinations, directly using the original ratios could lead to excessively large fluctuations in coefficients for some small sample combinations. Therefore, it is necessary to normalize the initial interference coefficient matrix. The purpose of normalization is to map all initial interference coefficients to a unified preset numerical range, such as between zero and one, making the interference coefficients comparable across different side effects and scenarios. After normalization, each set of side effect names, scenario category labels, and their corresponding standard interference coefficients becomes a complete interference coefficient record. Storing all such records constitutes the preset side effect-scenario interference coefficient library. This library can be retrieved at any time in the subsequent medication recommendation process to calculate the medication-life scenario interference value for each new patient.

[0090] It's understandable that while drug instructions list the probability of side effects, they don't answer the crucial question: "Under what circumstances would this side effect become unbearable for the patient?" The same side effect, such as drowsiness, might be a minor inconvenience for a retired elderly person, but could lead to discontinuation of medication for a professional driver. This difference can only be discovered by analyzing real patients' medication behavior. By analyzing medication behavior markers and discontinuation reasons in follow-up visit records, we can capture patients' actual choices when facing side effects in real life. This behavioral data can be converted into quantified interference coefficients, ensuring that subsequent assessments are based on real-world evidence rather than subjective expert judgment. The advantage of this approach is that the interference coefficients accurately reflect the actual degree of interference from different side effects in different life scenarios, avoiding a disconnect between theoretical deductions and reality.

[0091] In another preferred embodiment of the present invention, the specific calculation process of the expected efficacy score in step S4 is as follows:

[0092] Obtain the medication records and follow-up visit records of each historical patient in the reference patient group. The medication records include a drug identification field, and the follow-up visit records include a description of the reason for the follow-up visit and a treatment plan adjustment field.

[0093] The process involves analyzing the "Reason for Follow-up Visit" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Reason for Follow-up Visit" field contains the preset keyword "poor treatment efficacy," and recording them as the first candidate set; analyzing the "Treatment Plan Adjustment" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Treatment Plan Adjustment" field contains records of changing drug labels or increasing dosages due to efficacy issues, and recording them as the second candidate set; and taking the union of the first candidate set and the second candidate set to form the set of patients with poor treatment efficacy.

[0094] For each drug in the initial screening drug set, the number of historical patients in the reference patient group whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of users; the number of historical patients in the ineffective treatment patient set whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of failures; the difference between the number of users and the number of failures is calculated to obtain the number of effective patients for the drug; the ratio of the number of effective patients to the number of users is calculated, and this ratio is used as the expected efficacy score for the drug.

[0095] It's understandable that follow-up visit records are the most direct behavioral traces left by patients after medication use. When patients proactively tell their doctors during follow-up visits that "this medicine isn't working," "my blood pressure still won't go down," or "my blood sugar isn't well controlled," these statements provide firsthand evidence of insufficient drug efficacy. When doctors record in their medical records, "due to poor efficacy, we switched to [specific medication name]" or "we increased the dosage based on the original regimen," these adjustments confirm the doctor's professional judgment regarding the drug's ineffectiveness. Combining these two types of evidence constitutes a complete evaluation of the drug's true efficacy, encompassing both the patient's subjective feelings and the doctor's objective judgment. This mutual corroboration is more reliable than data from a single source. By statistically analyzing the total number of people using a particular drug and the number experiencing poor efficacy, the ratio of effective users to users is calculated, yielding the drug's "efficacy rate" in a similar population. This ratio directly reflects the drug's actual performance in similar patients. This evaluation based on real efficacy effectively bridges the gap between clinical trials and clinical practice, making recommendations more closely aligned with the actual situation of the target patients. For example, a new drug may have an efficacy rate as high as 90% in clinical trials, but in the real world, the need for strict adherence to medication schedules may make it difficult to maintain, resulting in a significantly lower actual number of effective patients. Conversely, an older drug, although theoretically only having an 80% efficacy rate, may have a higher number of effective patients due to its ease of use and fewer side effects, making it easier for patients to adhere to the treatment plan. The expected efficacy score calculated from follow-up visit records can precisely capture this difference, thus avoiding recommending drugs that are "theoretically good but actually ineffective" to target patients.

[0096] In another preferred embodiment of the present invention, the specific calculation process for the overall suitability of each initially screened drug in step S5 is as follows:

[0097] Obtain the normalized daily life scenario interference value and normalized expected efficacy score for each initially screened drug; obtain the preset efficacy weight coefficient and interference weight coefficient, wherein the sum of the efficacy weight coefficient and interference weight coefficient is one.

[0098] For each initially screened drug, the product of the normalized expected efficacy score and the efficacy weight coefficient is calculated to obtain a first weighted value; the difference between the first and normalized life scenario interference values ​​is calculated, and the product of the difference and the interference weight coefficient is used as a second weighted value; the first weighted value and the second weighted value are added together to obtain the overall suitability of the initially screened drug.

[0099] In another preferred embodiment of the present invention, in step S5, if two or more preliminary screening drugs have equal overall suitability and both are at their maximum values, then the drug instructions for each preliminary screening drug are obtained, and the daily dosing frequency and single dosing dose are extracted from the drug instructions; the daily dosing frequency of each preliminary screening drug is compared, and the drug with the lowest daily dosing frequency is selected as the recommended drug; if the daily dosing frequency is equal, then the single dosing dose of each drug is compared, and the drug with the lowest single dosing dose is selected as the recommended drug.

[0100] Understandably, in clinical medication decisions, when two drugs are neck and neck in a comprehensive assessment of core dimensions, seemingly minor differences can become key factors influencing patients' actual medication behavior. Daily dosing frequency is a crucial factor affecting medication adherence; lower frequency means a lower probability of missed doses and a greater likelihood of long-term adherence. Single-dose dosage relates to drug acceptability and safety; smaller doses generally mean less physiological burden on the patient and are more easily accepted. By using these two dimensions as the basis for selection when both are equal, the granularity of decision-making is further refined, moving from a balance between efficacy and lifestyle disruption to the level of "convenience of daily implementation." Even in the most extreme cases, the system can still provide the most patient-friendly option, seeking not only a balance between efficacy and lifestyle at the macro level but also minimizing the patient's medication burden at the micro level. This creates conditions for improving medication adherence at every stage, ensuring that the final recommended regimen is truly accepted and adhered to by the patient long-term.

[0101] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A method for intelligently recommending medication regimens based on big data, characterized in that, Includes the following steps: S1: Collect the daily activity characteristics of the target patient through the human-computer interaction interface, and retrieve the patient's medical record data from the hospital information system. The daily activity characteristics include occupation type, work and rest pattern and medication habits. The medical record data includes diagnostic information, test results and past medication history. S2: Based on the diagnostic information and test results, query the contraindication matching database, and screen drugs from the drug database whose indications match the diagnostic information and do not contain contraindicated components corresponding to the abnormal indicators in the test results, to obtain a preliminary set of drugs; S3: Determine the life scenario category of the target patient based on the occupation type and work-rest pattern, extract the side effects recorded in the drug instructions of each drug in the initial screening drug set, match the extracted side effects with the life scenario category based on the preset side effect-scenario interference coefficient library, and calculate the interference value of each initial screening drug for the life scenario of the target patient. The specific construction process of the preset side effect-scene interference coefficient library is as follows: Retrieve medical records of several historical patients from the historical medical record database. Each record contains the patient's scenario category tag, medication record, and follow-up visit record. The follow-up visit record contains medication behavior identifier and description of the reason for discontinuation of medication. Extract the drug instructions for the drugs used from the medication records of each historical patient, and obtain a list of the drug's side effects from the drug instructions; We analyzed the medication behavior markers in the follow-up visit records of each historical patient and screened out historical patients whose medication behavior markers indicated that they reduced their dosage or discontinued their medication on their own. We further analyzed the descriptions of the reasons for discontinuing medication in the screened historical patients and screened out historical patients whose descriptions of the reasons for discontinuing medication contained preset side effect keywords, thus forming a set of patients with side effect-related non-compliance. Using each side effect name and its scenario category label for each historical patient as a composite key, count the first number of patients with the same side effect name and the same scenario category label among all historical patients, and the second number of patients with the same side effect name and the same scenario category label in the set of patients with side effect-related non-compliance. Calculate the ratio of the second number of people to the first number of people, and use this ratio as the initial interference coefficient of the side effect name under the scene category label; iterate through all combinations of side effect names and scene category labels to obtain the initial interference coefficient matrix; Normalize each initial interference coefficient in the initial interference coefficient matrix to obtain a standard interference coefficient mapped to a preset numerical range; store each set of side effect name, scene category label and its corresponding standard interference coefficient as an interference coefficient record in a preset side effect-scene interference coefficient library. S4: Select historical patients with the same diagnostic information and the same age range as the target patient from the historical medical record database to form a reference patient group. Extract the medication records and follow-up records of each drug in the initial screening drug set from the reference patient group, and calculate the expected efficacy score of each initial screening drug. S5: Normalize and transform the interference values ​​of the life scenarios and the expected efficacy scores respectively, and calculate the comprehensive suitability of each screening drug according to the preset fusion weight. Select the screening drug with the highest comprehensive suitability as the recommended drug output.

2. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In S1, the specific process of screening the initial drug set is as follows: Acquire the diagnostic information and test results of the target patient. The diagnostic information includes the disease code and disease name, and the test results include the name of the abnormal indicator and its detection value. Construct a contraindication matching library. The contraindication matching library contains the mapping relationship between drug ingredients and contraindication indicators. Each mapping relationship records the rule that a specific drug ingredient is prohibited from use when there is a specific abnormal test indicator. Extract the indication labels and ingredient lists of each drug from the drug database; The diagnostic information is matched with the indication labels of each drug, and drugs whose indication labels contain the disease name or disease code in the diagnostic information are selected to obtain a candidate drug set. For each drug in the candidate drug set, its ingredient list is extracted, and each ingredient is queried against the contraindication matching database to determine whether any ingredient of the drug exists in the contraindication rules corresponding to the abnormal indicators in the test results. If any component of a drug matches a contraindication rule, the drug is removed from the candidate drug set; the remaining candidate drug set after the removal operation is determined as the initial screening drug set.

3. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In S3, the specific process for determining the category of life scene is as follows: The system obtains the occupation type and daily routine of the target patient through the human-computer interaction interface. The occupation type includes occupation name and industry category, and the daily routine includes working hours, rest day arrangement and sleep time interval. The system constructs a life scene classification tag library, which contains multiple preset scene category tags. Each scene category tag is associated with a set of occupational characteristic keywords and a set of daily routine characteristic intervals. The occupational names and industry categories of the target patient's occupational types are extracted to generate an occupational feature word sequence; the work hours, rest day arrangements, and sleep time intervals of the target patient's daily routine are extracted to generate a daily routine feature value sequence; the occupational feature word sequence is matched with the set of occupational feature keywords associated with each scene category label to calculate the occupational matching degree; the daily routine feature value sequence is matched with the set of daily routine feature intervals associated with each scene category label to calculate the interval membership degree to obtain the daily routine matching degree. The occupational matching degree and the work-rest matching degree are weighted and summed to obtain the comprehensive matching degree between the target patient and each scenario category label; The scene category label with the highest overall matching degree is selected as the life scene category of the target patient.

4. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In step S3, the specific process for obtaining the interference value of the living scene is as follows: Obtain the drug instructions for each drug in the initial screening drug set, and extract the drug's side effect list from the drug instructions. The side effect list contains several side effect entries, and each side effect entry corresponds to a side effect name. Obtain the target patient's life scenario category, which is a scenario category label selected from a preset life scenario classification label library that matches the target patient's occupation type and work-rest pattern; retrieve a preset side effect-scenario interference coefficient library, which contains multiple interference coefficient records, each interference coefficient record consisting of a side effect name, scenario category label, and interference coefficient value; For each side effect entry in the current drug's side effect list, a matching search is performed in the preset side effect-scenario interference coefficient database using the side effect name of the entry and the target patient's life scenario category as the query key. If a matching interference coefficient record is found, the interference coefficient value in that record is obtained. If no matching interference coefficient record is found, the interference coefficient value of the side effect is set to zero; the interference coefficient values ​​corresponding to all side effect entries of the current drug are summed to obtain the cumulative interference coefficient of the drug; the cumulative interference coefficient is determined as the interference value of the drug for the target patient's life scenario.

5. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In S4, the specific calculation process for the expected efficacy score is as follows: Obtain the medication records and follow-up visit records of each historical patient in the reference patient group. The medication records include a drug identification field, and the follow-up visit records include a description of the reason for the follow-up visit and a treatment plan adjustment field. The process involves analyzing the "Reason for Follow-up Visit" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Reason for Follow-up Visit" field contains the preset keyword "poor treatment efficacy," and recording them as the first candidate set; analyzing the "Treatment Plan Adjustment" field in the follow-up visit records of each historical patient, filtering out historical patients whose "Treatment Plan Adjustment" field contains records of changing drug labels or increasing dosages due to efficacy issues, and recording them as the second candidate set; and taking the union of the first candidate set and the second candidate set to form the set of patients with poor treatment efficacy. For each drug in the initial screening drug set, the number of historical patients in the reference patient group whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of users; the number of historical patients in the patient set whose drug identification field contains the drug identification field is counted, and this number is recorded as the number of failures; the difference between the number of users and the number of failures is calculated to obtain the number of effective patients for the drug. The ratio of the number of effective patients to the number of users is calculated, and this ratio is used as the expected efficacy score of the drug.

6. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In step S5, the specific calculation process for the overall suitability of each initially screened drug is as follows: Obtain the normalized daily life scenario interference value and normalized expected efficacy score for each initially screened drug; obtain the preset efficacy weight coefficient and interference weight coefficient, wherein the sum of the efficacy weight coefficient and interference weight coefficient is one. For each initially screened drug, the product of the normalized expected efficacy score and the efficacy weight coefficient is calculated to obtain a first weighted value; the difference between the first and normalized life scenario interference values ​​is calculated, and the product of the difference and the interference weight coefficient is used as a second weighted value; the first weighted value and the second weighted value are added together to obtain the overall suitability of the initially screened drug.

7. The intelligent medication recommendation method based on big data according to claim 1, characterized in that, In step S5, if two or more preliminary screening drugs have the same overall suitability and both are the maximum value, then the drug instructions for each preliminary screening drug are obtained, and the daily dosing frequency and single dosing dose are extracted from the drug instructions. Compare the daily dosing frequency of each initially screened drug and select the drug with the lowest daily dosing frequency as the recommended drug; if the daily dosing frequency is the same, compare the single dosing dose of each drug and select the drug with the lowest single dosing dose as the recommended drug.