Prescription recommendation method and device and computer equipment
By obtaining medical case information of TCM patients, determining syndromes and adjusting basic prescriptions, the problem of low accuracy in TCM prescription recommendation system is solved, and personalized prescription recommendations are achieved.
Patent Information
- Application Number
- CN202510558398.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-19
AI Technical Summary
The existing traditional Chinese medicine prescription recommendation system ignores individual differences between different patients and experience differences between different doctors, resulting in a low accuracy rate of prescription recommendation.
By obtaining the medical case information of the target patient, determining the syndrome, and querying the basic prescriptions associated with the syndrome from the database, multiple candidate operations are determined based on the medical case information of the target patient and the basic prescription, and selecting the target operation to generate the adjusted result prescription.
The accuracy of prescription recommendations is improved, personalized prescription recommendations for different patients are achieved, and the problem of low accuracy is solved due to ignoring individual differences and differences in doctor experience.
Smart Images

Figure CN120511005A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a prescription recommendation method, apparatus, and computer equipment. Background Art
[0002] In Traditional Chinese Medicine (TCM) treatment, accurate prescription recommendations are crucial for improving treatment outcomes. However, due to the highly personalized and complex nature of TCM diagnoses, implementing a standardized and regulated prescription recommendation system has been a challenge. Existing TCM treatment plans often rely on the physician's personal experience and intuition, which limits their consistency and replicability, hindering the systematic transmission of TCM knowledge.
[0003] Currently, some research is attempting to use artificial intelligence technologies, particularly artificial neural networks, to simulate the TCM process of syndrome differentiation and treatment. These models analyze patient symptom data and attempt to automatically infer corresponding TCM prescriptions and recommend appropriate treatment plans.
[0004] However, these technical solutions rely too much on the direct mapping between symptoms and syndrome types, ignoring the individual differences between different patients and the experience differences between different doctors. At the same time, since the recommended prescriptions do not take into account the experience differences between different Chinese medicine practitioners, it is impossible to achieve personalized learning of different Chinese medicine diagnostic schemes, which leads to low accuracy of recommended prescriptions. Summary of the Invention
[0005] The embodiments of the present application provide a prescription recommendation method, apparatus, and computer device to at least solve the technical problem in the related art of low prescription recommendation accuracy caused by ignoring individual differences between different patients and experience differences between different doctors.
[0006] According to one aspect of an embodiment of the present application, a prescription recommendation method is provided, including: obtaining medical record information of a target patient, and determining the syndrome of the target patient based on the medical record information; querying a basic prescription associated with the syndrome from a database; determining multiple candidate operations for adjusting the basic prescription based on the medical record information and the basic prescription of the target patient; selecting a target operation from the multiple candidate operations, and generating an adjusted result prescription based on the target operation.
[0007] Optionally, based on the medical record information and basic prescription of the target patient, multiple candidate operations for adjusting the basic prescription are determined, including: obtaining the medical record information of multiple historical patients in the historical records, the medical record information of multiple historical patients in the historical records at least including: the adjustment operation of each historical patient's prescription relative to the basic prescription of each historical patient; when a first selection instruction is received, obtaining the selected adjustment operation from the first selection instruction, and determining the selected adjustment operation as the first operation; selecting the medical record information containing the first operation from the medical record information of multiple historical patients, and determining it as the recommended medical record information; when the first selection instruction is not received, determining the medical record information of multiple historical patients as the recommended medical record information; and screening out multiple candidate operations from the recommended medical record information.
[0008] Optionally, multiple candidate operations are screened out from the recommended medical case information, including: converting the target patient's medical case information and the recommended medical case information into a patient feature matrix, wherein the rows in the patient feature matrix represent the patients and the columns in the patient feature matrix represent the various medical case information features of the patients; obtaining the various medical case information features of the target patient and the various medical case information features of multiple historical patients corresponding to the recommended medical case information from the patient feature matrix respectively; determining the similarity between the various medical case information features of the target patient and the various medical case information features of each historical patient corresponding to the recommended medical case information in turn, to obtain multiple feature similarities; selecting multiple first target similarities with the highest similarity from the multiple feature similarities; obtaining multiple first target historical patients corresponding to the multiple first target similarities, and obtaining prescriptions for multiple first target historical patients; determining the prescriptions of the multiple first target historical patients as multiple recommended prescriptions, and determining multiple candidate operations based on the multiple recommended prescriptions.
[0009] Optionally, multiple candidate operations are screened out from the recommended medical case information, including: respectively obtaining behavioral characteristics of the target patient and multiple historical patients corresponding to the recommended medical case information, wherein the behavioral characteristics include at least one of the following: treatment preferences, living habits and coping strategies; determining the similarity between the behavioral characteristics of the target patient and the behavioral characteristics of each historical patient corresponding to the recommended medical case information in turn, to obtain multiple behavioral similarities; obtaining the similarity between each medical case information feature of the target patient and each medical case information feature of each historical patient corresponding to the recommended medical case information, to obtain multiple feature similarities; combining the multiple feature similarities with the multiple behavioral similarities in a one-to-one correspondence, to obtain multiple comprehensive similarities; selecting multiple second target similarities with the highest similarity from the multiple comprehensive similarities; obtaining multiple second target historical patients corresponding to the multiple second target similarities, and obtaining prescriptions for the multiple second target historical patients; determining the prescriptions of the multiple second target historical patients as multiple recommended prescriptions, and determining multiple candidate operations based on the multiple recommended prescriptions.
[0010] Optionally, multiple feature similarities are combined with multiple behavioral similarities in a one-to-one correspondence to obtain multiple comprehensive similarities, including: obtaining a weight parameter, wherein the weight parameter is used to adjust the degree of influence of the behavioral feature in the comprehensive similarity; determining the weights of the feature similarity and the behavioral similarity respectively according to the weight parameter; and determining the weighted sum of the feature similarity and the behavioral similarity as the comprehensive similarity according to the weights of the feature similarity and the behavioral similarity.
[0011] Optionally, multiple candidate operations are determined based on multiple recommended prescriptions, including: obtaining the adjustment operations of each recommended prescription relative to the basic prescription to obtain multiple adjustment operations; merging, deduplicating and sorting the multiple adjustment operations in sequence to obtain multiple initial operations; and determining a preset number of operations before sorting and the stop adjustment operation in the multiple initial operations as multiple candidate operations.
[0012] Optionally, a target operation is selected from multiple candidate operations, and an adjusted result prescription is generated based on the target operation, including: receiving a second selection instruction, obtaining the target operation from the multiple candidate operations from the second selection instruction; when the target operation is not a stop adjustment operation, adjusting the basic prescription according to the target operation to obtain a result prescription; when the target operation is a stop adjustment operation, determining the basic prescription as the result prescription.
[0013] Optionally, before determining the recommended case, the method also includes: determining the medical record information of the target patient and the medical record information of multiple historical patients in the historical records as initial medical record information; comparing the initial medical record information with the medical record information description in the database to obtain the similarity between the initial medical record information and the medical record information description in the database; when the similarity is not lower than a preset threshold, converting the initial medical record information into the medical record information description method with the highest similarity in the database to obtain the converted medical record information, otherwise deleting the initial medical record information; converting the classification features in the converted medical record information into feature vectors, and counting the number of times each feature vector appears in the converted medical record information; deleting the feature vector that appears less than a preset number of times in the feature vector to obtain a processed feature vector.
[0014] Optionally, before determining the recommended case, the method also includes: standardizing the prescription components of each patient in the converted medical record information to obtain the processed prescription components of each patient; comparing the processed prescription components of each patient with the basic prescription to obtain the adjustment operation of each historical patient's prescription relative to the basic prescription of each historical patient.
[0015] According to another aspect of an embodiment of the present application, a prescription recommendation device is also provided, including: an acquisition module for acquiring the medical record information of a target patient and determining the syndrome of the target patient based on the medical record information; a query module for querying the basic prescription associated with the syndrome from a database; a recommendation module for determining multiple candidate operations for adjusting the basic prescription based on the medical record information and the basic prescription of the target patient; an adjustment module for selecting a target operation from multiple candidate operations and generating an adjusted result prescription based on the target operation.
[0016] According to another aspect of the embodiment of the present application, a computer device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned prescription recommendation method.
[0017] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned prescription recommendation method by running the computer program.
[0018] According to another aspect of the embodiments of the present application, a computer program product is provided, comprising computer instructions, which implement the above-mentioned prescription recommendation method when executed by a processor.
[0019] In an embodiment of the present application, the medical record information of the target patient is obtained, and the syndrome of the target patient is determined based on the medical record information; the basic prescription associated with the syndrome is queried from the database; based on the medical record information and the basic prescription of the target patient, multiple candidate operations for adjusting the basic prescription are determined; the target operation is selected from the multiple candidate operations, and the adjusted result prescription is generated based on the target operation, thereby achieving the purpose of determining the target operation based on the medical record information of the target patient and adjusting the basic prescription using the target operation, thereby achieving the technical effect of improving the accuracy of prescription recommendations, and further solving the technical problem in the related art of low prescription recommendation accuracy caused by ignoring individual differences between different patients and experience differences between different doctors. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a hardware structure block diagram of a computer terminal for implementing a prescription recommendation method according to an embodiment of the present application;
[0022] Figure 2 is a flow chart of a prescription recommendation method according to an embodiment of the present application;
[0023] Figure 3 is a flow chart of another prescription recommendation method according to an embodiment of the present application;
[0024] Figure 4 It is a structural diagram of a prescription recommendation device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or reject the automated decision results; if the user chooses to reject, the expert decision-making process will be entered.
[0028] In order to solve the problems existing in the related art, the embodiment of the present application provides a prescription recommendation method, which can be run on Figure 1 In the computer terminal shown, the computer terminal is explained below.
[0029] The prescription recommendation method embodiment provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal for implementing a prescription recommendation method. Figure 1 As shown, the computer terminal 10 may include one or more (illustrated by 102a, 102b, ..., 102n in the figure) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0030] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10. As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0031] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the prescription recommendation method in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned prescription recommendation method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0032] The transmission module 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0033] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0034] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0035] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a prescription recommendation method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0036] Figure 2 is a flow chart of a prescription recommendation method according to an embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:
[0037] Step S202: Obtain medical record information of the target patient and determine the syndrome of the target patient based on the medical record information;
[0038] In step S202, the medical record information includes the patient's basic information, symptom information, medical history information, information on the four diagnostic methods of traditional Chinese medicine (looking, smelling, asking, and palpating), and examination and testing information, while the syndrome is the pathological state determined by the doctor based on the patient's symptoms, signs, and other clinical information. For example, if the symptom information is persistent or intermittent pain in the head, the corresponding syndrome may be wind-heat attacking the head, wind-cold attacking the head, or hyperactivity of liver yang, insufficient qi and blood, etc. For another example, if the symptom information is fever, the corresponding syndrome may be wind-heat attacking the head, wind-cold attacking the head, or Yangming bowel fullness, Qi deficiency fever, etc. After obtaining the patient's medical record information, a syndrome corresponding to the patient's symptom information is first determined.
[0039] It should be noted that medical record information is structured information, that is, data organized and stored in a fixed format or standardized manner. This data can be accessed and processed through predefined patterns, and can also form a feature matrix.
[0040] It should also be noted that there are multiple ways to determine syndromes based on the patient's medical records. In one optional way, syndromes corresponding to different symptom information can be determined based on a predetermined mapping relationship for characterizing symptom information and syndromes.
[0041] Step S204, querying the database for a basic prescription associated with the syndrome;
[0042] In step S204, the basic prescription corresponding to each syndrome is fixed. These basic prescriptions are determined based on historical diagnostic data, indicating that the probability value of different doctors prescribing this prescription for the syndrome is the highest, or indicating that the same parts are included in the various prescriptions prescribed by different doctors for the syndrome.
[0043] It should be noted that the expert knowledge in the database, such as diagnostic prescriptions, will be updated in real time to be consistent with the actual prescriptions used by doctors.
[0044] Step S206, determining multiple candidate operations for adjusting the basic prescription based on the medical record information and the basic prescription of the target patient;
[0045] In step S206, candidate operations include: increasing or decreasing the dosage of a certain medicinal material in the prescription, adding a new medicinal material of a certain dosage, deleting a certain medicinal material, or stopping adjustment. The adjustment operation here also includes operations performed on drug combinations. For example, the recommended multiple candidate operations include the following 4: adding 1 gram of medicinal material A; adding 1 gram of medicinal material B; adding 1 gram of medicinal material A and 2 grams of medicinal material C; adding 2 grams of medicinal material B and reducing 2 grams of medicinal material D. It should be noted that the medicinal material combination recommendation is to improve the efficiency of adjustment. In the above example, the doctor's selection of the third operation to add 1 gram of medicinal material A and 2 grams of medicinal material C is equivalent to the doctor adding 1 gram of medicinal material A and 2 grams of medicinal material C in the two adjustment steps respectively.
[0046] It should also be noted that to ensure the safety and accuracy of the output prescription, each time a doctor adjusts a prescription, a corresponding history is stored in the original database. This means that the patient's symptoms treated according to the adjusted prescription are also treated according to a previously established treatment method, thus ensuring the reliability of the recommended instructions.
[0047] Step S208 : selecting a target operation from the plurality of candidate operations, and generating an adjusted result prescription based on the target operation.
[0048] Through the above steps S202 to S208, the medical record information of the target patient is obtained, and the syndrome of the target patient is determined based on the medical record information; the basic prescription associated with the syndrome is queried from the database; based on the medical record information and the basic prescription of the target patient, multiple candidate operations for adjusting the basic prescription are determined; the target operation is selected from the multiple candidate operations, and the adjusted result prescription is generated based on the target operation, thereby achieving the purpose of determining the target operation based on the medical record information of the target patient and adjusting the basic prescription using the target operation, thereby achieving the technical effect of improving the accuracy of prescription recommendations, and further solving the technical problem of low prescription recommendation accuracy caused by ignoring individual differences between different patients and experience differences between different doctors in related technologies. The following is a detailed description.
[0049] It should be noted that the relevant technologies provided rely too much on the direct mapping between symptoms and syndrome types, ignoring the individual differences between different patients and the experience differences between different doctors. The recommended diagnostic prescriptions are mostly basic prescriptions that have not been added or subtracted by doctors and are often not directly adopted by doctors. Since the recommended prescriptions do not take into account the experience differences between different Chinese medicine practitioners, personalized learning of different Chinese medicine diagnostic schemes cannot be achieved, and the problem of systematic inheritance of Chinese medicine knowledge cannot be solved.
[0050] In some embodiments of the present application, a collaborative recommendation algorithm can be used to determine multiple candidate operations for adjusting the basic prescription based on the medical record information and basic prescription of the target patient. Specifically, the medical record information of multiple historical patients in the historical records is obtained, and the medical record information of multiple historical patients in the historical records at least includes: the adjustment operation of each historical patient's prescription relative to the basic prescription of each historical patient; when a first selection instruction is received, the selected adjustment operation is obtained from the first selection instruction, and the selected adjustment operation is determined as the first operation; the medical record information containing the first operation is selected from the medical record information of multiple historical patients and determined as the recommended medical record information; when the first selection instruction is not received, the medical record information of multiple historical patients is determined as the recommended medical record information; and multiple candidate operations are screened out from the recommended medical record information.
[0051] For example, based on the prescription adjustment operation (first operation) selected by the doctor, the patient's prescription adjustment operation records in the history are filtered to include cases with the selected operation (including the medical record information of the first operation) as the recommended cases (recommended medical record information) for this round of prescription adjustment. If the doctor has not selected any prescription adjustment operation, the recommended cases for this round include all cases in the history.
[0052] Among them, screening out multiple candidate operations from the recommended medical case information specifically includes the following steps: converting the target patient's medical case information and the recommended medical case information into a patient feature matrix, wherein the rows in the patient feature matrix represent the patients and the columns in the patient feature matrix represent the various medical case information features of the patients; obtaining the various medical case information features of the target patient and the various medical case information features of multiple historical patients corresponding to the recommended medical case information from the patient feature matrix respectively; determining the similarity between the various medical case information features of the target patient and the various medical case information features of each historical patient corresponding to the recommended medical case information in turn, and obtaining multiple feature similarities; selecting multiple first target similarities with the highest similarity from the multiple feature similarities; obtaining multiple first target historical patients corresponding to the multiple first target similarities, and obtaining prescriptions for multiple first target historical patients; determining the prescriptions of the multiple first target historical patients as multiple recommended prescriptions, and determining multiple candidate operations based on the multiple recommended prescriptions.
[0053] Specifically, the target patient and the medical records of each patient in the historical records are converted into a patient feature matrix. The rows represent the patients, and the columns represent the patient's feature information (i.e., the patient's various medical record information). The elements in the matrix represent the patient's value under each medical record information feature, such as the patient's gender, age, BMI (Body Mass Index), symptoms, tongue condition, pulse condition, medical history, family history, exposure history, and examination and test values. Categorical variables (used to represent feature types) have all been converted to numerical variables.
[0054] Calculate similarity. Based on the similarity between the target patient and the historical patients in the historical records, find multiple patients who are most similar to the target patient. Generally, the cosine similarity algorithm can be used. Specifically, suppose there is a target patient P. For a patient P in the historical records, i , the case characteristics of the two are P=(x1,x2,...,x n ), P i =(y1,y2,...,y n ). Then the similarity between two patients is calculated as follows:
[0055]
[0056] where x1, x2, ..., x n Represents all characteristic variable values of the target patient, y1,y2,...,y n Indicates patient P i All characteristic variable values, n is the number of characteristic variables. Sim(P,P i ) represents two patients P and P i After calculating the similarity of all patients in this round of recommended cases according to the above formula, select the first q patients most similar to the target patient (the first target historical patient) and obtain q recommended prescriptions, q ≥ 1.
[0057] In another optional method, the specific steps for screening out multiple candidate operations from the recommended medical case information are as follows: respectively obtain the behavioral characteristics of the target patient and multiple historical patients corresponding to the recommended medical case information, wherein the behavioral characteristics include at least one of the following: treatment preferences, living habits and coping strategies; determine the similarity between the behavioral characteristics of the target patient and the behavioral characteristics of each historical patient corresponding to the recommended medical case information in turn, and obtain multiple behavioral similarities; obtain the similarity between each medical case information feature of the target patient and each medical case information feature of each historical patient corresponding to the recommended medical case information, and obtain multiple feature similarities; combine the multiple feature similarities with the multiple behavioral similarities in a one-to-one correspondence, and obtain multiple comprehensive similarities; select multiple second target similarities with the highest similarity from the multiple comprehensive similarities; obtain multiple second target historical patients corresponding to the multiple second target similarities, and obtain prescriptions for the multiple second target historical patients; determine the prescriptions of the multiple second target historical patients as multiple recommended prescriptions, and determine multiple candidate operations based on the multiple recommended prescriptions.
[0058] In the above method, when calculating the feature similarity between the target patient and the patient in the historical record, the patient's behavioral characteristics are also taken into account, including: treatment preferences (surgery, medication, physical, etc.), lifestyle habits (work and rest, diet, exercise, etc.), coping strategies (active coping, passive coping). The formula for calculating the behavioral similarity between the target patient and the patient in the historical record is:
[0059]
[0060] Where B=(b1,b2,...,b m ) represents the behavioral feature vector of the target patient, B i =(c1,c2,...,c m ) represents the patient Bi behavior feature vector, b k 、c k represent the kth eigenvalue, m is the total number of features, δ(t k ) and δ(t′ k ) is the time point t k and t′ k The time decay factor is used to highlight the role of recent behaviors.
[0061] In some embodiments of the present application, the specific steps of combining multiple feature similarities with multiple behavioral similarities in a one-to-one correspondence to obtain multiple comprehensive similarities are as follows: obtaining a weight parameter, wherein the weight parameter is used to adjust the degree of influence of the behavioral feature in the comprehensive similarity; determining the weights of the feature similarity and the behavioral similarity respectively according to the weight parameter; and determining the weighted sum of the feature similarity and the behavioral similarity as the comprehensive similarity according to the weights of the feature similarity and the behavioral similarity.
[0062] Specifically, the feature similarity and behavior feature similarity are combined to obtain the comprehensive similarity determination process as shown in the following formula:
[0063] Sim=αSim(P, Pi)+(1-α)Sim(B, Bi);
[0064] Where α is a weight parameter used to adjust the influence of behavioral characteristics on the overall similarity, α∈[0,1]. After calculating the comprehensive similarity of all patients in this round of recommended cases according to the above formula, the first q patients most similar to the target patient (the second target historical patients) are selected and q recommended prescriptions are obtained, where q≥1.
[0065] In some embodiments of the present application, the specific steps for determining multiple candidate operations based on multiple recommended prescriptions are as follows: respectively obtain the adjustment operations of each recommended prescription relative to the basic prescription to obtain multiple adjustment operations; merge, deduplicate and sort the multiple adjustment operations in sequence to obtain multiple initial operations; and determine a preset number of operations before sorting and the stop adjustment operation in the multiple initial operations as multiple candidate operations.
[0066] Among them, the specific steps of selecting a target operation from multiple candidate operations and generating an adjusted result prescription based on the target operation are as follows: receiving a second selection instruction, obtaining the target operation from multiple candidate operations from the second selection instruction; when the target operation is not a stop adjustment operation, adjusting the basic prescription according to the target operation to obtain a result prescription; when the target operation is a stop adjustment operation, determining the basic prescription as the result prescription.
[0067] Specifically, based on the q prescriptions recommended for the target patient and the adjustment operations of each prescription relative to the basic prescription, the multiple adjustment operations required for multiple prescriptions are merged, deduplicated, and sorted, and the top h adjustment operations and the operation of stopping adjustment are recommended to the doctor as candidate operations, such as Figure 3 As shown, step S304 obtains the operation instruction (target operation) selected by the doctor from multiple recommended candidate operations. S305 determines whether the operation instruction selected by the doctor is to stop adjustment. S306, if so, stops the adjustment and uses the basic prescription as the treatment prescription (result prescription) issued by the doctor. S307, if not, adjusts the basic prescription according to the operation instruction selected by the doctor to obtain an adjusted prescription.
[0068] Among them, candidate operations include: increasing or decreasing the dosage of a certain herb in the prescription, adding a new herb of a certain dosage, deleting a herb, or stopping the adjustment. If the doctor chooses to stop adjusting, it means that the doctor will use the basic prescription as the prescription. If the doctor chooses any other operation instruction, such as adding 1 gram of new herb A or reducing herb B by 1 gram in the basic prescription, the basic prescription will be adjusted according to the doctor's selected operation instruction, resulting in an adjusted prescription.
[0069] Step S308, combining the patient's medical record information and the adjusted prescription, recommends multiple candidate operations for further adjusting the adjusted prescription. Among them, the candidate operations here can refer to step S303 and will not be repeated here. Step S309, determine whether the operation instruction selected by the doctor is to stop adjustment. Step S306, if so, stop the adjustment and use the adjusted prescription as the treatment prescription issued by the doctor. S307, if not, further adjust the adjusted prescription according to the operation instruction selected by the doctor to obtain a new adjusted prescription until the doctor chooses to stop adjustment.
[0070] It should be noted that the above technical solution is mainly applied to traditional Chinese medicine. By recommending basic prescriptions to different traditional Chinese medicine practitioners and obtaining the adjustment plans adopted by different traditional Chinese medicine practitioners for different patients, it is possible to learn about different traditional Chinese medicine treatment plans, which facilitates the inheritance of traditional Chinese medicine.
[0071] Before determining the recommended case, the method further includes: preprocessing the medical record information of the target patient and the medical record information of multiple historical patients in the historical records, and the specific preprocessing steps are as follows: determining the medical record information of the target patient and the medical record information of multiple historical patients in the historical records as initial medical record information; comparing the initial medical record information with the medical record information description in the database to obtain the similarity between the initial medical record information and the medical record information description in the database; if the similarity is not lower than a preset threshold, converting the initial medical record information into the medical record information description with the highest similarity in the database to obtain converted medical record information, otherwise deleting the initial medical record information; converting the classification features in the converted medical record information into feature vectors, and counting the number of times each feature vector appears in the converted medical record information; deleting the feature vectors that appear less than a preset number of times in the feature vectors to obtain processed feature vectors. Standardizing the prescription ingredients of each patient in the converted medical record information to obtain the processed prescription ingredients of each patient; comparing the processed prescription ingredients of each patient with the basic prescription to obtain the adjustment operation of the prescription of each historical patient relative to the basic prescription of each historical patient.
[0072] Specifically, first, the medical record information of the current patient and the patients in the historical records needs to be preprocessed, including entity recognition and data standardization. This involves comparing the feature descriptions in the medical record information with the feature descriptions in the database, calculating the similarity, and simplifying it into a standard description method (obtaining the similarity between the feature description of the medical record information in the database and multiple possible standard description methods, and converting the feature description into the standard description method corresponding to the greatest similarity; when the greatest similarity is less than a preset threshold, it is determined that the feature description of the medical record information is unavailable, and the feature description of the medical record information is deleted). The feature description includes various information commonly used in traditional Chinese medicine diagnosis, such as the patient's basic information, symptom information, and information on the four examinations of traditional Chinese medicine, as well as various examination and test information in Western medicine and patient medical history information. Next, the categorical features in the medical record information are converted into one-hot vectors, and the frequency of feature occurrence is calculated. Low-frequency features are deleted to reduce the feature dimension. One-hot vectors are a method for converting categorical variables into numerical variables, commonly used in machine learning and natural language processing. In this representation, each category is represented as a binary vector, with all elements 0 except for one element representing the category being 1. Simultaneously, the numerical features in the medical record information are normalized, using methods such as minimum-maximum normalization. The prescription ingredients of the patient in the historical record are then preprocessed, including standardizing the name and dosage of each medicinal ingredient in the prescription. The patient's prescription in the historical record is then adjusted (added or subtracted) relative to the basic prescription by calculating the adjustment (addition or subtraction) operation.
[0073] It should also be noted that the similarity between the standard description method and the feature descriptions in the medical record information can be determined by the edit distance or Euclidean distance between the two.
[0074] Figure 4 A prescription recommendation device according to an embodiment of the present application includes:
[0075] An acquisition module 40 is used to acquire medical records of a target patient and determine the syndrome of the target patient based on the medical records;
[0076] A query module 42 is used to query a basic prescription associated with the syndrome from a database;
[0077] The recommendation module 44 is configured to determine a plurality of candidate operations for adjusting the basic prescription based on the medical record information and the basic prescription of the target patient;
[0078] The adjustment module 46 is configured to select a target operation from a plurality of candidate operations and generate an adjusted result prescription based on the target operation.
[0079] Through the above-mentioned prescription recommendation device, the medical record information of the target patient is obtained, and the syndrome of the target patient is determined based on the medical record information; the basic prescription associated with the syndrome is queried from the database; based on the medical record information and the basic prescription of the target patient, multiple candidate operations for adjusting the basic prescription are determined; the target operation is selected from the multiple candidate operations, and the adjusted result prescription is generated based on the target operation, thereby achieving the purpose of determining the target operation based on the medical record information of the target patient and adjusting the basic prescription using the target operation, thereby achieving the technical effect of improving the accuracy of prescription recommendations, and thus solving the technical problem of low prescription recommendation accuracy caused by ignoring individual differences between different patients and experience differences between different doctors in related technologies.
[0080] The recommendation module 44 includes: a determination submodule, which is used to determine multiple candidate operations for adjusting the basic prescription based on the medical record information and basic prescription of the target patient, including: obtaining the medical record information of multiple historical patients in the historical records, and the medical record information of multiple historical patients in the historical records at least includes: the adjustment operation of each historical patient's prescription relative to the basic prescription of each historical patient; when a first selection instruction is received, obtaining the selected adjustment operation from the first selection instruction, and determining the selected adjustment operation as the first operation; selecting the medical record information containing the first operation from the medical record information of multiple historical patients, and determining it as the recommended medical record information; when the first selection instruction is not received, determining the medical record information of multiple historical patients as the recommended medical record information; and screening out multiple candidate operations from the recommended medical record information.
[0081] The determination submodule includes: a first screening unit and a second screening unit, wherein the first screening unit is used to screen out multiple candidate operations from the recommended medical case information, including: converting the medical case information of the target patient and the recommended medical case information into a patient feature matrix, wherein the rows in the patient feature matrix represent the patients and the columns in the patient feature matrix represent the various medical case information features of the patients; respectively obtaining the various medical case information features of the target patient and the various medical case information features of multiple historical patients corresponding to the recommended medical case information from the patient feature matrix; sequentially determining the similarity between the various medical case information features of the target patient and the various medical case information features of each historical patient corresponding to the recommended medical case information to obtain multiple feature similarities; selecting multiple first target similarities with the highest similarity from the multiple feature similarities; obtaining multiple first target historical patients corresponding to the multiple first target similarities, and obtaining prescriptions for multiple first target historical patients; determining the prescriptions of the multiple first target historical patients as multiple recommended prescriptions, and determining multiple candidate operations based on the multiple recommended prescriptions.
[0082] The second screening unit is used to screen out multiple candidate operations from the recommended medical case information, including: respectively obtaining behavioral characteristics of the target patient and multiple historical patients corresponding to the recommended medical case information, wherein the behavioral characteristics include at least one of the following: treatment preferences, living habits and coping strategies; determining the similarity between the behavioral characteristics of the target patient and the behavioral characteristics of each historical patient corresponding to the recommended medical case information in turn, to obtain multiple behavioral similarities; obtaining the similarity between each medical case information feature of the target patient and each medical case information feature of each historical patient corresponding to the recommended medical case information, to obtain multiple feature similarities; combining the multiple feature similarities with the multiple behavioral similarities in a one-to-one correspondence, to obtain multiple comprehensive similarities; selecting multiple second target similarities with the highest similarity from the multiple comprehensive similarities; obtaining multiple second target historical patients corresponding to the multiple second target similarities, and obtaining prescriptions for the multiple second target historical patients; determining the prescriptions of the multiple second target historical patients as multiple recommended prescriptions, and determining multiple candidate operations based on the multiple recommended prescriptions.
[0083] The second screening unit includes: a similarity subunit, which is used to combine multiple feature similarities with multiple behavior similarities in a one-to-one correspondence to obtain multiple comprehensive similarities, including: obtaining a weight parameter, wherein the weight parameter is used to adjust the degree of influence of the behavior feature in the comprehensive similarity; determining the weights of the feature similarity and the behavior similarity respectively according to the weight parameter; and determining the weighted sum of the feature similarity and the behavior similarity as the comprehensive similarity according to the weights of the feature similarity and the behavior similarity.
[0084] The prescription recommendation device in the embodiment of the present application also includes: a candidate operation sub-module, which is used to determine multiple candidate operations based on multiple recommended prescriptions, including: respectively obtaining the adjustment operations of each recommended prescription relative to the basic prescription to obtain multiple adjustment operations; merging, deduplicating and sorting the multiple adjustment operations in sequence to obtain multiple initial operations; and determining a preset number of operations before sorting and the stop adjustment operation in the multiple initial operations as multiple candidate operations.
[0085] The candidate operation submodule includes: an adjustment unit, which is used to select a target operation from multiple candidate operations and generate an adjusted result prescription based on the target operation, including: receiving a second selection instruction, obtaining the target operation from the multiple candidate operations from the second selection instruction; when the target operation is not a stop adjustment operation, adjusting the basic prescription according to the target operation to obtain a result prescription; when the target operation is a stop adjustment operation, determining the basic prescription as the result prescription.
[0086] The prescription recommendation device in the embodiment of the present application also includes: a data preprocessing submodule, which is used to determine the medical record information of the target patient and the medical record information of multiple historical patients in the historical records as initial medical record information before determining the recommended case; compare the initial medical record information with the medical record information description in the database to obtain the similarity between the initial medical record information and the medical record information description in the database; when the similarity is not lower than a preset threshold, convert the initial medical record information into the medical record information description method with the highest similarity in the database to obtain the converted medical record information, otherwise delete the initial medical record information; convert the classification features in the converted medical record information into feature vectors, and count the number of times each feature vector appears in the converted medical record information; delete the feature vector that appears less than the preset number of times in the feature vector to obtain the processed feature vector.
[0087] The data preprocessing submodule includes: a comparison unit, which is used to standardize the prescription components of each patient in the converted medical record information before determining the recommended case to obtain the processed prescription components of each patient; compare the processed prescription components of each patient with the basic prescription to obtain the adjustment operation of each historical patient's prescription relative to the basic prescription of each historical patient.
[0088] It should be noted that Figure 4 The prescription shown is recommended for use with Figure 2 The prescription recommendation method shown in the figure, therefore the relevant explanations in the above prescription recommendation method are also applicable to the prescription recommendation device and will not be repeated here.
[0089] An embodiment of the present application also provides a computer device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the above-mentioned prescription recommendation method.
[0090] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned prescription recommendation method by running the computer program.
[0091] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the prescription recommendation method in the present application.
[0092] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0093] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0094] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0095] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.
[0096] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0097] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0098] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A prescription recommendation method, characterized in that: include: Obtaining medical record information of a target patient, and determining the syndrome of the target patient based on the medical record information; Querying a database for a basic prescription associated with the syndrome; determining, based on the medical record information of the target patient and the basic prescription, a plurality of candidate operations for adjusting the basic prescription; A target operation is selected from the plurality of candidate operations, and an adjusted result prescription is generated based on the target operation.
2. The method according to claim 1, characterized in that Determining, based on the medical record information of the target patient and the basic prescription, a plurality of candidate operations for adjusting the basic prescription, including: Acquire medical record information of multiple historical patients in the historical records, wherein the medical record information of the multiple historical patients in the historical records at least includes: an adjustment operation of a prescription of each historical patient relative to a basic prescription of each historical patient; When receiving the first selection instruction, obtaining a selected adjustment operation from the first selection instruction, and determining the selected adjustment operation as the first operation; selecting medical record information including the first operation from the plurality of historical medical record information of the patients and determining the medical record information as recommended medical record information; In the case where the first selection instruction is not received, determining the medical record information of the plurality of historical patients as the recommended medical record information; The multiple candidate operations are screened out from the recommended medical case information.
3. The method according to claim 2, characterized in that Filtering the plurality of candidate operations from the recommended medical case information includes: Converting the target patient's medical record information and the recommended medical record information into a patient feature matrix, wherein the rows in the patient feature matrix represent patients, and the columns in the patient feature matrix represent various medical record information features of the patients; Obtaining, from the patient feature matrix, various medical record information features of the target patient and various medical record information features of multiple historical patients corresponding to the recommended medical record information; Sequentially determining the similarity between various medical record information features of the target patient and various medical record information features of each historical patient corresponding to the recommended medical record information, to obtain a plurality of feature similarities; Selecting a plurality of first target similarities having the highest similarity from the plurality of feature similarities; Acquire multiple first target historical patients corresponding to the multiple first target similarities, and acquire prescriptions of the multiple first target historical patients; The prescriptions of the plurality of first target historical patients are determined as a plurality of recommended prescriptions, and a plurality of candidate operations are determined according to the plurality of recommended prescriptions.
4. The method according to claim 2, characterized in that Filtering the plurality of candidate operations from the recommended medical case information includes: Obtaining behavioral characteristics of the target patient and multiple historical patients corresponding to the recommended medical case information, respectively, wherein the behavioral characteristics include at least one of the following: treatment preference, living habits, and coping strategies; Sequentially determining the similarity between the behavioral characteristics of the target patient and the behavioral characteristics of each historical patient corresponding to the recommended medical record information to obtain a plurality of behavioral similarities; Obtaining similarities between various medical record information features of the target patient and various medical record information features of each historical patient corresponding to the recommended medical record information, to obtain multiple feature similarities; Combining the multiple feature similarities with the multiple behavior similarities in a one-to-one correspondence to obtain multiple comprehensive similarities; Selecting a plurality of second target similarities with the highest similarity from the plurality of comprehensive similarities; Acquire multiple second target historical patients corresponding to the multiple second target similarities, and acquire prescriptions of the multiple second target historical patients; The prescriptions of the plurality of second target historical patients are determined as a plurality of recommended prescriptions, and a plurality of candidate operations are determined according to the plurality of recommended prescriptions.
5. The method according to claim 4, characterized in that The plurality of feature similarities are combined with the plurality of behavior similarities in a one-to-one correspondence to obtain a plurality of comprehensive similarities, including: Obtaining a weight parameter, wherein the weight parameter is used to adjust the influence of the behavioral feature in the comprehensive similarity; Determining weights of the feature similarity and the behavior similarity respectively according to the weight parameters; The weighted sum of the feature similarity and the behavior similarity is determined as the comprehensive similarity according to the weights of the feature similarity and the behavior similarity.
6. The method according to claim 3 or 4, characterized in that Determining a plurality of candidate operations based on the plurality of recommended prescriptions includes: respectively obtaining an adjustment operation of each recommended prescription relative to the basic prescription to obtain a plurality of adjustment operations; Merging, deduplicating, and sorting the multiple adjustment operations in sequence to obtain multiple initial operations; A preset number of operations before sorting and a stop adjustment operation among the multiple initial operations are determined as the multiple candidate operations.
7. The method according to claim 6, characterized in that Selecting a target operation from the plurality of candidate operations and generating an adjusted result prescription based on the target operation includes: receiving a second selection instruction, and obtaining the target operation from the plurality of candidate operations from the second selection instruction; When the target operation is not the stop adjustment operation, adjusting the basic prescription according to the target operation to obtain the result prescription; When the target operation is the stop adjustment operation, the basic prescription is determined as the result prescription.
8. The method according to claim 2, characterized in that Before determining the recommended case, the method further includes: determining the medical record information of the target patient and the medical record information of multiple historical patients in the historical records as initial medical record information; Comparing the initial medical case information with the medical case information description in the database to obtain the similarity between the initial medical case information and the medical case information description in the database; If the similarity is not lower than a preset threshold, converting the initial medical record information into a medical record information description method with the highest similarity in the database to obtain converted medical record information; otherwise, deleting the initial medical record information; Converting the classification features in the converted medical record information into feature vectors, and counting the number of times each feature vector appears in the converted medical record information; The feature vectors that appear less than a preset number of times in the feature vectors are deleted to obtain a processed feature vector.
9. The method according to claim 8, characterized in that Before determining the recommended case, the method further includes: Standardizing the prescription ingredients of each patient in the converted medical record information to obtain the processed prescription ingredients of each patient; The processed prescription components of each patient are compared with the basic prescription to obtain an adjustment operation of the prescription of each historical patient relative to the basic prescription of each historical patient.
10. A prescription recommendation device, characterized in that: include: An acquisition module, configured to acquire medical record information of a target patient and determine the syndrome of the target patient based on the medical record information; A query module, used for querying a basic prescription associated with the syndrome from a database; a recommendation module, configured to determine a plurality of candidate operations for adjusting the basic prescription based on the medical record information of the target patient and the basic prescription; The adjustment module is configured to select a target operation from the plurality of candidate operations and generate an adjusted result prescription based on the target operation.
11. A computer device, characterized in that: include: A memory and a processor, wherein the memory is used to store program instructions; The processor is connected to the memory and is used to execute the prescription recommendation method according to any one of claims 1 to 9.
12. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the prescription recommendation method according to any one of claims 1 to 9 is implemented.