Risk prediction method, device, electronic device and medium based on artificial intelligence

Through risk prediction methods based on artificial intelligence, combined with knowledge reasoning of disease decision trees and drug databases, and using contraindication detection models and risk prediction models, the problem of low efficiency in risk prediction of traditional Chinese medicine prescriptions in the existing technology is solved, and more accurate medication risks are achieved Testing and evaluation.

CN113870974BActive Publication Date: 2024-09-10SHENZHEN PING AN SMART HEALTHCARE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111142179.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-28
Publication Date
2024-09-10
Estimated Expiration
2041-09-28

AI Technical Summary

Technical Problem

Existing prescription risk prediction methods are usually based on a single dimension and are inefficient. They fail to effectively combine multiple dimensions for risk detection, resulting in inaccurate medication risk detection.

Method used

Adopt an artificial intelligence-based risk prediction method to determine the patient's diagnostic symptoms and build a disease decision tree, combine patient information and drug databases for knowledge reasoning, and use contraindication detection models and risk prediction models to conduct multi-dimensional risk assessments.

Benefits of technology

It improves the accuracy and prediction accuracy of drug risk detection, avoids misjudgments caused by single-dimensional assessment, and provides more comprehensive drug risk information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113870974B
    Figure CN113870974B
Patent Text Reader

Abstract

The present application relates to the field of artificial intelligence technology, and provides a risk prediction method, device, electronic device and medium based on artificial intelligence, the method comprising: in a pre-constructed decision tree library, querying the disease decision tree corresponding to the patient's diagnosed disease; inputting the disease characteristics corresponding to the patient into the disease decision tree to obtain the probability of illness; if the probability of illness is greater than or equal to the preset probability threshold, determining the corresponding prescription medication for the patient; based on the patient information and prescription medication of the patient, performing knowledge reasoning in a pre-constructed drug database to determine whether there are drugs that are risky to the patient in the prescription medication, if there are drugs that are risky to the patient in the prescription medication, determining the target information corresponding to the patient according to the risky medication; inputting the target information into the trained risk prediction model to obtain the medication risk value of the prescription medication. The present application improves the accuracy of medication risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically to an artificial intelligence-based risk prediction method, device, electronic device and medium. Background Art

[0002] In the medical field, doctors usually prescribe medicines for patients based on their own experience and the patient's symptoms. In the process of prescribing, doctors may be negligent and consider many aspects in a one-sided way, resulting in the prescribed medicines not having much effect on the patients. With the development of artificial intelligence, medical platforms can support risk prediction of prescriptions prescribed by doctors. However, current prescription risk prediction is usually based directly on a single dimension of prescriptions, and does not combine multiple dimensions to predict the risk of prescriptions. Therefore, the efficiency of existing prescription predictions is not high, and how to perform risk detection on patient medication has become a problem that needs to be solved urgently. Summary of the invention

[0003] In view of the above content, it is necessary to propose a risk prediction method, device, electronic device and medium based on artificial intelligence, which predicts the risk of medication based on data from multiple dimensions based on artificial intelligence, avoids the misjudgment caused by predicting medication risks from a single dimension, and improves the accuracy of medication risk prediction.

[0004] In a first aspect, the present application provides a risk prediction method based on artificial intelligence, the method comprising:

[0005] Determine the diagnosis disease corresponding to the patient, and query the disease decision tree corresponding to the diagnosis disease in the pre-built decision tree library;

[0006] Obtaining the disease characteristics corresponding to the patient, and inputting the disease characteristics into the disease decision tree to obtain the disease probability;

[0007] If the probability of illness is greater than or equal to a preset probability threshold, determining the corresponding prescription medication for the patient;

[0008] Based on the patient information of the patient and the prescribed medication, knowledge reasoning is performed in a pre-built drug database to determine whether there are any medications that are risky to the patient in the prescribed medications, and if there are any medications that are risky to the patient in the prescribed medications, target information corresponding to the patient is determined based on the risky medications;

[0009] The target information is input into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0010] According to an optional implementation of the present application, the performing of knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs to determine whether there are drugs in the prescribed drugs that are risky to the patient includes:

[0011] Determine, from the drug database, drug information corresponding to the prescription drug and a contraindication label corresponding to the drug information, wherein the drug information includes a contraindication detection result corresponding to the contraindication label;

[0012] Based on the use taboo label, information extraction is performed on the patient information to extract feature information corresponding to the use taboo label;

[0013] Knowledge reasoning is performed based on the contraindication detection result and the characteristic information to determine whether there are any drugs in the prescription that pose a risk to the patient.

[0014] According to an optional implementation of the present application, the extracting information from the patient information based on the use of the taboo label, extracting the feature information corresponding to the use of the taboo label includes:

[0015] Determine the contraindication type of the contraindication label corresponding to the drug information;

[0016] Based on the taboo type, determining an extraction keyword corresponding to the taboo type in a preset word library;

[0017] The patient information is searched based on the extracted keywords to determine and extract feature information corresponding to the taboo label.

[0018] According to an optional embodiment of the present application, before querying the disease decision tree corresponding to the diagnosed disease in the pre-constructed decision tree library, the method further includes:

[0019] Acquire a plurality of patient cases corresponding to the disease, and determine a plurality of disease characteristics based on the plurality of patient cases;

[0020] Determine a plurality of first symptom phrases according to the plurality of symptom characteristics, each of the first symptom phrases having only one symptom characteristic;

[0021] Randomly select two disease characteristics from the multiple disease characteristics to form a plurality of second disease phrases, each of which includes two disease characteristics;

[0022] Calculating the Gini index of each of the first disease word groups and each of the second disease word groups respectively, and determining a target word group in the first disease word groups and the second disease word groups based on the Gini index;

[0023] Based on the target phrase, a disease decision tree corresponding to the disease is constructed.

[0024] According to an optional implementation of the present application, constructing a disease decision tree corresponding to the disease based on the target phrase includes:

[0025] Determine the disease as the root node of the disease decision tree, take the disease feature corresponding to the target phrase as the first parent node, and perform binary bifurcation on the root node;

[0026] Determining, among the plurality of symptom features corresponding to the plurality of patient cases, a plurality of symptom features corresponding to the target phrase;

[0027] Based on the multiple disease characteristics corresponding to the target word group, determine multiple disease word groups, and calculate the Gini index of each of the disease word groups;

[0028] Based on the Gini index, the first parent node is bifurcated to obtain a constructed disease decision tree.

[0029] According to an optional implementation of the present application, knowledge reasoning is performed in a pre-constructed drug database to determine whether there are any drugs that are risky to the patient in the prescribed drugs. If there are any drugs that are risky to the patient in the prescribed drugs, before determining the target information corresponding to the patient according to the risky drugs, the method further includes:

[0030] Get the description text corresponding to the drug;

[0031] Segmenting the description text to obtain a plurality of text sentences, and segmenting each text sentence to obtain sentence segmentation of each text sentence;

[0032] Based on the Levenshtein distance, the similarity between each sentence segmentation and the preset key words is calculated;

[0033] Determine the sentence segmentation whose similarity is greater than or equal to the preset similarity threshold as the target segmentation, and determine the text sentence where the target segmentation is located as the target sentence;

[0034] Generating a representation vector of the target sentence according to sentence segmentation in the target sentence;

[0035] Inputting the representation vector into a pre-trained contraindication detection model to obtain contraindication detection results of the drug on multiple contraindication labels;

[0036] The drug, the multiple contraindication labels and the contraindication detection results corresponding to the multiple contraindication labels are used as drug information corresponding to the drug to construct the drug database.

[0037] According to an optional implementation of the present application, before inputting the target information into the trained risk prediction model, the method further includes:

[0038] Constructing a prediction learner based on multiple preset convolutional layers and preset fully connected layers; obtaining drug contraindication data corresponding to multiple drugs and contraindication labeling scores of the drug contraindication data;

[0039] Adjusting the prediction learner according to the drug contraindication data and the contraindication annotation score until the first loss function of the prediction learner no longer decreases, thereby obtaining a prediction initial model;

[0040] Acquire all model convolution layers from the prediction initial model, and perform quantization processing on the importance of all model convolution layers based on a grey relational analysis algorithm to obtain a quantized importance value of each model convolution layer;

[0041] Pruning the initial prediction model according to the importance quantization value to obtain a pruned model;

[0042] The trimming model is adjusted according to the drug contraindication data and the contraindication marking score until the second loss function of the trimming model no longer decreases, thereby obtaining the risk prediction model.

[0043] In a second aspect, the present application provides a risk prediction device based on artificial intelligence, the device comprising:

[0044] A disease query module is used to determine the diagnosis disease corresponding to the patient, and query the disease decision tree corresponding to the diagnosis disease in the pre-built decision tree library;

[0045] A probability calculation module is used to obtain the disease characteristics corresponding to the patient, and input the disease characteristics into the disease decision tree to obtain the disease probability;

[0046] A prescription determination module, used to determine the prescription medication corresponding to the patient if the probability of illness is greater than or equal to a preset probability threshold;

[0047] An information reasoning module is used to perform knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs, to determine whether there are any drugs that are risky to the patient in the prescribed drugs, and if there are any drugs that are risky to the patient in the prescribed drugs, to determine the target information corresponding to the patient according to the risky drugs;

[0048] The risk prediction module is used to input the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0049] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the processor is used to implement the artificial intelligence-based risk prediction method when executing a computer program stored in the memory.

[0050] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the artificial intelligence-based risk prediction method is implemented.

[0051] In summary, the risk prediction method, device, electronic device and medium based on artificial intelligence described in the present application determine the diagnostic disease corresponding to the patient and determine the disease decision tree corresponding to the diagnostic disease; obtain the symptom information corresponding to the patient, and input the symptom information into the disease decision tree to obtain the probability of illness, and by calculating the probability of illness corresponding to the patient, check whether the physician has misdiagnosed, thereby improving the accuracy of drug risk detection, and at the same time, based on the disease decision tree, the accuracy of determining the probability of illness can be improved; if the probability of illness is greater than or equal to the preset probability threshold, determine the prescription medication corresponding to the patient; based on the patient information of the patient and the prescription medication, perform knowledge reasoning in a pre-constructed drug database to determine whether there are drugs that are risky to the patient in the prescription medication, if there are drugs that are risky to the patient in the prescription medication, determine the target information corresponding to the patient according to the risky medication, and perform knowledge reasoning based on the drug database to effectively determine the risk information corresponding to the patient, that is, the target information; input the target information into the trained risk prediction model to obtain the medication risk value of the prescription medication, perform risk prediction from two different dimensions of patient misdiagnosis and prescription medication, and improve the accuracy of risk prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 This is a flow chart of the risk prediction method based on artificial intelligence provided in Example 1 of the present application.

[0053] Figure 2 This is a structural diagram of the risk prediction device based on artificial intelligence provided in Example 2 of the present application.

[0054] Figure 3 It is a schematic diagram of the structure of the electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0055] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing the embodiments in an optional embodiment and are not intended to limit the present application.

[0057] The risk prediction method based on artificial intelligence provided in the embodiment of the present application is executed by an electronic device, and accordingly, the risk prediction device based on artificial intelligence runs in the electronic device. The electronic device may include a mobile phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant, and a wearable device.

[0058] The embodiments of the present application can process the patient's diagnostic data based on artificial intelligence technology and predict the patient's medication risk. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0059] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0060] Embodiment 1

[0061] Figure 1 This is a flow chart of the risk prediction method based on artificial intelligence provided in Example 1 of the present application. The risk prediction method based on artificial intelligence specifically includes the following steps. According to different requirements, the order of the steps in the flow chart can be changed, and some can be omitted.

[0062] S11, determining the diagnosis disease corresponding to the patient, and searching a disease decision tree corresponding to the diagnosis disease in a pre-built decision tree library.

[0063] For example, the disease recorded in the patient's medical record completed by the physician can be determined as the corresponding diagnosis disease of the patient. The pre-built decision tree library includes disease decision trees corresponding to multiple diseases. The disease decision tree is used to calculate the probability that the patient suffers from a certain disease.

[0064] In an optional embodiment, before querying the disease decision tree corresponding to the diagnosed disease in the pre-constructed decision tree library, the method further comprises:

[0065] Acquire a plurality of patient cases corresponding to the disease, and determine a plurality of disease characteristics based on the plurality of patient cases;

[0066] Determine a plurality of first symptom phrases according to the plurality of symptom characteristics, each of the first symptom phrases having only one symptom characteristic;

[0067] Randomly select two disease characteristics from the multiple disease characteristics to form a plurality of second disease phrases, each of which includes two disease characteristics;

[0068] Calculating the Gini index of each of the first disease word groups and each of the second disease word groups respectively, and determining a target word group in the first disease word groups and the second disease word groups based on the Gini index;

[0069] Based on the target phrase, a disease decision tree corresponding to the disease is constructed.

[0070] Patient records of multiple patients diagnosed with a certain disease are obtained, wherein the patient records include multiple disease characteristics corresponding to each patient. The disease characteristics are used to represent the patient's condition, such as cough, shortness of breath, sore throat, thirst, etc.

[0071] According to the plurality of symptom characteristics, a plurality of first symptom phrases are determined. For example, according to the four symptom characteristics of cough, shortness of breath, sore throat and thirst, four first symptom phrases (first symptom phrase: cough, first symptom phrase: shortness of breath, first symptom phrase: sore throat and first symptom phrase: thirst) are determined.

[0072] Two symptom features are randomly selected from the plurality of symptom features to form a plurality of second symptom phrases, each of which includes two symptom features. For example, six second symptom phrases are determined based on the four symptom features of cough, shortness of breath, sore throat and thirst (second symptom phrase: cough, shortness of breath; second symptom phrase: cough, sore throat; second symptom phrase: cough, thirst; second symptom phrase: shortness of breath, sore throat; second symptom phrase: shortness of breath, thirst; second symptom phrase: sore throat, thirst).

[0073] The Gini index of each first symptom phrase and each second symptom phrase is calculated, and based on the size of the Gini index, the first symptom phrase and the second symptom phrase are sorted from small to large, and the two phrases with the smallest Gini index are selected as target phrases.

[0074] In an optional embodiment, constructing a disease decision tree corresponding to the disease based on the target phrase includes:

[0075] Determine the disease as the root node of the disease decision tree, take the disease feature corresponding to the target phrase as the first parent node, and perform binary bifurcation on the root node;

[0076] Determining, among the plurality of symptom features corresponding to the plurality of patient cases, a plurality of symptom features corresponding to the target phrase;

[0077] Based on the multiple disease characteristics corresponding to the target word group, determine multiple disease word groups, and calculate the Gini index of each of the disease word groups;

[0078] Based on the Gini index, the first parent node is bifurcated to obtain a constructed disease decision tree.

[0079] Exemplarily, an algorithm can be established based on a CART regression tree to establish a disease decision tree corresponding to the disease. Based on the disease feature corresponding to the target phrase as the first parent node, continue to divide into two, so as to obtain a disease decision tree corresponding to the disease. For example, determine a patient case containing the disease feature in the target phrase, and determine multiple disease features corresponding to the patient case, and determine the other disease features of the multiple disease features except the disease feature included in the target phrase as the multiple disease features corresponding to the target phrase.

[0080] S12, obtaining the symptom characteristics corresponding to the patient, and inputting the symptom characteristics into the symptom decision tree to obtain the probability of illness.

[0081] Exemplarily, the disease characteristics corresponding to the patient can be determined based on the patient information recorded on the patient case completed by the physician, and the disease characteristics are substituted into the disease decision tree for calculation to obtain the probability of the patient suffering from the disease. For example, based on the node value corresponding to each node in the disease decision tree, the probability of the patient suffering from the disease is obtained. For example, the disease characteristics are substituted into the disease decision tree, one or more nodes corresponding to the disease characteristics are determined, and the sum of the node values ​​corresponding to the one or more nodes is determined as the probability of the patient suffering from the disease.

[0082] S13: If the probability of illness is greater than or equal to a preset probability threshold, determine the corresponding prescription medication for the patient.

[0083] For example, if the probability of the disease is less than the preset probability threshold, it is determined that the doctor misdiagnoses the patient, the patient is misdiagnosed, and does not suffer from the disease, and a corresponding error prompt is generated. For example, it can also be determined that the current medication risk is 100%.

[0084] If the probability of illness is greater than or equal to a preset probability threshold, it is determined that the patient's diagnosis is correct and the patient suffers from the disease. The corresponding prescription medication for the patient is obtained, and it is determined whether the prescription medication is consistent with the patient's condition.

[0085] S14, based on the patient information of the patient and the prescribed drugs, knowledge reasoning is performed in a pre-constructed drug database to determine whether there are any risky drugs for the patient in the prescribed drugs. If there are any risky drugs for the patient in the prescribed drugs, the target information corresponding to the patient is determined based on the risky drugs.

[0086] If it is determined that the prescribed medications contain risky medications for the patient, target information corresponding to the patient is determined based on the risky medications.

[0087] The drug database stores drug contraindication information corresponding to different drugs. Drug contraindication information may include a use contraindication label and a contraindication detection result corresponding to the use contraindication label. For example, drug A has three use contraindication labels: an age contraindication label, a population contraindication label, and a disease contraindication label. Among them, the contraindication detection result corresponding to the age contraindication label is contraindicated for the elderly, the contraindication detection result corresponding to the population contraindication label is used with caution by pregnant women, and the contraindication detection result corresponding to the disease contraindication label is contraindicated for hypertension.

[0088] The target information refers to the drug contraindication information that successfully matches the patient information. For example, the drug information is drug A (Drug A has three specific usage contraindication labels: age contraindication label, population contraindication label and disease contraindication label. Among them, the contraindication detection result corresponding to the age contraindication label is contraindicated for the elderly, the contraindication detection result corresponding to the population contraindication label is used with caution by pregnant women, and the contraindication detection result corresponding to the disease contraindication label is contraindicated for hypertension), and the patient information is: the patient is an elderly person, then the target information is: age contraindication label-contraindicated for the elderly.

[0089] In an optional embodiment, before performing knowledge reasoning in a pre-built drug database to determine whether there is a drug in the prescribed drug that poses a risk to the patient, the method further includes:

[0090] Get the description text corresponding to the drug;

[0091] Segmenting the description text to obtain a plurality of text sentences, and segmenting each text sentence to obtain sentence segmentation of each text sentence;

[0092] Based on the Levenshtein distance, the similarity between each sentence segmentation and the preset key words is calculated;

[0093] Determine the sentence segmentation whose similarity is greater than or equal to the preset similarity threshold as the target segmentation, and determine the text sentence where the target segmentation is located as the target sentence;

[0094] Generating a representation vector of the target sentence according to sentence segmentation in the target sentence;

[0095] Inputting the representation vector into a pre-trained contraindication detection model to obtain contraindication detection results of the drug on multiple contraindication labels;

[0096] The drug, the multiple contraindication labels and the contraindication detection results corresponding to the multiple contraindication labels are used as drug information corresponding to the drug to construct the drug database.

[0097] The description text may be the instruction sheet of any drug.

[0098] The medicine refers to the medicine described in the description text. The present invention does not limit the medicine, for example, the medicine may be amoxicillin capsule.

[0099] The preset key words are used to indicate the words that need to be focused on in the text. For example, the preset key words may include: contraindications, usage and dosage, adverse reactions, etc.

[0100] Levenshtein distance, also known as edit distance, describes the minimum number of edit operations required to transform one string into another. The greater the distance, the more different they are. Based on the difference in distance, the similarity between each sentence segmentation and the preset key words is calculated.

[0101] The preset similarity threshold can be set according to the requirements, and the preset similarity threshold is generally set to 60%-90%. For example, the preset similarity threshold can be set to 80%.

[0102] In an optional embodiment, the method further comprises the following steps:

[0103] Obtain a drug description text, wherein the drug description text includes contraindication information and a usage contraindication label corresponding to the contraindication information; train a usage contraindication detection model based on the drug description text, and determine whether the contraindication judgment rate of the usage contraindication detection model meets a preset expected value, wherein the usage contraindication detection model is used to determine the contraindication information in the drug description text based on a preset usage contraindication detection label; if the contraindication judgment rate of the usage contraindication detection model does not meet the preset expected value, adjust the model parameters of the usage contraindication detection model; iteratively use the user comment sample to train the usage contraindication detection model until it is determined that the contraindication judgment rate of the usage contraindication detection model meets the preset expected value, stop training the usage contraindication detection model, and obtain a trained usage contraindication detection model.

[0104] Exemplarily, the taboo detection model may include an input layer, a hidden layer, and an output layer. The input layer is used to input a representation vector corresponding to the drug description text to be identified; the hidden layer is used to identify the input representation vector based on a preset taboo label, and determine whether there is a text description corresponding to the taboo label in the drug description text, that is, determine whether there is taboo information corresponding to the taboo label; the output layer is used to output the taboo information, that is, output the taboo information (taboo detection result) corresponding to the drug description text on the taboo label. The taboo detection model can be a single-task model, corresponding to one taboo label, and outputs the taboo detection result of each taboo label. The taboo detection model can also be a multi-task model, corresponding to multiple taboo labels, and outputs multiple taboo detection results corresponding to the multiple taboo labels.

[0105] The use taboo label refers to the use taboo label with contraindications in the drug, which may include user information labels related to prohibited groups of people. The use taboo label includes, but is not limited to: age taboo, group taboo, disease taboo, etc. The taboo detection result corresponding to the use taboo label includes the range corresponding to the use taboo label. Such as the use age range, the use group range, and the use taboo disease range. The drug information corresponding to the drug may include the drug, the multiple use taboo labels, and the taboo detection results corresponding to the multiple use taboo labels.

[0106] Through the above implementation, it is possible to select sentence segmentations similar to the preset key words as the target segmentations, thereby improving the comprehensiveness of the target segmentations and thus improving the comprehensiveness of the drug database. At the same time, it is possible to filter out the target sentences from the multiple text sentences, thereby avoiding the analysis of all text sentences in the description text and improving the efficiency of building the drug database. In addition, the contraindication detection results of the drug on the multiple contraindication labels can be accurately detected through the contraindication detection model, thereby improving the accuracy of building the drug database.

[0107] Exemplarily, the explanatory text may be segmented based on the text symbols in the explanatory text to obtain multiple text sentences. For example, multiple preset symbols may be pre-set, and the text symbols in the explanatory text that successfully match the preset symbols are determined as target symbols; the explanatory text is segmented according to the target symbols to obtain the multiple text sentences. The target symbols may include identifiers such as “.” and “!” that indicate the end of a sentence.

[0108] Exemplarily, the text sentence can be segmented according to a preset dictionary to obtain multiple segmentation paths and path segmentations for each segmentation path; the path score of each segmentation path is calculated according to the lexical weight of the path segmentation in the preset dictionary; the segmentation path with the highest path score is determined as the target path, and the path segmentation corresponding to the target path is determined as the sentence segmentation.

[0109] The preset dictionary stores a plurality of custom words and a weight of each custom word, and the weight is determined according to the frequency of each word in a plurality of texts. Through the above implementation, the path score can be accurately determined, thereby improving the segmentation accuracy of the text sentence.

[0110] In an optional embodiment, the performing of knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs to determine whether there are drugs in the prescribed drugs that pose a risk to the patient includes:

[0111] Determine, from the drug database, drug information corresponding to the prescription drug and a contraindication label corresponding to the drug information, wherein the drug information includes a contraindication detection result corresponding to the contraindication label;

[0112] Based on the use taboo label, information extraction is performed on the patient information to extract feature information corresponding to the use taboo label;

[0113] Knowledge reasoning is performed based on the contraindication detection result and the characteristic information to obtain target information corresponding to the patient.

[0114] The drug information refers to the information in the drug database corresponding to the prescription drug.

[0115] The characteristic information refers to the patient information corresponding to the taboo label. For example, the characteristic information corresponding to the age taboo label is the patient's age, the characteristic information corresponding to the population taboo label is the population to which the patient belongs, and the characteristic information corresponding to the disease taboo label is the disease suffered by the patient.

[0116] Exemplarily, performing knowledge reasoning based on the contraindication detection result corresponding to the use of the contraindication label and the characteristic information to determine whether there are any drugs that are risky to the patient in the prescription drugs may include: calculating the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information, and determining whether there are any drugs that are risky to the patient in the prescription drugs based on the matching degree. If the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information is greater than or equal to a preset matching value, it is determined that there are drugs that are risky to the patient in the prescription drugs; if the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information is less than the preset matching value, it is determined that there are no drugs that are risky to the patient in the prescription drugs. If the matching degree between a characteristic information and a contraindication detection result is greater than or equal to a preset matching value, the characteristic information is determined as the target information corresponding to the patient.

[0117] For example, there is a drug A in the prescription that is risky to the patient, and the contraindication label of drug A is contraindication for use by age, and the contraindication detection result corresponding to the contraindication label is contraindicated for the elderly. The patient's characteristic information is age: 65, which is an elderly person. The matching degree between the patient's characteristic information and the contraindication detection result corresponding to the contraindication label is 100%, and the contraindication detection result corresponding to the contraindication label is determined as the target information corresponding to the patient, that is, the target information corresponding to the patient is determined as age contraindication: contraindicated for the elderly.

[0118] By extracting the characteristic information through the contraindication label corresponding to the drug information, it is not necessary to analyze all patient information, so the reasoning efficiency of the characteristic information can be improved, thereby improving the efficiency of generating the target information. In addition, by performing knowledge reasoning on the characteristic information, the accuracy of the reasoning information in representing the user patient on the contraindication label can be improved, so that the target information can be accurately generated.

[0119] In an optional implementation, extracting information from the patient information based on the use taboo label, extracting feature information corresponding to the use taboo label includes:

[0120] Determine the contraindication type of the contraindication label corresponding to the drug information;

[0121] Based on the taboo type, determining an extraction keyword corresponding to the taboo type in a preset word library;

[0122] The patient information is searched based on the extracted keywords to determine and extract feature information corresponding to the taboo label.

[0123] The taboo type is used to describe the characteristics of the taboo population, such as age, age group and disease. For example, the taboo type corresponding to the taboo label of age can be age, the taboo type corresponding to the taboo label of population can be age stage, and the taboo type corresponding to the taboo label of disease can be disease.

[0124] A word library is pre-set, and the word library stores mapping relationships between multiple taboo types and keywords corresponding to the multiple taboo types. By querying the preset word library, the keywords corresponding to the taboo types can be determined, and the keywords can be used to extract feature information corresponding to the use of the taboo label in the patient information. Among them, one taboo type can correspond to one or more keywords.

[0125] S15, inputting the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0126] The risk prediction model is used to predict the risk impact of the prescription medication in combination with the target information. The target information is input into the risk prediction model, and the medication risk value of the prescription medication can be output.

[0127] In an optional embodiment, before inputting the target information into the trained risk prediction model, the method further includes:

[0128] Constructing a prediction learner based on multiple preset convolutional layers and preset fully connected layers; obtaining drug contraindication data corresponding to multiple drugs and contraindication labeling scores of the drug contraindication data;

[0129] Adjusting the prediction learner according to the drug contraindication data and the contraindication annotation score until the first loss function of the prediction learner no longer decreases, thereby obtaining a prediction initial model;

[0130] Acquire all model convolution layers from the prediction initial model, and perform quantization processing on the importance of all model convolution layers based on a grey relational analysis algorithm to obtain a quantized importance value of each model convolution layer;

[0131] Pruning the initial prediction model according to the importance quantization value to obtain a pruned model;

[0132] The trimming model is adjusted according to the drug contraindication data and the contraindication marking score until the second loss function of the trimming model no longer decreases, thereby obtaining the risk prediction model.

[0133] The drug contraindication data may include drug contraindication information, which is used to explain prohibited user characteristics. For example, the drug contraindication data corresponding to drug A is used with caution for pregnant women, prohibited for people with high blood pressure, and prohibited for the elderly. The contraindication mark score of the drug contraindication data is used to indicate the risk level of the drug risk. The larger the mark score, the greater the risk of the drug risk; the smaller the mark score, the smaller the risk of the drug risk.

[0134] Exemplarily, the risk prediction model may include an input layer, a hidden layer, and an output layer. The input layer is used to input target information; the hidden layer is used to predict medication risk based on the input target information; and the output layer is used to output a predicted medication risk value.

[0135] Among them, the convolution kernel sizes in the multiple preset convolution layers are all preset.

[0136] In some embodiments, the target drug corresponding to the target information can be determined, and the drug level corresponding to the target drug can be determined, and the risk value of the prescription drug can be obtained according to the drug level and the medication risk value output by the risk prediction model. For example, the risk weight corresponding to the target drug can be determined according to the drug level, and the risk weight can be multiplied by the medication risk value to obtain the risk value of the prescription drug.

[0137] For example, a corresponding reminder may be generated according to the size of the medication risk value. For example, as the risk value increases, the intensity of the reminder also increases.

[0138] The risk prediction method based on artificial intelligence described in the present application determines the diagnostic disease corresponding to the patient and determines the disease decision tree corresponding to the diagnostic disease; obtains the symptom information corresponding to the patient, and inputs the symptom information into the disease decision tree to obtain the probability of illness, and by calculating the probability of illness corresponding to the patient, checks whether the physician has misdiagnosed, thereby improving the accuracy of drug risk detection, and at the same time, based on the disease decision tree, the accuracy of determining the probability of illness can be improved; if the probability of illness is greater than or equal to a preset probability threshold, determines the prescription medication corresponding to the patient; based on the patient information of the patient and the prescription medication, performs knowledge reasoning in a pre-constructed drug database to determine whether there are drugs that are risky to the patient in the prescription medication, and if there are drugs that are risky to the patient in the prescription medication, determines the target information corresponding to the patient according to the risky medication, and performs knowledge reasoning based on the drug database to effectively determine the risk information corresponding to the patient, that is, the target information; inputs the target information into the trained risk prediction model to obtain the medication risk value of the prescription medication, and performs risk prediction from two different dimensions of patient misdiagnosis and prescription medication, thereby improving the accuracy of risk prediction.

[0139] Embodiment 2

[0140] Figure 2 This is a structural diagram of the risk prediction device based on artificial intelligence provided in Example 2 of the present application.

[0141] In some embodiments, the risk prediction device 20 based on artificial intelligence may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the risk prediction device 20 based on artificial intelligence may be stored in the memory of the electronic device and executed by at least one processor to execute (see Figure 1 (Describe) the capabilities of artificial intelligence-based risk prediction methods.

[0142] In this embodiment, the risk prediction device 20 based on artificial intelligence can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a symptom query module 201, a probability calculation module 202, a prescription determination module 203, an information reasoning module 204 and a risk prediction module 205. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0143] The symptom query module 201 is used to determine the diagnosis symptom corresponding to the patient, and query the symptom decision tree corresponding to the diagnosis symptom in the pre-built decision tree library.

[0144] For example, the disease recorded in the patient's medical record completed by the physician can be determined as the corresponding diagnosis disease of the patient. The pre-built decision tree library includes disease decision trees corresponding to multiple diseases. The disease decision tree is used to calculate the probability that the patient suffers from a certain disease.

[0145] In an optional embodiment, before searching the disease decision tree corresponding to the diagnosis disease in the pre-built decision tree library, the disease query module 201 is further used to:

[0146] Acquire a plurality of patient cases corresponding to the disease, and determine a plurality of disease characteristics based on the plurality of patient cases;

[0147] Determine a plurality of first symptom phrases according to the plurality of symptom characteristics, each of the first symptom phrases having only one symptom characteristic;

[0148] Randomly select two disease characteristics from the multiple disease characteristics to form a plurality of second disease phrases, each of which includes two disease characteristics;

[0149] Calculating the Gini index of each of the first disease word groups and each of the second disease word groups respectively, and determining a target word group in the first disease word groups and the second disease word groups based on the Gini index;

[0150] Based on the target phrase, a disease decision tree corresponding to the disease is constructed.

[0151] Patient records of multiple patients diagnosed with a certain disease are obtained, wherein the patient records include multiple disease characteristics corresponding to each patient. The disease characteristics are used to represent the patient's condition, such as cough, shortness of breath, sore throat, thirst, etc.

[0152] According to the plurality of symptom characteristics, a plurality of first symptom phrases are determined. For example, according to the four symptom characteristics of cough, shortness of breath, sore throat and thirst, four first symptom phrases (first symptom phrase: cough, first symptom phrase: shortness of breath, first symptom phrase: sore throat and first symptom phrase: thirst) are determined.

[0153] Two symptom features are randomly selected from the plurality of symptom features to form a plurality of second symptom phrases, each of which includes two symptom features. For example, six second symptom phrases are determined based on the four symptom features of cough, shortness of breath, sore throat and thirst (second symptom phrase: cough, shortness of breath; second symptom phrase: cough, sore throat; second symptom phrase: cough, thirst; second symptom phrase: shortness of breath, sore throat; second symptom phrase: shortness of breath, thirst; second symptom phrase: sore throat, thirst).

[0154] The Gini index of each first symptom phrase and each second symptom phrase is calculated, and based on the size of the Gini index, the first symptom phrase and the second symptom phrase are sorted from small to large, and the two phrases with the smallest Gini index are selected as target phrases.

[0155] In an optional implementation, the symptom query module 201 constructs a symptom decision tree corresponding to the symptom based on the target phrase, including:

[0156] Determine the disease as the root node of the disease decision tree, take the disease feature corresponding to the target phrase as the first parent node, and perform binary bifurcation on the root node;

[0157] Determining, among the plurality of symptom features corresponding to the plurality of patient cases, a plurality of symptom features corresponding to the target phrase;

[0158] Based on the multiple disease characteristics corresponding to the target word group, determine multiple disease word groups, and calculate the Gini index of each of the disease word groups;

[0159] Based on the Gini index, the first parent node is bifurcated to obtain a constructed disease decision tree.

[0160] Exemplarily, an algorithm can be established based on a CART regression tree to establish a disease decision tree corresponding to the disease. Based on the disease feature corresponding to the target phrase as the first parent node, continue to divide into two, so as to obtain a disease decision tree corresponding to the disease. For example, determine a patient case containing the disease feature in the target phrase, and determine multiple disease features corresponding to the patient case, and determine the other disease features of the multiple disease features except the disease feature included in the target phrase as the multiple disease features corresponding to the target phrase.

[0161] The probability calculation module 202 is used to obtain the disease characteristics corresponding to the patient, and input the disease characteristics into the disease decision tree to obtain the disease probability.

[0162] Exemplarily, the disease characteristics corresponding to the patient can be determined based on the patient information recorded on the patient case completed by the physician, and the disease characteristics are substituted into the disease decision tree for calculation to obtain the probability of the patient suffering from the disease. For example, based on the node value corresponding to each node in the disease decision tree, the probability of the patient suffering from the disease is obtained. For example, the disease characteristics are substituted into the disease decision tree, one or more nodes corresponding to the disease characteristics are determined, and the sum of the node values ​​corresponding to the one or more nodes is determined as the probability of the patient suffering from the disease.

[0163] The prescription determination module 203 is used to determine the prescription medication corresponding to the patient if the probability of illness is greater than or equal to a preset probability threshold.

[0164] For example, if the probability of the disease is less than the preset probability threshold, it is determined that the doctor misdiagnoses the patient, the patient is misdiagnosed, and does not suffer from the disease, and a corresponding error prompt is generated. For example, it can also be determined that the current medication risk is 100%.

[0165] If the probability of illness is greater than or equal to a preset probability threshold, it is determined that the patient's diagnosis is correct and the patient suffers from the disease. The corresponding prescription medication for the patient is obtained, and it is determined whether the prescription medication is consistent with the patient's condition.

[0166] The information reasoning module 204 is used to perform knowledge reasoning in a pre-constructed drug database based on the patient information of the patient and the prescribed drugs to determine whether there are any drugs that are risky to the patient in the prescribed drugs. If there are any drugs that are risky to the patient in the prescribed drugs, determine the target information corresponding to the patient based on the risky drugs.

[0167] If it is determined that the prescribed medications contain risky medications for the patient, target information corresponding to the patient is determined based on the risky medications.

[0168] The drug database stores drug contraindication information corresponding to different drugs. Drug contraindication information may include a use contraindication label and a contraindication detection result corresponding to the use contraindication label. For example, drug A has three use contraindication labels: an age contraindication label, a population contraindication label, and a disease contraindication label. Among them, the contraindication detection result corresponding to the age contraindication label is contraindicated for the elderly, the contraindication detection result corresponding to the population contraindication label is used with caution by pregnant women, and the contraindication detection result corresponding to the disease contraindication label is contraindicated for hypertension.

[0169] The target information refers to the drug contraindication information that successfully matches the patient information. For example, the drug information is drug A (Drug A has three specific usage contraindication labels: age contraindication label, population contraindication label and disease contraindication label. Among them, the contraindication detection result corresponding to the age contraindication label is contraindicated for the elderly, the contraindication detection result corresponding to the population contraindication label is used with caution by pregnant women, and the contraindication detection result corresponding to the disease contraindication label is contraindicated for hypertension), and the patient information is: the patient is an elderly person, then the target information is: age contraindication label-contraindicated for the elderly.

[0170] In an optional embodiment, before performing knowledge reasoning in a pre-built drug database to determine whether there is a drug in the prescribed drug that poses a risk to the patient, the information reasoning module 204 is further used to:

[0171] Get the description text corresponding to the drug;

[0172] Segmenting the description text to obtain a plurality of text sentences, and segmenting each text sentence to obtain sentence segmentation of each text sentence;

[0173] Based on the Levenshtein distance, the similarity between each sentence segmentation and the preset key words is calculated;

[0174] Determine the sentence segmentation whose similarity is greater than or equal to the preset similarity threshold as the target segmentation, and determine the text sentence where the target segmentation is located as the target sentence;

[0175] Generating a representation vector of the target sentence according to sentence segmentation in the target sentence;

[0176] Inputting the representation vector into a pre-trained contraindication detection model to obtain contraindication detection results of the drug on multiple contraindication labels;

[0177] The drug, the multiple contraindication labels and the contraindication detection results corresponding to the multiple contraindication labels are used as drug information corresponding to the drug to construct the drug database.

[0178] The description text may be the instruction sheet of any drug.

[0179] The medicine refers to the medicine described in the description text. The present invention does not limit the medicine, for example, the medicine may be amoxicillin capsule.

[0180] The preset key words are used to indicate the words that need to be focused on in the text. For example, the preset key words may include: contraindications, usage and dosage, adverse reactions, etc.

[0181] Levenshtein distance, also known as edit distance, describes the minimum number of edit operations required to transform one string into another. The greater the distance, the more different they are. Based on the difference in distance, the similarity between each sentence segmentation and the preset key words is calculated.

[0182] The preset similarity threshold can be set according to the requirements, and the preset similarity threshold is generally set to 60%-90%. For example, the preset similarity threshold can be set to 80%.

[0183] In an optional implementation, the information reasoning module 204 is further configured to:

[0184] Obtain a drug description text, wherein the drug description text includes contraindication information and a usage contraindication label corresponding to the contraindication information; train a usage contraindication detection model based on the drug description text, and determine whether the contraindication judgment rate of the usage contraindication detection model meets a preset expected value, wherein the usage contraindication detection model is used to determine the contraindication information in the drug description text based on a preset usage contraindication detection label; if the contraindication judgment rate of the usage contraindication detection model does not meet the preset expected value, adjust the model parameters of the usage contraindication detection model; iteratively use the user comment sample to train the usage contraindication detection model until it is determined that the contraindication judgment rate of the usage contraindication detection model meets the preset expected value, stop training the usage contraindication detection model, and obtain a trained usage contraindication detection model.

[0185] Exemplarily, the contraindication detection model may include an input layer, a hidden layer, and an output layer. The input layer is used to input a representation vector corresponding to the drug description text to be identified; the hidden layer is used to identify the input representation vector based on a preset contraindication label, and determine whether there is a text description corresponding to the contraindication label in the drug description text, that is, determine whether there is contraindication information corresponding to the contraindication label; the output layer is used to output the contraindication information, that is, output the contraindication information (contraindication detection result) corresponding to the drug description text on the contraindication label.

[0186] The taboo detection model can be a single-task model, corresponding to one taboo label, and outputs each taboo detection result of the taboo label. The taboo detection model can also be a multi-task model, corresponding to multiple taboo labels, and outputs multiple taboo detection results corresponding to the multiple taboo labels.

[0187] The contraindication label refers to the contraindication label of the drug, which may include user information labels related to prohibited groups of people. The contraindication label includes, but is not limited to: age contraindications, group contraindications, disease contraindications, etc.

[0188] The contraindication test results corresponding to the contraindication labels include the scope corresponding to the contraindication labels, such as the age range, population range, and contraindication disease range.

[0189] The drug information corresponding to the drug may include the drug, the multiple usage contraindication labels, and contraindication detection results corresponding to the multiple usage contraindication labels.

[0190] Through the above implementation, it is possible to select sentence segmentations similar to the preset key words as the target segmentations, thereby improving the comprehensiveness of the target segmentations and thus improving the comprehensiveness of the drug database. At the same time, it is possible to filter out the target sentences from the multiple text sentences, thereby avoiding the analysis of all text sentences in the description text and improving the efficiency of building the drug database. In addition, the contraindication detection results of the drug on the multiple contraindication labels can be accurately detected through the contraindication detection model, thereby improving the accuracy of building the drug database.

[0191] Exemplarily, the explanatory text may be segmented based on the text symbols in the explanatory text to obtain multiple text sentences. For example, multiple preset symbols may be pre-set, and the text symbols in the explanatory text that successfully match the preset symbols are determined as target symbols; the explanatory text is segmented according to the target symbols to obtain the multiple text sentences. The target symbols may include identifiers such as “.” and “!” that indicate the end of a sentence.

[0192] Exemplarily, the text sentence can be segmented according to a preset dictionary to obtain multiple segmentation paths and path segmentations for each segmentation path; the path score of each segmentation path is calculated according to the lexical weight of the path segmentation in the preset dictionary; the segmentation path with the highest path score is determined as the target path, and the path segmentation corresponding to the target path is determined as the sentence segmentation.

[0193] The preset dictionary stores a plurality of custom words and a weight of each custom word, and the weight is determined according to the frequency of each word in a plurality of texts. Through the above implementation, the path score can be accurately determined, thereby improving the segmentation accuracy of the text sentence.

[0194] In an optional embodiment, the information reasoning module 204 performs knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs to determine whether there are drugs that pose a risk to the patient in the prescribed drugs, including:

[0195] Determine, from the drug database, drug information corresponding to the prescription drug and a contraindication label corresponding to the drug information, wherein the drug information includes a contraindication detection result corresponding to the contraindication label;

[0196] Based on the use taboo label, information extraction is performed on the patient information to extract feature information corresponding to the use taboo label;

[0197] Knowledge reasoning is performed based on the contraindication detection result and the characteristic information to obtain target information corresponding to the patient.

[0198] The drug information refers to the information in the drug database corresponding to the prescription drug.

[0199] The characteristic information refers to the patient information corresponding to the taboo label. For example, the characteristic information corresponding to the age taboo label is the patient's age, the characteristic information corresponding to the population taboo label is the population to which the patient belongs, and the characteristic information corresponding to the disease taboo label is the disease suffered by the patient.

[0200] Exemplarily, performing knowledge reasoning based on the contraindication detection result corresponding to the use of the contraindication label and the characteristic information to determine whether there are any drugs that are risky to the patient in the prescription drugs may include: calculating the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information, and determining whether there are any drugs that are risky to the patient in the prescription drugs based on the matching degree. If the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information is greater than or equal to a preset matching value, it is determined that there are drugs that are risky to the patient in the prescription drugs; if the matching degree between the contraindication detection result corresponding to the use of the contraindication label and the characteristic information is less than the preset matching value, it is determined that there are no drugs that are risky to the patient in the prescription drugs. If the matching degree between a characteristic information and a contraindication detection result is greater than or equal to a preset matching value, the characteristic information is determined as the target information corresponding to the patient.

[0201] For example, there is a drug A in the prescription that is risky to the patient, and the contraindication label of drug A is contraindication for use by age, and the contraindication detection result corresponding to the contraindication label is contraindicated for the elderly. The patient's characteristic information is age: 65, which is an elderly person. The matching degree between the patient's characteristic information and the contraindication detection result corresponding to the contraindication label is 100%, and the contraindication detection result corresponding to the contraindication label is determined as the target information corresponding to the patient, that is, the target information corresponding to the patient is determined as age contraindication: contraindicated for the elderly.

[0202] By extracting the characteristic information through the contraindication label corresponding to the drug information, it is not necessary to analyze all patient information, so the reasoning efficiency of the characteristic information can be improved, thereby improving the efficiency of generating the target information. In addition, by performing knowledge reasoning on the characteristic information, the accuracy of the reasoning information in representing the user patient on the contraindication label can be improved, so that the target information can be accurately generated.

[0203] In an optional implementation, the information reasoning module 204 extracts information from the patient information based on the taboo label, and extracting feature information corresponding to the taboo label includes:

[0204] Determine the contraindication type of the contraindication label corresponding to the drug information;

[0205] Based on the taboo type, determining an extraction keyword corresponding to the taboo type in a preset word library;

[0206] The patient information is searched based on the extracted keywords to determine and extract feature information corresponding to the taboo label.

[0207] The taboo type is used to describe the characteristics of the taboo population, such as age, age group and disease. For example, the taboo type corresponding to the taboo label of age can be age, the taboo type corresponding to the taboo label of population can be age stage, and the taboo type corresponding to the taboo label of disease can be disease.

[0208] A word library is pre-set, and the word library stores mapping relationships between multiple taboo types and keywords corresponding to the multiple taboo types. By querying the preset word library, the keywords corresponding to the taboo types can be determined, and the keywords can be used to extract feature information corresponding to the use of the taboo label in the patient information. Among them, one taboo type can correspond to one or more keywords.

[0209] The risk prediction module 205 is used to input the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0210] The risk prediction model is used to predict the risk impact of the prescription medication in combination with the target information. The target information is input into the risk prediction model, and the medication risk value of the prescription medication can be output.

[0211] In an optional implementation, before the risk prediction module 205 inputs the target information into the trained risk prediction model, the risk prediction module 205 may also be used to:

[0212] Build a prediction learner based on multiple preset convolutional layers and preset fully connected layers;

[0213] Obtain drug contraindication data corresponding to a plurality of drugs and contraindication marking scores of the drug contraindication data;

[0214] Adjusting the prediction learner according to the drug contraindication data and the contraindication annotation score until the first loss function of the prediction learner no longer decreases, thereby obtaining a prediction initial model;

[0215] Acquire all model convolution layers from the prediction initial model, and perform quantization processing on the importance of all model convolution layers based on a grey relational analysis algorithm to obtain a quantized importance value of each model convolution layer;

[0216] Pruning the initial prediction model according to the importance quantization value to obtain a pruned model;

[0217] The trimming model is adjusted according to the drug contraindication data and the contraindication marking score until the second loss function of the trimming model no longer decreases, thereby obtaining the risk prediction model.

[0218] The drug contraindication data may include drug contraindication information, which is used to explain prohibited user characteristics. For example, the drug contraindication data corresponding to drug A is used with caution for pregnant women, prohibited for people with high blood pressure, and prohibited for the elderly. The contraindication mark score of the drug contraindication data is used to indicate the risk level of the drug risk. The larger the mark score, the greater the risk of the drug risk; the smaller the mark score, the smaller the risk of the drug risk.

[0219] Exemplarily, the risk prediction model may include an input layer, a hidden layer, and an output layer. The input layer is used to input target information; the hidden layer is used to predict medication risk based on the input target information; and the output layer is used to output a predicted medication risk value.

[0220] Among them, the convolution kernel sizes in the multiple preset convolution layers are all preset.

[0221] In some embodiments, the target drug corresponding to the target information can be determined, and the drug level corresponding to the target drug can be determined, and the risk value of the prescription drug can be obtained according to the drug level and the medication risk value output by the risk prediction model. For example, the risk weight corresponding to the target drug can be determined according to the drug level, and the risk weight can be multiplied by the medication risk value to obtain the risk value of the prescription drug.

[0222] For example, a corresponding reminder may be generated according to the size of the medication risk value. For example, as the risk value increases, the intensity of the reminder also increases.

[0223] The risk prediction device based on artificial intelligence described in the present application determines the diagnostic symptoms corresponding to the patient and determines the symptom decision tree corresponding to the diagnostic symptoms; obtains the symptom information corresponding to the patient and inputs the symptom information into the symptom decision tree to obtain the probability of illness. By calculating the probability of illness corresponding to the patient, it is tested whether the physician has misdiagnosed the patient, thereby improving the accuracy of drug risk detection. At the same time, the accuracy of determining the probability of illness based on the disease decision tree can be improved; if the probability of illness is greater than or equal to a preset probability threshold, the prescription medication corresponding to the patient is determined; based on the patient information of the patient and the prescription medication, knowledge reasoning is performed in a pre-constructed drug database to determine whether there are drugs that are risky to the patient in the prescription medication. If there are drugs that are risky to the patient in the prescription medication, the target information corresponding to the patient is determined according to the risky medication. Knowledge reasoning based on the drug database can effectively determine the risk information corresponding to the patient, that is, the target information; the target information is input into the trained risk prediction model to obtain the medication risk value of the prescription medication, and risk prediction is performed from two different dimensions of patient misdiagnosis and prescription medication, thereby improving the accuracy of risk prediction.

[0224] Embodiment 3

[0225] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned risk prediction method embodiment based on artificial intelligence are implemented, such as Figure 1 S11-S15 shown:

[0226] S11, determining the diagnosis disease corresponding to the patient, and searching the disease decision tree corresponding to the diagnosis disease in a pre-built decision tree library;

[0227] S12, obtaining the symptom characteristics corresponding to the patient, and inputting the symptom characteristics into the symptom decision tree to obtain the probability of illness;

[0228] S13, if the probability of illness is greater than or equal to a preset probability threshold, determining a prescription medication corresponding to the patient;

[0229] S14, based on the patient information of the patient and the prescribed medication, performing knowledge reasoning in a pre-built drug database to determine whether there are any medications that are risky to the patient in the prescribed medications, and if there are any medications that are risky to the patient in the prescribed medications, determining target information corresponding to the patient according to the risky medications;

[0230] S15, inputting the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0231] Alternatively, when the computer program is executed by a processor, the functions of each module / unit in the above-mentioned device embodiment are realized, for example Figure 2 Modules 201-205:

[0232] The disease query module 201 is used to determine the diagnosis disease corresponding to the patient, and query the disease decision tree corresponding to the diagnosis disease in the pre-built decision tree library;

[0233] The probability calculation module 202 is used to obtain the disease characteristics corresponding to the patient, and input the disease characteristics into the disease decision tree to obtain the disease probability;

[0234] Prescription determination module 203, used to determine the prescription medication corresponding to the patient if the disease probability is greater than or equal to a preset probability threshold;

[0235] The information reasoning module 204 is used to perform knowledge reasoning in a pre-built drug database based on the patient information and the prescribed drugs of the patient to determine whether there are any drugs that are risky to the patient in the prescribed drugs, and if there are any drugs that are risky to the patient in the prescribed drugs, determine the target information corresponding to the patient according to the risky drugs;

[0236] The risk prediction module 205 is used to input the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

[0237] Embodiment 4

[0238] See also Figure 3 FIG. 2 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application. In a preferred embodiment of the present application, the electronic device 3 includes a memory 31 , at least one processor 32 , a transceiver 33 and at least one communication bus 34 .

[0239] Those skilled in the art should understand that Figure 3The structure of the electronic device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0240] In some embodiments, the electronic device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 3 may also include client devices, which include but are not limited to any electronic product that can interact with a client through a keyboard, mouse, remote control, touchpad, or voice-controlled device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0241] It should be noted that the electronic device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0242] In some embodiments, a computer program is stored in the memory 31, and when the computer program is executed by the at least one processor 32, all or part of the steps in the risk prediction method based on artificial intelligence are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0243] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0244] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0245] In some embodiments, the at least one processor 32 is the control core (ControlUnit) of the electronic device 3, and uses various interfaces and lines to connect the various components of the entire electronic device 3, and executes various functions and processes data of the electronic device 3 by running or executing the program or module stored in the memory 31, and calling the data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the risk prediction method based on artificial intelligence described in the embodiment of the present application; or implements all or part of the functions of the risk prediction device based on artificial intelligence. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and various control chips.

[0246] In some embodiments, the at least one communication bus 34 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0247] Although not shown, the electronic device 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0248] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.

[0249] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0250] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0251] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0252] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0253] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A risk prediction method based on artificial intelligence, characterized in that: The method comprises: Determine the diagnosis disease corresponding to the patient, obtain multiple patient cases corresponding to the disease, and determine multiple disease characteristics based on the multiple patient cases; determine multiple first disease phrases based on the multiple disease characteristics, each of the first disease phrases has and only has one disease characteristic; arbitrarily select two disease characteristics from the multiple disease characteristics to form multiple second disease phrases, each of the second disease phrases includes two disease characteristics; calculate the Gini index of each of the first disease phrases and each of the second disease phrases respectively, and determine a target phrase in the first disease phrases and the second disease phrases based on the Gini index; construct a disease decision tree corresponding to the disease based on the target phrase, including: determine the disease as the root node of the disease decision tree, take the disease characteristic corresponding to the target phrase as the first parent node, and perform binary bifurcation on the root node; determine multiple disease characteristics corresponding to the target phrase among the multiple disease characteristics corresponding to the multiple patient cases; determine multiple disease phrases based on the multiple disease characteristics corresponding to the target phrase, and calculate the Gini index of each of the disease phrases; perform binary bifurcation on the first parent node based on the Gini index to obtain a constructed disease decision tree; In a pre-built decision tree library, query the disease decision tree corresponding to the diagnosed disease; Obtaining the disease characteristics corresponding to the patient, and inputting the disease characteristics into the disease decision tree to obtain the disease probability; If the probability of illness is greater than or equal to a preset probability threshold, determining the corresponding prescription medication for the patient; Based on the patient information of the patient and the prescribed medication, knowledge reasoning is performed in a pre-built drug database to determine whether there are any medications that are risky to the patient in the prescribed medications, and if there are any medications that are risky to the patient in the prescribed medications, target information corresponding to the patient is determined based on the risky medications; The target information is input into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

2. The risk prediction method based on artificial intelligence according to claim 1, characterized in that: The performing of knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs to determine whether there are drugs in the prescribed drugs that pose a risk to the patient includes: Determine, from the drug database, drug information corresponding to the prescription drug and a contraindication label corresponding to the drug information, wherein the drug information includes a contraindication detection result corresponding to the contraindication label; Extracting information from the patient information based on the taboo label, and extracting feature information corresponding to the taboo label; Knowledge reasoning is performed based on the contraindication detection result and the characteristic information to determine whether there are any drugs in the prescription that pose a risk to the patient.

3. The risk prediction method based on artificial intelligence as claimed in claim 2, characterized in that: The extracting the patient information based on the taboo label, extracting the feature information corresponding to the taboo label includes: Determine the contraindication type of the contraindication label corresponding to the drug information; Based on the taboo type, determining an extraction keyword corresponding to the taboo type in a preset word library; The patient information is searched based on the extracted keywords to determine and extract feature information corresponding to the taboo label.

4. The risk prediction method based on artificial intelligence according to claim 1, characterized in that: Before performing knowledge reasoning in a pre-built drug database to determine whether any of the prescribed drugs poses a risk to the patient, the method further comprises: Get the description text corresponding to the drug; Segmenting the description text to obtain a plurality of text sentences, and segmenting each text sentence to obtain sentence segmentation of each text sentence; Based on the Levenshtein distance, the similarity between each sentence segmentation and the preset key words is calculated; Determine the sentence segmentation whose similarity is greater than or equal to the preset similarity threshold as the target segmentation, and determine the text sentence where the target segmentation is located as the target sentence; Generating a representation vector of the target sentence according to sentence segmentation in the target sentence; Inputting the representation vector into a pre-trained contraindication detection model to obtain contraindication detection results of the drug on multiple contraindication labels; The drug, the multiple contraindication labels and the contraindication detection results corresponding to the multiple contraindication labels are used as drug information corresponding to the drug to construct the drug database.

5. The risk prediction method based on artificial intelligence according to any one of claims 1 to 4, characterized in that: Before inputting the target information into the trained risk prediction model, the method further includes: Constructing a prediction learner based on multiple preset convolutional layers and preset fully connected layers; obtaining drug contraindication data corresponding to multiple drugs and contraindication labeling scores of the drug contraindication data; Adjusting the prediction learner according to the drug contraindication data and the contraindication annotation score until the first loss function of the prediction learner no longer decreases, thereby obtaining a prediction initial model; Acquire all model convolution layers from the prediction initial model, and perform quantization processing on the importance of all model convolution layers based on a grey relational analysis algorithm to obtain a quantized importance value of each model convolution layer; Pruning the initial prediction model according to the importance quantization value to obtain a pruned model; The trimming model is adjusted according to the drug contraindication data and the contraindication marking score until the second loss function of the trimming model no longer decreases, thereby obtaining the risk prediction model.

6. A risk prediction device based on artificial intelligence, characterized in that: The device comprises: A disease query module is used to determine the diagnosis disease corresponding to the patient, and query the disease decision tree corresponding to the diagnosis disease in the pre-built decision tree library; The symptom query module is also used for: obtaining multiple patient cases corresponding to the symptom in a pre-constructed decision tree library before searching the symptom decision tree corresponding to the diagnosed symptom, and determining multiple symptom features based on the multiple patient cases; determining multiple first symptom phrases based on the multiple symptom features, each of which has and only has one symptom feature; selecting two symptom features at random from the multiple symptom features to form multiple second symptom phrases, each of which includes two symptom features; calculating the Gini index of each of the first symptom phrases and each of the second symptom phrases respectively, and determining a target phrase in the first symptom phrases and the second symptom phrases based on the Gini index; and constructing a symptom decision tree corresponding to the symptom based on the target phrase; The symptom query module constructs a symptom decision tree corresponding to the symptom based on the target phrase, including: determining the symptom as the root node of the symptom decision tree, taking the symptom feature corresponding to the target phrase as the first parent node, and performing binary bifurcation on the root node; determining multiple symptom features corresponding to the target phrase among multiple symptom features corresponding to the multiple patient cases; determining multiple symptom phrases based on the multiple symptom features corresponding to the target phrase, and calculating the Gini index of each of the symptom phrases; performing binary bifurcation on the first parent node based on the Gini index to obtain a constructed symptom decision tree; A probability calculation module is used to obtain the disease characteristics corresponding to the patient, and input the disease characteristics into the disease decision tree to obtain the disease probability; A prescription determination module, used to determine the prescription medication corresponding to the patient if the probability of illness is greater than or equal to a preset probability threshold; An information reasoning module is used to perform knowledge reasoning in a pre-built drug database based on the patient information of the patient and the prescribed drugs, to determine whether there are any drugs that are risky to the patient in the prescribed drugs, and if there are any drugs that are risky to the patient in the prescribed drugs, to determine the target information corresponding to the patient according to the risky drugs; The risk prediction module is used to input the target information into the trained risk prediction model to obtain the medication risk value of the prescribed medication.

7. An electronic device, characterized in that: The electronic device includes a processor and a memory, and the processor is used to implement the artificial intelligence-based risk prediction method as described in any one of claims 1 to 5 when executing a computer program stored in the memory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the risk prediction method based on artificial intelligence as described in any one of claims 1 to 5.