Drug recommendation method and device, electronic equipment and storage medium

By matching the target clusters of the detection data with the standard diagnostic text from the clustering results, the detection data and diagnostic descriptions are reconstructed. Combined with machine learning algorithms, this solves the problem of low accuracy in drug recommendations and achieves high-precision personalized medication recommendations.

CN120913892APending Publication Date: 2025-11-07INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, drug recommendations based on artificial intelligence models suffer from low accuracy. This is mainly because patients' health records contain irrelevant information and physiological indicators that are difficult to reflect abnormalities intuitively, resulting in redundant and obscure data that affects the recommendation results.

Method used

By matching the target cluster to which the detection data belongs from the clustering results, reconstructing the detection data based on dynamically changing clustering labels, and using standard diagnostic description text to correct redundant diagnostic descriptions, a user health profile is constructed, and drug recommendations are made in conjunction with machine learning algorithms.

Benefits of technology

It improves the accuracy of drug recommendations, enables highly interpretable, intuitive and accurate reconstruction of test data and standardization of diagnostic descriptions, and ensures the accuracy of personalized medication advice.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120913892A_ABST
    Figure CN120913892A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of clinical auxiliary diagnosis, and provides a drug recommendation method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the matching from a clustering result, obtaining a target class cluster to which detection data belongs, and taking a clustering tag of the dynamic change of the target class cluster as reconstructed detection data; based on the semantic similarity between the diagnosis description text and the standard diagnosis description text, performing text correction on the diagnosis description text to obtain a corrected diagnosis description; and performing drug recommendation based on the reconstructed detection data and the corrected diagnosis description. According to the method provided by the invention, the target class cluster to which the detection data belongs is obtained through matching from the clustering result, the detection data is abstracted based on the dynamically-changed clustering label, the reconstructed detection data which is high in interpretability, visual and accurate is obtained, and the diagnosis description text which is redundant and difficult to understand is subjected to text correction, so that the diagnosis accuracy is improved. Uniform expression of the standard diagnosis text is realized, the expression specification of the health record data is improved, and the accuracy of drug recommendation is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of clinical auxiliary diagnosis, and in particular to a drug recommendation method and device, electronic equipment and a storage medium. BACKGROUND

[0002] In the medical field, with the rapid development of information technology and the continuous accumulation of medical big data, drug recommendation is gradually moving towards intelligence and precision. Currently, existing intelligent drug recommendation methods directly use the data stored in patient health records to build artificial intelligence models for intelligent drug recommendation.

[0003] However, in actual application, the patient health record usually records some information unrelated to the patient's physical condition, in addition, some physiological indicators are difficult to intuitively reflect the abnormality of the detection data, and the redundant and obscure data bring difficulties to drug recommendation based on artificial intelligence models, affecting the accuracy of the drug recommendation result. SUMMARY

[0004] The present application provides a drug recommendation method, device, electronic equipment and storage medium to solve the defect of low accuracy of drug recommendation based on artificial intelligence models in the prior art.

[0005] The present application provides a drug recommendation method, comprising: obtaining health record data of a user in a current period, the health record data comprising detection data and diagnosis description text; matching a target cluster to which the detection data belongs from the clustering result, and taking the clustering label of the target cluster as the reconstructed detection data of the detection data; the clustering result is obtained based on historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset time period; performing text correction on the diagnosis description text based on the semantic similarity between the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; generating a drug recommendation result for the user based on the reconstructed detection data and the corrected diagnosis description.

[0006] According to the drug recommendation method provided by the present application, the detection data comprises continuous detection data. The clustering result acquisition step comprises: obtaining historical continuous detection data, the clustering division threshold, and a preset cluster number; clustering the historical continuous detection data according to the preset cluster number and the clustering division threshold to obtain the clustering result; The preset cluster number is determined based on medical knowledge of the historical continuous detection data.

[0007] According to the drug recommendation method provided by the application, the semantic similarity between the diagnosis description text and the standard diagnosis description text is used to correct the diagnosis description text to obtain a corrected diagnosis description, which comprises the following steps: extracting key entities from the diagnosis description text; constructing a diagnosis knowledge graph by taking the key entities as nodes and the entity relationship between any two key entities as a connecting edge; calculating the semantic similarity between each node in the diagnosis knowledge graph and each standard node in a standard knowledge graph corresponding to the standard diagnosis description text; if the semantic similarity is greater than a preset similarity threshold, replacing the entity text corresponding to the standard node in the diagnosis description text to obtain the corrected diagnosis description.

[0008] According to the drug recommendation method provided by the application, the semantic similarity between the diagnosis description text and the standard diagnosis description text is used to correct the diagnosis description text to obtain a corrected diagnosis description, which comprises the following steps: constructing a user health portrait of the user in the current period based on the reconstructed detection data and the corrected diagnosis description; inputting the user health portrait in the current period and the historical user health portrait in the historical period into a drug recommendation model to obtain the drug recommendation result output by the drug recommendation model; the drug recommendation model is constructed based on a machine learning algorithm.

[0009] According to the drug recommendation method provided by the application, the semantic similarity between the diagnosis description text and the standard diagnosis description text is used to correct the diagnosis description text to obtain a corrected diagnosis description, which comprises the following steps: obtaining a comprehensive user portrait based on the user health portrait in the current period and the historical user health portrait; extracting detection features of the reconstructed detection data and diagnosis features of the corrected diagnosis description from the comprehensive user portrait; fusing the health features of the user based on the detection features and detection weights and the diagnosis features and diagnosis weights; obtaining the drug recommendation result based on the health features and the drug recommendation model.

[0010] According to the drug recommendation method provided by the application, the detection weight is determined based on the detection generation time of the detection data; the diagnosis weight is determined based on the diagnosis generation time of the diagnosis description text.

[0011] The application further provides a drug recommendation device, comprising: An acquisition unit acquires health record data of a current period of a user, the health record data comprising detection data and diagnosis description text; A detection data reconstruction unit matches a target cluster to which the detection data belongs from a clustering result, and takes a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained by clustering based on historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset period; A text correction unit corrects the diagnosis description text based on semantic similarity between the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; A recommendation unit generates a drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

[0012] The application further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the drug recommendation method according to any one of the above when executing the program.

[0013] The application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the drug recommendation method according to any one of the above.

[0014] The application further provides a computer program product comprising a computer program, wherein the computer program is executable by a processor to implement the drug recommendation method according to any one of the above.

[0015] The drug recommendation method, device, electronic device, and storage medium provided by the application match a target cluster to which detection data belongs from a clustering result, abstract the detection data based on dynamically changing clustering labels, obtain reconstructed detection data that is strong in interpretability, intuitive, and accurate, correct redundant and obscure diagnosis description text based on standard diagnosis description text, implement unified expression of standard diagnosis text, improve expression specification of the reconstructed detection data and the corrected diagnosis description, and further improve the accuracy of drug recommendation. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0017] Figure 1 is a flowchart of a drug recommendation method provided by the present application; Figure 2 is a structural diagram of a drug recommendation device provided by the present application; Figure 3 is a structural diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0018] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below with reference to the drawings in the present application. Obviously, the described embodiments are some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0019] In view of the above problems, the present application provides a drug recommendation method to achieve higher accuracy of drug recommendation. Figure 1 is a flowchart of a drug recommendation method provided by the present application, as shown in Figure 1 , the method comprises: Step 110, obtaining health record data of a user in a current period, the health record data comprising detection data and diagnosis description text; Here, the health record data of the user in the current period includes all data sets related to medical treatment closest to the current time of the user, including structured data such as detection data, and unstructured data such as diagnosis description text. Among them, the detection data refers to the quantitative record of the physiological indicators of the user, such as blood glucose value, white blood cell count, and imaging examination result. In addition, the diagnosis description text refers to the text description of the patient's condition by the doctor, which can include symptom description and diagnosis result.

[0020] Specifically, the health record data allowed to be accessed by the user can be obtained from a third-party platform. For example, the initial health record data in the current period can be obtained from an electronic health record system, a medical database or an Internet of Things device. Then, the initial health record data of the user in the current period can be data cleaned, and each feature of the initial health record data is traversed to remove missing information. At the same time, patient feature information (family situation, living habits, etc.) irrelevant to drug prediction is filtered out, and data deduplication is performed. Then, the detection data and diagnosis description text of the user are extracted from the health record data after data cleaning. Among them, the Internet of Things device can be a wearable device.

[0021] It can be understood that by obtaining the detection data of the user and the diagnosis description text, the integrity of the analysis data is ensured, laying a foundation for the accuracy of subsequent drug recommendation. In addition, by obtaining the health record data of the current period, drug recommendation based on the latest health record data is facilitated, improving the accuracy and reliability of drug recommendation.

[0022] In step 120, a target cluster to which the detection data belongs is matched from the clustering result, and a clustering label of the target cluster is taken as reconstructed detection data of the detection data; the clustering result is obtained by clustering based on historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset time period; Here, the clustering result includes a plurality of clusters obtained by clustering, and a cluster label corresponding to each cluster. The clustering label here refers to an interpretable label assigned to the target cluster. The clustering division threshold here refers to a threshold for clustering and dividing the historical detection data, which can be updated by a preset time period, so as to dynamically adjust the clustering result as the historical detection data is continuously updated, thereby affecting the reconstructed detection data based on the clustering label of the clustering result. That is, the standard for data governance of the detection data is dynamically updated, thereby improving the accuracy of the reconstructed detection data. In addition, the reconstructed detection data here refers to a new data form in which the numerical value of the original detection data is replaced or supplemented by the clustering label, enhancing the semantic expression of the original detection data.

[0023] Specifically, first, the historical detection data can be obtained, which refers to all detection data of the user before the current time. Then, the historical detection data can be one-dimensionally clustered according to the clustering division threshold by an unsupervised learning algorithm, obtaining a series of clusters. The target cluster to which the numerical value of the detection data belongs can be matched from the clusters contained in the clustering result by the numerical value corresponding to the detection data. For example, the numerical value of the detection data is blood pressure "145~150", and the clusters contained in the clustering result include "less than 80, 80~140, and greater than 140", and the target cluster is "greater than 140". Further, the clustering label of the target cluster can be taken as the reconstructed detection data of the detection data. For example, the cluster label corresponding to "greater than 140" here is "1st grade hypertension". It can be understood that for detection data with "gold standard", the numerical value level division in the "gold standard" for the detection data can be directly taken as the clustering result, and the clustering label of each cluster is obtained.

[0024] It should be noted that in the actual application of drug recommendation, the numerical value of the detection data cannot intuitively reflect the abnormal situation of the detection data, especially the continuous detection data. Therefore, if the original detection data is directly used for drug recommendation, important detection data value information may be missed, or important detection data may be misjudged, thereby affecting the accuracy of the final drug recommendation result.

[0025] The method provided by the embodiment of the present application can obtain reconstructed detection data with strong interpretability, intuition and high quality by matching the target cluster to which the detection data belongs from the clustering result and abstracting the clustering label of the target cluster to the detection data, thereby greatly improving the accuracy of drug recommendation based on the reconstructed detection data.

[0026] In step 130, the diagnostic description text is corrected based on the semantic similarity between the diagnostic description text and the standard diagnostic description text, to obtain a corrected diagnostic description. Here, the standard diagnostic description text refers to the standardized symptom description and diagnostic result in the authoritative medical literature and international disease classification code.

[0027] Specifically, first, the diagnostic description text corresponding to the disease diagnosis name in the diagnostic description text can be retrieved from the pre-constructed standard diagnostic description text library. Then, the user diagnostic description text and the standard diagnostic description text can be encoded into vectors by a pre-trained language model, and the cosine similarity between the encoded vectors can be calculated as the semantic similarity between the diagnostic description text and the standard diagnostic description text. When the semantic similarity is lower than the similarity threshold, the corrected diagnostic description can be obtained by retrieval enhancement generation or rule matching on the diagnostic description text.

[0028] It should be noted that the redundant and obscure diagnostic description text is corrected by the standard diagnostic description text, the unified expression of the standard diagnostic text is realized, the misjudgment caused by the difference in semantic expression is reduced, such as misjudging "high blood pressure" as "blood pressure rise", and the accuracy of subsequent drug recommendation is improved.

[0029] In step 140, the drug recommendation result of the user is generated based on the reconstructed detection data and the corrected diagnostic description.

[0030] Specifically, the reconstructed detection data and the corrected diagnostic description can be fused, and the fused reconstructed detection data and the corrected diagnostic description can be input into an artificial intelligence model, and the text features can be extracted by the artificial intelligence model, and the drug recommendation can be performed based on the text features to obtain the drug recommendation result.

[0031] It should be noted that the intelligent drug recommendation based on the standardized management of medical health data can provide personalized medication recommendations for patients. Due to the differences in physiological characteristics, disease types, and the like of each person, patients with the same disease also need to be reasonably medicated according to the basic conditions of the individual. The intelligent drug recommendation can analyze the information of the individual patient, combine the artificial intelligence big data analysis technology, and provide the most suitable medication plan for each patient, thereby maximizing the treatment effect.

[0032] The method provided by the embodiment of the application can match the target cluster to which the detection data belongs from the clustering result, abstract the detection data based on the dynamically changing clustering label, obtain reconstructed detection data with strong interpretability, intuition, and accuracy, and correct the redundant and obscure diagnostic description text through the standard diagnostic description text, so as to realize the unified expression of the standard diagnostic text, improve the expression standard of the reconstructed detection data and the corrected diagnostic description, and further improve the accuracy of drug recommendation.

[0033] According to any one of the above embodiments, the detection data includes continuous detection data. The acquisition of the clustering result includes: The historical continuous detection data, the clustering division threshold, and the preset cluster number are acquired. The historical continuous detection data is clustered according to the preset cluster number and the clustering division threshold, and the clustering result is obtained. The preset cluster number is determined based on the medical field knowledge of the historical continuous detection data.

[0034] Here, the continuous detection data refers to physiological index data that can be continuously measured or recorded within a certain time range, which is usually numerical data and has the characteristic of continuous change. For example, blood glucose fluctuation curve and blood pressure circadian rhythm. In addition, the preset cluster number here refers to the number of groups set by people before clustering analysis, which is used to constrain the number of categories of the clustering result. Here, the medical background knowledge of the historical continuous detection data can be used to reflect the classification standard for diseases. For example, hypertension is divided into “normal”, “normal high value”, “level 1”, “level 2”, and “level 3”, and the preset cluster number of the historical continuous detection data corresponding to hypertension is 5.

[0035] Specifically, the historical continuous detection data corresponding to the continuous detection data can be acquired, and the preset cluster number can be determined through the medical background knowledge of the historical continuous detection data. For example, the historical continuous detection data is for detecting hypertension, and the preset cluster number thereof is 5.

[0036] Then, a clustering algorithm such as a K-means algorithm can be selected to cluster the historical continuous detection data according to the preset cluster number and a clustering division threshold, to obtain a clustering cluster and a clustering label to which each clustering cluster belongs, that is, the obtained clustering cluster and clustering label can be taken as a clustering result.

[0037] The method provided by the embodiments of the present application determines the preset cluster number by the medical field knowledge of the historical continuous detection data, clusters the historical continuous detection data according to the preset cluster number, and obtains a clustering result, so that the clustering result conforms to the clinical logic, which is beneficial to generating an accurate clustering label for the continuous detection data, and makes the reconstructed detection data obtained based on the clustering result more standard and conform to the clinical logic, thereby improving the accuracy of drug recommendation.

[0038] Based on any of the above embodiments, step 130 comprises: extracting key entities of the diagnosis description text; constructing a diagnosis knowledge graph by taking the key entities as nodes and taking entity relationships between any two key entities as connecting edges; calculating semantic similarity between each node in the diagnosis knowledge graph and each standard node in a standard knowledge graph corresponding to the standard diagnosis description text; in a case where the semantic similarity is greater than a preset similarity threshold, replacing the diagnosis description text with entity text corresponding to the standard node to obtain the corrected diagnosis description.

[0039] Here, the key entity refers to a medical term with clinical significance in the diagnosis description text, including disease names, symptoms, etc. The diagnosis knowledge graph here refers to a graph structure composed of key entities and their relationships in the diagnosis text, used to represent the associated network of the patient's condition. In addition, the standard knowledge graph here refers to a graph structure composed of standard key entities and their relationships in the standard diagnosis description text, used to reflect the graph of standardized medical entities and their relationships based on medical standards.

[0040] Specifically, first, a pre-training model can be used to perform named entity recognition on the diagnosis description text to extract key entities. For example, the diagnosis description text is "patient persistent cough with low fever, suspected tuberculosis", and the extracted key entities include ["tuberculosis", "cough", "low fever"]. It should be noted that when extracting key entities, a medical dictionary (such as SNOMED CT, ICD-10) and regular expressions can be used to supplement entities that may be missed in named entity recognition, such as rare disease names and complex symptoms.

[0041] Then, the key entities can be taken as nodes, and the entity relationship between any two key entities can be taken as a connecting edge to construct a diagnosis knowledge graph. Further, the feature of each node in the diagnosis knowledge graph and the feature of each standard node in the diagnosis knowledge graph can be encoded by a graph neural network, respectively. Then, the semantic similarity between each node and each standard node can be obtained by calculating the cosine similarity or the Euclidean distance between the feature of each node and the feature of each standard node.

[0042] Next, the entity text corresponding to the standard node can be used to replace the key entity corresponding to the node in the diagnosis description text to obtain a revised diagnosis description when the semantic similarity is greater than a preset similarity threshold. For example, the "coughing blood" in the diagnosis description text can be replaced by "expectoration of blood".

[0043] The method provided by the embodiments of the present application can construct a diagnosis knowledge graph, calculate the semantic similarity between each node in the diagnosis knowledge graph and each standard node in the standard knowledge graph corresponding to the standard diagnosis description text, replace the entity text corresponding to the standard node in the diagnosis description text when the semantic similarity is greater than a preset similarity threshold, and realize the standardized revision of the revised diagnosis description. The expression of the diagnosis description text and the medical standard text is highly unified, and the accuracy of drug recommendation is further improved.

[0044] Based on any of the above embodiments, step 140 includes: Based on the reconstructed detection data and the revised diagnosis description, a user health portrait of the user in the current period is constructed; The user health portrait in the current period and the historical user health portrait in the historical period are input into a drug recommendation model to obtain the drug recommendation result output by the drug recommendation model; The drug recommendation model is constructed based on a machine learning algorithm.

[0045] Specifically, the drug recommendation model herein is constructed based on a machine learning algorithm, which can be a graph neural network and a gated recurrent unit. First, the user's governance health data can be obtained by fusing the reconstructed detection data and the revised diagnosis description. Then, the user's health portrait in the current period can be obtained by feature extraction on the governance health data, and the governance health data can be stored in a vector database. For example, for the user portrait in any period, the user can be taken as the main node, and the user's reconstructed detection data and revised diagnosis description can be taken as the sub-node to construct the user graph. Thus, the user's health portrait can be extracted by the graph neural network in the drug recommendation model for feature extraction on the user graph in any period. It should be noted that the user's health portrait can be obtained by a separate feature extraction network.

[0046] Further, the user portrait in the current period and the historical user health portrait in the historical period can be input into the drug recommendation model, the user portraits in each period can be processed by the gated recurrent unit in the drug recommendation model, the feature vector for drug recommendation can be obtained, and the drug recommendation result can be output.

[0047] It should be noted that the doctor's drug decision mainly depends on the doctor's experience and knowledge, which is easily disturbed by subjective factors and has certain limitations. Artificial intelligence technology can analyze a large amount of medical data and clinical research results to construct an objective and scientific drug decision model, improve the accuracy and effect of drug use, and thus realize intelligent drug recommendation.

[0048] The method provided by the embodiment of the application realizes the upgrade of drug use from "one drug for thousands of people" to "one strategy for one person" by comprehensively analyzing the user health portraits in different periods, greatly reduces the burden of artificial decision-making in the automatic process, and ensures the accuracy of drug recommendation.

[0049] Based on any of the above embodiments, the current user health portrait and the historical user health portrait in the historical period are input into the drug recommendation model to obtain the drug recommendation result output by the drug recommendation model, which includes: Based on the current user health portrait and the historical user health portrait, a comprehensive user portrait is obtained; The detection features of the reconstructed detection data and the diagnosis features of the revised diagnosis description in the comprehensive user portrait are extracted; Based on the detection features and detection weights, and the diagnosis features and diagnosis weights, the health features of the user are fused; Based on the drug recommendation model, the health features are applied to obtain the drug recommendation result.

[0050] Specifically, the graph corresponding to the user portrait of each time period can be subjected to feature extraction by the graph neural network in the drug recommendation model, and the corresponding graph features are extracted. Then, the graph features of the user health portrait of each time period are subjected to feature processing based on a gated recurrent unit, and a feature vector for drug recommendation is obtained, i.e., a comprehensive user portrait is obtained.

[0051] Then, the detection features of the reconstruction detection data in the comprehensive user portrait and the diagnosis features of the revised diagnosis description can be extracted. Then, the detection features and the detection weights, and the diagnosis features and the diagnosis weights can be subjected to weighted calculation, and the health features of the user are fused. For example, health features = 0.6* detection features + 0.4* diagnosis features. Then, the health features can be processed by a classifier represented by an MLP (Multi-Layer Perceptron, multi-layer feedforward neural network) in the drug recommendation model, and the first preset number of candidate drugs are output as the drug recommendation result. It should be noted that the drug recommendation model here can be obtained by training with a cross-entropy function as a loss function.

[0052] Based on any of the above embodiments, the detection weight is determined based on the detection generation time of the detection data; The diagnosis weight is determined based on the diagnosis generation time of the diagnosis description text.

[0053] Here, the detection generation time of the detection data refers to the generation time of the detection report when the user performs detection. The diagnosis generation time refers to the time when the output diagnosis result is performed on the user. It can be understood that the detection data and the diagnosis description report are both used as the basis for drug recommendation. When the recommendation basis is closer to the current time of drug recommendation, it means that the reliability of the recommendation basis is higher, and the weight of the recommendation basis is higher; on the contrary, the recommendation basis is farther away from the current time of drug recommendation, which means that the reliability of the recommendation basis is lower, and the weight of the recommendation basis is lower.

[0054] Specifically, the time expression can be extracted from the unstructured text (diagnosis description text) by a natural language processing model to obtain the diagnosis generation time of the diagnosis description text. In addition, the timestamp of the detection data can be directly parsed to obtain the detection generation time of the detection data. Then, the diagnosis time difference between the diagnosis generation time and the current time can be calculated, and the detection time difference between the detection generation time and the current time can be calculated. According to the time difference, the weight is dynamically allocated, the weight is higher when the time is closer, and the diagnosis weight and the detection weight are obtained.

[0055] It should be noted that the detection weight is determined by detecting the detection data generation time, the diagnosis weight is determined by the diagnosis generation time of the diagnosis description text, so that the weight of recent detection data or diagnosis data is higher, the historical abnormal value is avoided to interfere with the drug decision, and the current drug recommendation result can be ensured to be more matched with the current condition.

[0056] Based on any of the above embodiments, Figure 2 The structure diagram of the drug recommendation device provided by the application is shown in Figure 2 The device comprises: The acquisition unit 210 acquires the health record data of the user in the current period, and the health record data comprises detection data and diagnosis description text. The detection data reconstruction unit 220 matches the target class cluster to which the detection data belongs from the clustering result, and takes the clustering label of the target class cluster as the reconstructed detection data of the detection data; the clustering result is obtained by clustering based on historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset time period. The text correction unit 230 corrects the diagnosis description text based on the semantic similarity between the diagnosis description text and the standard diagnosis description text, and obtains a corrected diagnosis description. The recommendation unit 240 generates the drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

[0057] The device provided by the embodiment of the application matches the target class cluster to which the detection data belongs from the clustering result, abstracts the detection data based on the dynamically changing clustering label, obtains the reconstructed detection data which is strong in interpretability, intuitive and accurate, and corrects the redundant and obscure diagnosis description text based on the standard diagnosis description text, realizes the unified expression of the standard diagnosis text, improves the expression specification of the reconstructed detection data and the corrected diagnosis description, and further improves the accuracy of drug recommendation.

[0058] Based on any of the above embodiments, the detection data comprises continuous detection data. The detection data reconstruction unit is further specifically used for: Acquiring historical continuous detection data, the clustering division threshold, and a preset class cluster number; Clustering the historical continuous detection data according to the preset class cluster number and the clustering division threshold to obtain the clustering result; The preset class cluster number is determined based on the medical field knowledge of the historical continuous detection data.

[0059] Based on any of the above embodiments, the text correction unit is specifically used for: Extracting the key entity of the diagnosis description text; constructing a diagnosis knowledge graph by taking the key entities as nodes and taking the entity relationship between any two key entities as a connecting edge; calculating semantic similarity between each node in the diagnosis knowledge graph and each standard node in a standard knowledge graph corresponding to the standard diagnosis description text; replacing the entity text corresponding to the standard node in the diagnosis description text when the semantic similarity is greater than a preset similarity threshold, to obtain the revised diagnosis description.

[0060] Based on any of the above embodiments, the recommendation unit is specifically configured to: based on the reconstructed detection data and the revised diagnosis description, constructing a user health portrait of the user in the current period; inputting the user health portrait of the current period and the historical user health portrait of the historical period into a drug recommendation model to obtain the drug recommendation result output by the drug recommendation model; The drug recommendation model is constructed based on a machine learning algorithm.

[0061] Based on any of the above embodiments, the recommendation unit is specifically configured to: based on the user health portrait of the current period and the historical user health portrait, obtaining a comprehensive user portrait; extracting detection features of the reconstructed detection data and diagnosis features of the revised diagnosis description in the comprehensive user portrait; based on the detection features and detection weights, and the diagnosis features and diagnosis weights, fusing to obtain health features of the user; based on the drug recommendation model, applying the health features to obtain the drug recommendation result.

[0062] Based on any of the above embodiments, the detection weight is determined based on the detection generation time of the detection data; The diagnosis weight is determined based on the diagnosis generation time of the diagnosis description text.

[0063] Figure 3 An entity structure diagram of an electronic device is shown as Figure 3As shown, the electronic device can include a processor 310, a communications interface 320, a memory 330, and a communications bus 340, wherein the processor 310, the communications interface 320, and the memory 330 complete mutual communication through the communications bus 340. The processor 310 can invoke a logic instruction in the memory 330 to execute a drug recommendation method, which includes: acquiring health record data of a current period of a user, the health record data including detection data and diagnosis description text; matching a target cluster to which the detection data belongs from a clustering result, taking a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained based on clustering of historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset period; based on a semantic similarity of the diagnosis description text and a standard diagnosis description text, performing text correction on the diagnosis description text to obtain a corrected diagnosis description; and based on the reconstructed detection data and the corrected diagnosis description, generating a drug recommendation result of the user.

[0064] In addition, the logic instruction in the memory 330 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0065] In another aspect, the present application also provides a computer program product comprising a computer program, which can be stored on a non-transitory computer-readable storage medium, and the computer program can be executed by a processor to enable a computer to perform the drug recommendation method provided by the above-mentioned methods, which comprises: obtaining health record data of a user in a current period, the health record data comprising detection data and diagnosis description text; matching a target cluster to which the detection data belongs from a clustering result, and taking a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained based on clustering of historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset period; performing text correction on the diagnosis description text based on semantic similarity of the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; and generating a drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

[0066] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a drug recommendation method provided by the above-mentioned methods, which comprises: obtaining health record data of a user in a current period, the health record data comprising detection data and diagnosis description text; matching a target cluster to which the detection data belongs from a clustering result, and taking a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained based on clustering of historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset period; performing text correction on the diagnosis description text based on semantic similarity of the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; and generating a drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

[0067] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement it without creative labor.

[0068] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0069] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for recommending drugs, characterized in that, The method comprises the following steps: obtaining health record data of a current period of a user, the health record data comprising detection data and diagnosis description text; matching a target cluster to which the detection data belongs from a clustering result, and taking a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained by clustering historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset time period; performing text correction on the diagnosis description text based on semantic similarity between the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; generating a drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

2. The drug recommendation method according to claim 1, characterized by, The detection data comprises continuous detection data; The clustering result comprises the following steps: obtaining historical continuous detection data, the clustering division threshold, and a preset cluster number; clustering the historical continuous detection data according to the preset cluster number and the clustering division threshold, to obtain the clustering result; The preset cluster number is determined based on medical field knowledge of the historical continuous detection data.

3. The drug recommendation method according to claim 1, characterized by, The text correction on the diagnosis description text based on semantic similarity between the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description, comprises the following steps: extracting key entities of the diagnosis description text; constructing a diagnosis knowledge graph by taking the key entities as nodes and taking entity relationships between any two key entities as connecting edges; calculating semantic similarity between each node in the diagnosis knowledge graph and each standard node in a standard knowledge graph corresponding to the standard diagnosis description text; if the semantic similarity is greater than a preset similarity threshold, replacing entity text corresponding to the standard node in the diagnosis description text to obtain the corrected diagnosis description.

4. The drug recommendation method according to any one of claims 1 to 3, characterized by, The generation of the drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description comprises the following steps: constructing a user health portrait of the current period of the user based on the reconstructed detection data and the corrected diagnosis description; inputting the user health portrait of the current period and a historical user health portrait of a historical period into a drug recommendation model to obtain the drug recommendation result output by the drug recommendation model; The drug recommendation model is constructed based on a machine learning algorithm.

5. The drug recommendation method according to claim 4, characterized by, The inputting of the user health portrait of the current period and the historical user health portrait of the historical period into the drug recommendation model to obtain the drug recommendation result output by the drug recommendation model comprises the following steps: obtaining a comprehensive user portrait based on the user health portrait of the current period and the historical user health portrait; extracting detection features of the reconstructed detection data and diagnosis features of the corrected diagnosis description from the comprehensive user portrait; fusing the health features of the user based on the detection features and detection weights and the diagnosis features and diagnosis weights; applying the health features to the drug recommendation model based on the drug recommendation model to obtain the drug recommendation result.

6. The drug recommendation method according to claim 5, characterized by, The detection weights are determined based on detection generation time of the detection data. The diagnosis weight is determined based on a diagnosis generation time of the diagnosis description text.

7. A drug recommendation apparatus characterized by comprising: Comprise: An acquisition unit acquires health record data of a current period of a user, the health record data comprising detection data and diagnosis description text; A detection data reconstruction unit matches a target cluster to which the detection data belongs from a clustering result, and takes a clustering label of the target cluster as reconstructed detection data of the detection data; the clustering result is obtained by clustering based on historical detection data and a clustering division threshold, and the clustering division threshold is updated based on a preset time period; A text correction unit corrects the diagnosis description text based on a semantic similarity between the diagnosis description text and a standard diagnosis description text, to obtain a corrected diagnosis description; A recommendation unit generates a drug recommendation result of the user based on the reconstructed detection data and the corrected diagnosis description.

8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the drug recommendation method of any one of claims 1-6. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the drug recommendation method of any one of claims 1-6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the drug recommendation method of any one of claims 1-6.