A Chinese medicine decision-making assistance system and method
Through the traditional Chinese medicine auxiliary decision-making system combined with dynamic weighting method and SeqGAN algorithm, the problem of symptom conversion and diagnosis and treatment chain solidification in the traditional Chinese medicine diagnosis and treatment system is solved, the efficiency and accuracy of traditional Chinese medicine decision-making are improved, intelligent auxiliary decision-making is realized, and decision-making difficulty and labor are reduced. strength.
Patent Information
- Application Number
- CN202011320701.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-11-23
AI Technical Summary
The existing traditional Chinese medicine artificial intelligence diagnosis and treatment system has an artificial solidified chain when changing symptoms into evidence and establishing a diagnosis and treatment chain. It cannot fully utilize the advantages of big data and cannot break through the limits of the diagnosis and treatment level of a single doctor, resulting in low efficiency and accuracy of Chinese medicine auxiliary decision-making. .
Dynamic weighting method is used to evaluate symptoms, combine the SeqGAN algorithm to train symptoms to the drug model, and structure the text of TCM medical case records through the Bert_BiLSTM_CRF model, and use the normalization of term processing to achieve intelligent decision-making on symptoms and drugs.
It improves the efficiency and accuracy of traditional Chinese medicine decision-making, reduces the difficulty and labor intensity of decision-making, helps traditional Chinese medicine doctors to achieve intelligent auxiliary decision-making, and enhances the clinical level of low-age doctors and the medication ideas of senior doctors.
Smart Images

Figure CN112420191B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent medical technology, and in particular to a traditional Chinese medicine decision-making assistance system and method. Background Art
[0002] With the continuous development of big data technology and the great success of artificial intelligence such as ALphaGo, it is combined with various industries to improve work efficiency. The medical field has also incorporated a lot of high-tech such as artificial intelligence, and the intelligentization of medical services has become one of the trends in the future development of medical care.
[0003] Among them, artificial intelligence diagnosis and treatment systems assist clinical decision-making to improve the average medical level and even break through the existing medical level has become a research hotspot. In the field of traditional Chinese medicine, whether it is the traditional master-apprentice relationship or young doctors carrying out clinical practice after completing degree education, the clinical cases that a single Chinese medicine doctor can access are limited and low-level.
[0004] The use of a TCM artificial intelligence diagnosis and treatment system based on big data to assist clinical decision-making can greatly improve the clinical level of junior TCM physicians and inspire senior physicians' ideas for clinical medication. However, the existing research on TCM artificial intelligence diagnosis and treatment systems is still immature and has major limitations: for example, symptoms are artificially converted into syndrome elements and an artificially solidified chain of "symptoms"-"syndrome elements"-"syndrome" is established, which makes it impossible to bring into play the advantages of big data and break through the limitations of human diagnosis and treatment thinking; for example, the establishment of an intelligent diagnosis and treatment system for a famous old TCM physician can only achieve clinical efficacy close to the level of the physician, but cannot break through his clinical level. Summary of the invention
[0005] The purpose of the present invention is to provide a TCM decision-making support system and method to improve TCM decision-making efficiency and accuracy and reduce labor intensity.
[0006] In order to solve the above technical problems, an embodiment of the present invention provides a TCM decision-making support system, comprising:
[0007] The patient information acquisition module is used to receive the patient information of the patient in the TCM medical record, and the patient information includes the patient's basic information, current medical history, symptoms and TCM entity data;
[0008] A symptom scoring module, connected to the patient information acquisition module, is used to score the symptoms according to preset rules using a dynamic weighting method, obtain and output the weight of each indicator, and perform weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms;
[0009] The auxiliary decision-making module is connected to the symptom scoring module, and trains a symptom-to-drug model based on the SeqGAN algorithm. According to the weight of each symptom corresponding to the symptom body and the preset rules, the optimal Chinese medicine group for each symptom corresponding to the symptom body is output as the auxiliary decision-making result.
[0010] Among them, it also includes an incremental data updating module connected to the auxiliary decision module, which is used by doctors to make corrections and prescribe according to the auxiliary decision results as new training data, and output the new data after adding corresponding weights according to its own level.
[0011] Among them, it also includes a weight function selection module connected to the symptom scoring module, which is used to select at least one of the Cauchy distribution function, the piecewise variable power function, and the large normal distribution function as the weight function for the operation of the symptom scoring module according to the weight function selection instruction.
[0012] Among them, it also includes a TCM medical record text post-structuring module connected to the symptom scoring module, which uses the Bert_BiLSTM_CRF model to perform text recognition on non-text TCM medical records and converts the patient's basic information, current medical history, symptoms and Chinese medicine entity data in the TCM medical records into a computer-processable text.
[0013] Among them, the TCM medical record text post-structuring module includes at least one of an OCR engine Tesseract unit and a character recognition API unit.
[0014] Among them, it also includes a term normalization module connected to the post-structuring module of the TCM medical record text. The term normalization module is based on the TCMLS TCM standard terminology set, and uses a similarity algorithm combined with manual proofreading to normalize the current medical history, TCM symptoms and names of traditional Chinese medicine collected from the TCM medical record. The similarity algorithm is used to calculate the semantic similarity between the candidate terms to be normalized and the standard terms, and the terms with similarity exceeding the threshold are selected for manual proofreading to obtain an accurate synonym set.
[0015] In addition, the embodiment of the present invention also provides a TCM decision-making assistance method, including:
[0016] S1, receiving patient information of patients in TCM medical records, wherein the patient information includes basic information of the patient, current medical history, symptoms and TCM entity data;
[0017] S2, using a dynamic weighting method to score the symptoms according to preset rules, obtaining and outputting the weight of each indicator, and performing weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms;
[0018] S3, based on the SeqGAN algorithm, trains a symptom-to-drug model, and according to the weight of each symptom corresponding to the symptom body and the preset rules, outputs the optimal Chinese medicine group for each symptom corresponding to the symptom body as an auxiliary decision result.
[0019] Wherein, after S3, it also includes:
[0020] S4, the doctor makes corrections and prescribes according to the auxiliary decision results as new training data, and outputs the new data after adding corresponding weights according to its own level.
[0021] Wherein, the S1 further includes:
[0022] The Bert_BiLSTM_CRF model is used to perform text recognition on the TCM medical records in non-text format and to output the patient information in the TCM medical records in a computer-processable text format.
[0023] Wherein, the S2 further includes:
[0024] It is used to select at least one of the Cauchy distribution function, the piecewise variable power function and the partially normal distribution function as the weight function for running the dynamic weighting method according to the weight function selection instruction.
[0025] Compared with the prior art, the TCM decision-making support system and method provided by the embodiments of the present invention have the following advantages:
[0026] The TCM decision-making support system and method provided in the embodiments of the present invention obtains the weights of the corresponding symptoms by dynamically evaluating the patient's symptoms, and uses the SeqGAN algorithm to calculate and output the optimal TCM group as the decision output, thereby improving the efficiency and accuracy of TCM decision-making. Moreover, since all symptoms have corresponding ones, the difficulty of decision-making is greatly reduced, which helps to realize intelligent medical care. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 A schematic diagram of the connection structure of an embodiment of the TCM decision-making support system provided by the present invention;
[0029] Figure 2 A schematic diagram of the connection structure of another embodiment of the TCM decision-making support system provided by the present invention;
[0030] Figure 3 A schematic diagram of the framework of the SeqGAN model used in one embodiment of the TCM decision support system provided by the present invention;
[0031] Figure 4 A schematic diagram of the steps of an embodiment of the TCM decision-making assistance method provided by the present invention;
[0032] Figure 5 A schematic flow chart of the steps of another embodiment of the TCM decision-making assistance method provided by the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0034] Please refer to Figure 1 to Figure 5 , Figure 1 A schematic diagram of the connection structure of an embodiment of the TCM decision-making support system provided by the present invention; Figure 2 A schematic diagram of the connection structure of another embodiment of the TCM decision-making support system provided by the present invention; Figure 3 A schematic diagram of the framework of the SeqGAN model used in one embodiment of the TCM decision support system provided by the present invention; Figure 4 A schematic diagram of the steps of an embodiment of the TCM decision-making assistance method provided by the present invention; Figure 5 A schematic flow chart of the steps of another embodiment of the TCM decision-making assistance method provided by the present invention.
[0035] In a specific embodiment, the TCM decision-making support system includes:
[0036] The patient information acquisition module 10 is used to receive the patient information of the patient in the TCM medical record, wherein the patient information includes the patient's basic information, current medical history, symptoms and TCM entity data;
[0037] The symptom scoring module 20 is connected to the patient information acquisition module 10, and is used to score the symptoms according to preset rules using a dynamic weighting method, obtain and output the weight of each indicator, and perform weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms;
[0038] The auxiliary decision-making module 30 is connected to the symptom scoring module 20, and trains a symptom-to-drug model based on the SeqGAN algorithm. According to the weight of each symptom corresponding to the symptom body and the preset rules, the optimal Chinese medicine group for each symptom corresponding to the symptom body is output as an auxiliary decision-making result.
[0039] The patient's symptoms are evaluated by dynamic weighting method to obtain the weight of the corresponding symptoms, and the SeqGAN algorithm is used to calculate and output the optimal Chinese medicine group as the decision output, thereby improving the efficiency and accuracy of TCM decision-making. Moreover, since all symptoms have corresponding ones, the difficulty of decision-making is greatly reduced, which helps to realize intelligent medical care.
[0040] The above-mentioned TCM decision-making support model is applied to real electronic medical records, and information is read from the electronic medical records as model input. After the decision-making support model is calculated, the results of the recommended drugs are returned to the electronic medical records, so that simple, fast and accurate symptomatic medication can be achieved with lower requirements for doctors.
[0041] Since the TCM decision support system of the present invention is used for TCM decision-making, if it is directly used to prescribe medicine for patients, even a one in ten thousand error is unacceptable for the life and health of the patients. The decision support system is used to help doctors and cannot be equated with doctors.
[0042] Therefore, in order to solve this problem, in one embodiment of the present invention, the TCM decision support system also includes an incremental data update module 40 connected to the decision support module 30, which is used for doctors to make corrections and prescribe according to the decision support results as new training data, and output the new data after adding corresponding weights according to its own level.
[0043] Physicians can make corrections and prescribe based on the auxiliary decision results according to their own experience as new training data, and then increase the corresponding weight of the new data according to their own level before outputting it. In this way, comprehensive diagnosis and medication effects can be achieved according to physicians of different levels, which can reduce the work pressure of a single physician due to the small number of high-level physicians, and increase the learning opportunities for physicians of lower levels. Moreover, the reliability of the plans given by different physicians is significantly higher, which is beneficial to the health of patients.
[0044] Since the scoring mode is adopted in the present invention, a certain evaluation of the symptoms is required. The present invention adopts a dynamic weighting method and does not limit the weight function adopted. Since different weight functions may be required for different diseases, in one embodiment, the traditional Chinese medicine decision-making support system also includes a weight function selection module connected to the symptom scoring module 20, which is used to select at least one of the Cauchy distribution function, the piecewise variable power function, and the large normal distribution function as the weight function for the operation of the symptom scoring module 20 according to the weight function selection instruction.
[0045] By flexibly adopting different weight functions, weighted design for different diseases can be achieved. Two, three or even more weight functions can also be adopted, and different weight functions can also adopt different weights. The present invention does not limit the specific weight functions adopted and the weights of the weight functions.
[0046] In most cases, the patient's medical records are electronic medical records and can be directly read by computers. However, there are also many paper medical records that are not digitized and cannot be directly read by computers. In order to solve this technical problem, in one embodiment of the invention, the TCM decision-making support system also includes a TCM medical record text post-structuring module 50 connected to the symptom scoring module 20, which uses the Bert_BiLSTM_CRF model to perform text recognition on TCM medical records in non-text format and converts the patient's basic information, current medical history, symptoms and Chinese medicine entity data in the TCM medical records into a computer-processable text.
[0047] The present invention does not limit the recognition unit. Generally, the TCM medical record text post-structuring module 50 includes at least one of an OCR engine Tesseract unit and a character recognition API unit.
[0048] This module uses OCR technology to perform text recognition on non-text TCM medical records to form computer-processable text. It adopts a series of label annotation models including but not limited to Bert_BiLSTM_CRF entity annotation to identify the patient's basic information, current medical history, symptoms, Chinese medicine and other entity data in the TCM medical records. The patient's basic information includes name, gender, age, etc. The current medical history records the whole process of the patient's illness, namely the occurrence, development, evolution and diagnosis and treatment process. Symptoms include major symptoms and secondary symptoms. Chinese medicine includes the name of the Chinese medicine, the dosage of the Chinese medicine and the unit of the Chinese medicine.
[0049] The text recognition of TCM medical records is performed by combining multiple methods, which generally include Google's open source OCR engine Tesseract unit and Baidu's character recognition API unit.
[0050] Construct the Bert_BiLSTM_CRF model to identify the basic information of patients, current medical history, symptoms and Chinese medicine in TCM medical records. The basic information of patients includes name, gender, age, current medical history, main symptoms and secondary symptoms, and Chinese medicine includes the name of Chinese medicine, dosage and unit of Chinese medicine. Bert_BiLSTM_CRF can be divided into three parts, Bert as the pre-trained input layer, BiLSTM as the training middle layer, and CRF as the top output layer. The details are as follows:
[0051] Bert pre-training model, Google's Bert is trained through deep bidirectional Transformer encoder representation. This method adds contextual information from the left and right to each layer. The trained Bert model can be migrated to other tasks with a little addition. At present, it has achieved the best results in 11 tasks and competitions in the field of natural language processing. The Bert_BiLSTM_CRF model introduced here is based on bert-base-chinese and adds BiLSTM_CRF, that is, input text, preprocess the text format, and segment the specimen according to the pathology report type. The pathology is segmented by word, the word is mapped to the corresponding ID number, converted into a vector form, the position of the word in the text is recorded, and the position is converted into a vector form. The vector and position vector at the text word level are input into the deep bidirectional Transformer model, and the output node vector of the model is used as the input vector of BiLSTM_CRF. Finally, the BiLSTM_CRF model predicts the category of each word, and the classification is combined according to the combination of words, which is the result of the indicator value.
[0052] Let's briefly introduce the Bert model. The full name of Bert is Bidirectional Encoder Representations from Transformers. When the bidirectional representation model processes a word, it can use the information of both the previous word and the following word at the same time. The source of this bidirectionality is that Bert is different from the traditional language model. It does not predict the most likely current word given all the previous words, but randomly masks some words and uses all the unmasked words for prediction. BERT can be regarded as a new model that combines the advantages of OpenAI's GPT and ELMo. ELMo uses two independently trained LSTMs to obtain bidirectional information, while GPT uses a new Transformer and a classic language model to obtain only unidirectional information. The main goal of Bert is to make some improvements to the pre-training task based on GPT to simultaneously utilize the advantages of the Transformer deep model and bidirectional information.
[0053] Input representation: The input of the model includes two natural sentences, A and B. We first need to convert each word and special symbol into a word embedding vector. A special symbol [SEP] is added between the two sentences to separate the two sentences, and [SEP] is also added at the end of the sentence. And the special symbol [CLS] at the beginning of sentence A / B can be regarded as a collection of representations of the entire input sequence. The final position encoding is determined by the Transformer architecture itself, because the full attention-based method cannot encode the positional relationship between words like CNN or RNN, but it is precisely because of this property that the relationship between two words can be modeled regardless of the distance. Therefore, in order to make the Transformer perceive the positional relationship between words, we need to use position encoding to add position information to each word.
[0054] The core of Bert is the pre-training process. In simple terms, the model extracts two sentences from the data set, where sentence B has a 50% probability of being the next sentence of sentence A, and then converts these two sentences into the input representations shown above. Now we randomly mask 15% of the words in the input sequence and require Transformer to predict these masked words and the probability that sentence B is the next sentence of sentence A. In the field of entity recognition, retaining the tokens converted by the Bert model and using them as the input of the sequence recognition model can complete transfer learning based on the Bert model and achieve the purpose of entity recognition.
[0055] The Chinese pre-trained model of Bert selected here is bert_base_chinese. The model has 12 layers, 768 hidden state nodes, and 12 self-Attention "heads". The specific attention mechanism (Attention) is simply the process of mapping a query to the correct input given a query and a key-value table (key-value pairs). The query, key, value and final output here are all vectors. The output is often in the form of a weighted sum, and the weight is determined by the query, key and value. In self-Attention, the query, key and value are all equal to the input sequence x, where the number of heads h means that the d-dimensional key, value and query are mapped to dk dimensions, dk dimensions and dv dimensions respectively using h linear transformations, and then substituted into the attention mechanism to generate a total of h×dv dimensional outputs, which are then pieced together and a linear transformation is used to get the final output. The specific formula is as follows:
[0056] head = Attention(QW,KW,VW)
[0057] MultiHead(Q,K,V) = Concat(head1,head2,...,head n )W
[0058] where W represents the weight matrix and n represents the number of Heads.
[0059] BILSTM+CRF model: It is the current mainstream entity recognition model. BiLSTM can obtain the context information in the left and right word orders of the sequence, and give the probability of the predicted label for the input words. Adding a CRF layer on it can form a relatively accurate prediction path that conforms to linguistic descriptions according to the constraints for the predicted label probabilities in the entire text sequence. And this path is the prediction result of our entity recognition model, and the required target entity categories are extracted from this path.
[0060] Briefly introduce the BiLSTM+CRF model. This model is divided into two major parts: The first part is the bidirectional long short-term memory model (BiLSTM), and the second part is the CRF layer. BiLSTM considers the context information of each unit X in the input sequence, and adding CRF can consider the dependency relationship information between tags (tags).
[0061] The first part: BiLSTM can refer to LSTM. The input sequence passes through the forget gate, input gate, and output gate to output the hidden state vector; bidirectional LSTM not only considers the forward influence of the sequence but also the backward influence of the sequence. The forward LSTM and the backward LSTM are combined into BiLSTM. For example, when we encode the sentence "I love China", the forward LSTM L successively inputs "I", "love", "China", "country" to get four vectors {h L0 ,h L1 ,h L2 ,h L3}, and the backward LSTM R successively inputs "country", "China", "love", "I" to get four vectors {h R0 ,h R1 ,h R2 ,h R3}, and finally the forward and backward hidden vectors are concatenated to get {[h L0 ,h R3 ,[h L1 ,h R2 ,[h L2 ,h R1 ,[h L3 ,h R0}, that is, {h0,h1,h2,h3}, connect and transform the label sequence, and train the model.
[0062] Brief introduction to LSTM: The key to LSTM is the cell state, which is similar to a conveyor belt, running directly on the entire chain, with only a small amount of linear interaction, and it is easy for information to flow unchanged on it. LSTM has the ability to remove or add information to the cell state through the structure of "gates". Gates are a way to selectively pass information. They contain a sigmoid neural network layer and a pointwise multiplication operation. The sigmoid layer outputs a value between 0 and 1, describing how much of each part can pass through. 0 means "no amount is allowed to pass", and 1 means "any amount is allowed to pass". LSTM has three gates to protect and control the cell state, namely the forget gate, input gate, and output gate. The first step in LSTM is to decide what information we will discard from the cell state. This decision is made through a layer called the forget gate; the next step is to determine what new information is stored in the cell state. There are two parts here: First, the sigmoid layer called the "input gate layer" determines what value we are going to update. Then, a tanh layer creates a new candidate value vector; the next step is to use these two pieces of information to generate updates to the state; finally, we need to determine what value to output, and this output will be based on our cell state. First, run a sigmoid layer to determine which part of the cell state will be output, and then process the cell state through tanh (to get a value between -1 and 1) and multiply it with the output of the sigmoid gate. In the end, we will only output the part we are sure to output. The specific formula is as follows:
[0063]
[0064] CRF model: Here, CRF uses the BIO tagging method, where one word corresponds to one label, where B indicates the beginning of the word, I indicates the word is in the middle of the word, and O indicates other words with non-target index values. CRF has two parts in the calculation: the emission probability matrix and the transition probability matrix. In BILSTM+CRF, the output of the BiLSTM layer is the score of all labels for each word, which is equivalent to the emission probability value of each word mapped to the label. The transition probability matrix A, A in CRF i,j Representative tag i Transfer to tag j The transition probability. For the output tag sequence y corresponding to the input sequence X, the score is defined as score, where each score corresponds to a complete path. The Viterbi algorithm is used for prediction to solve the optimal path, which is the final prediction result of the output sequence.
[0065] The symptom scoring module 20 of the present invention uses a dynamic weighting method to score symptom entities, and the specific process is not limited.
[0066] The dynamic weighting method is a comprehensive evaluation method for multiple factors and multiple attributes. This method obtains the weight of each index through weight functions, such as the Cauchy distribution function, the piecewise variable power function, the partial large normal distribution function, etc. Finally, the weights of each symptom are calculated by weighted summation of each index.
[0067] Symptom scoring dynamic weighting method: Use the dynamic weighting method to score each input symptom, with values of 1, 2, 3, 4, 5. The weighted and normalized symptoms are: the main symptom of insomnia at night is 5, the secondary symptom of poor appetite and fatigue is 4, the secondary symptom of dryness and constipation in the abdomen is 4, and the secondary symptom of weak pulse is 3.
[0068] In one embodiment, the specific implementation of dynamic weighting is as follows:
[0069] A group of symptoms is denoted as S1, S2, S3... Sn, and each symptom corresponds to m attributes denoted as x1, x2, x3... xn. Attributes such as: sleep onset time, sleep onset degree, dream frequency, forgetfulness frequency, food intake, etc. Each attribute contains K levels, and each level contains a range [a, b], and a < b. For example, the sleep onset time is divided into three levels. The first level corresponds to 0 to 2 hours, the second level corresponds to 3 to 5 hours, and the third level corresponds to 6 to 7 hours. If the influence of a certain index Xi on the comprehensive evaluation effect approximately increases in a positive power order as the category Pk (k = 1, 2,..K) increases, and at the same time increases in a corresponding power function as the index value increases within a certain category, then a piecewise density function can be set as the variable weight function for the index Xi, that is, when x ∈ k (i) ,b k (i) , w i (x) = x 1 / k (k = 1, 2,...K), where 1 ≤ i ≤ m, to obtain the weight of each index. Different weight functions are used for different indexes, such as the Cauchy distribution function, the S-type distribution function, the partial large normal distribution function, etc., to obtain the weight of each index. Finally, the weights of each symptom are calculated by weighted summation of each index.
[0070] Furthermore, since medicine is a very professional subject, and traditional Chinese medicine is even more professional, the terminology it uses is bound to be more professional. In actual use, it is very likely that unprofessional vocabulary will appear. However, since they are not professional vocabulary, they cannot be identified and used, which limits the application of the traditional Chinese medicine decision-making support system. In order to solve this technical problem, in one embodiment, the traditional Chinese medicine decision-making support system also includes a term normalization module 60 connected to the traditional Chinese medicine medical record text post-structuring module 50. The term normalization module 60 is based on the TCMLS traditional Chinese medicine standard terminology set, and uses a similarity algorithm combined with manual review to normalize the current medical history, traditional Chinese medicine symptoms and names of traditional Chinese medicine collected from the traditional Chinese medicine medical records. The similarity algorithm is used to calculate the semantic similarity between the candidate terms to be normalized and the standard terms, and the terms with similarities exceeding the threshold are selected for manual review to obtain an accurate synonym set.
[0071] The term normalization module 60 is used to convert a variety of commonly used terms into terms that can be recognized by traditional Chinese medicine, thereby increasing the scope of application. The present invention includes but is not limited to the above-mentioned normalization processing method.
[0072] In the present invention, the auxiliary decision-making of traditional Chinese medicine based on the SeqGAN algorithm is to recommend a group of optimal Chinese medicines for a group of symptoms, so it is necessary to build a SeqGAN model. Among them, the SeqGAN model mainly includes a generation network, a discriminant network and an excitation network, which are as follows:
[0073] The full name of SeqGAN is Sequence Generative Adversarial Nets. The purpose of this model is to train a generator network with a parameter of θ, Gθ, to generate a sequence of traditional Chinese medicine T = (y1, y2, ...y t ...y T ),y t ∈Y, where Y represents the Chinese medicine dictionary. Based on the idea of reinforcement learning, at time t, the state state is defined as the currently generated sequence (y1, y2...y t-1 ), action a is defined as the next selected drug yt. Using the real data of insomnia in traditional Chinese medicine and the training data generated by Gθ, a discriminator network (Discriminator) with a parameter of φ, Dφ, is trained to guide the improvement of Gθ.
[0074] Gθ is updated through policy gradient and reward obtained through Dφ. The calculation basis of reward is the maximum possible confusion model Dφ, that is, let Dφ think that G θThe data generated is real data. The memory unit stores real training data, and continuously updates the real data of our memory unit in the clinical application of the auxiliary decision system, thereby updating our discriminant network and generative network, and continuously optimizing and iterating the auxiliary decision model. The overall framework diagram is shown in Figure 3 .
[0075] Generator, generally a recurrent neural network structure is chosen, RNN, LSTM or GRU. For the input sequence, first get the embedding of the words in the sequence, then input it into each cell, and combine it with a fully connected hidden layer to get the probability of outputting each word, that is: p(y t |x1,...x t )=z(h t )=softmax(c+w i ),h t =g(h t-1 ,x t ). Using this probability, the Generator can sample a batch of generated sequences based on it. For example, it can generate a sequence of only two words. There are 3 word sequences in total. The output of the first cell is (0.5, 0.5, 0.0), and the output of the second cell is (0.1, 0.8, 0.1). Then the sequence generated by the Generator is 1->2 with a probability of 0.4 and 1->1 with a probability of 0.05.
[0076] Note that the sequence generated by the Generator here is obtained by probability sampling, rather than a fixed value obtained by performing argmax on each output, which is consistent with the idea of policy gradient.
[0077] A probability distribution can be obtained in each cell, based on which an action or a word is selected. To determine the value of the Chinese medicine based on this probability distribution, a reward is needed to influence the probability of this word being selected. In order to obtain the reward, our Discriminator and Monte Carlo tree search method are needed. The reward is based on the output of the Discriminator's maximum possible Chinese medicine sequence, so as to make the Discriminator think that the data generated by the Generator is realistic data as much as possible. Here we set the label of the real-world data to 1, and the label of the data generated by the Generator to 0.
[0078] If the current cell is the last cell, that is, a complete sequence has been obtained, in this case, the sequence is directly thrown to the Discriminator to obtain the probability of outputting 1, and finally the average of the probabilities of outputting 1 is taken to obtain the Reward value.
[0079] If the current cell is not the last cell, that is, the current Chinese medicine is not the last Chinese medicine, and a complete sequence has not been obtained, then the Monte Carlo tree search method is needed to estimate the reward.
[0080] Monte Carlo Tree Search (MCTS): When evaluating a sequence at any time, what is actually considered is the long-term reward it can bring, just like playing Go or chess, each move must be considered from a global perspective. MCTS is a very important component in the solution algorithms of Go and chess, so the author thought of applying it to the current problem.
[0081] As the name suggests, this algorithm belongs to a Monte Carlo method - according to Wikipedia, it is also called a statistical simulation method, which refers to a method of using random numbers (or more commonly pseudo-random numbers) to solve many computational problems. MCTS is such a heuristic search algorithm based on statistical simulation, which is often used in the decision-making process of games. MCTS can loop infinitely, and each loop consists of the following 4 steps:
[0082] Selection: Starting from the root node, continuously select child nodes to search downward until a leaf node is reached. The child node selection method generally uses the UCT (Upper Confidence Bound applied to trees) algorithm, which calculates the probability of being selected based on the "number of wins" and "number of games" of the node, maintaining a balance between Exploitation and Exploration, which is the key to ensuring the search develops toward the optimal state;
[0083] Expansion: Create multiple child nodes in a leaf node;
[0084] Simulation: Select a node from the created child nodes according to the roll-out policy for simulation, also known as playout or rollout.
[0085] The difference between it and Selection is that Selection refers to the selection of existing nodes in the search tree, starting from the root node, with historical statistical data as a reference, and using the UCT algorithm to select child nodes each time; Simulation is a simple simulation, starting from the leaf node, using a custom roll-out policy (which can be just a simple random probability) to select child nodes, and the nodes passed by the simulation are not added to the tree; Backpropagation: According to the results of Simulation, the statistical information of the nodes is updated upward along the path of the search tree, including "number of wins" and "number of games", which are used for Selection to make decisions.
[0086] Using MCTS, we use the previously generated sequences and start sampling from the next position of the current position to obtain a bunch of complete sequences. After obtaining the sampled sequences, we throw this bunch of sequences to the Discriminator and obtain the probability of a batch of sequences with output 1. The average value of the probability of these realistic Chinese medicine sequences is the Reward. After obtaining the Reward, we train the Generator through the Policy Gradient method. The basic idea is to increase the probability of selecting actions with large Rewards and reduce the probability of selecting actions with small Rewards. The formula for Reward is as follows:
[0087]
[0088] Discriminator uses real data as positive samples and data generated by Generator as negative samples to train a binary classification neural network. The classification model can use CNN, LSTM and other neural networks. In order to make the classification effect of the model better, a highway network is added on the basis of the classification model. As the depth of the network gradually deepens, deeper layers and smaller receptive fields can improve the accuracy of network classification, and network training becomes more and more difficult. Highway Networks is a network framework that solves the difficulties of deep network training.
[0089] Traditional neural networks use a nonlinear transformation on the input to get the output output, the formula is as follows: y = H (x, W H ),x represents input, and WH represents weight.
[0090] Highway network introduces transform gate and carry gate based on gate mechanism. The output is composed of transform input and carry input.
[0091] y=H(x,WH )·T(x,W T )+x·C(x,W C ), set C = 1-T,
[0092] The formula is transformed into y = H (x, W H )·T(x,W T )+x·(1-T(x,W T )).
[0093] Compared to traditional neural networks, which are difficult to train as the depth increases, highway networks are very easy to train. Using simple SGD, you can train very deep networks, and optimization is simpler and even converges faster.
[0094] In the adversarial process, the training process of the Generator and the Discriminator actually goes through a pre-training process before the adversarial process, which enables the model to converge faster.
[0095] For the Generator, the loss functions used in the pre-training and adversarial processes are different. In the pre-training process, the Generator uses the cross entropy loss function, while in the adversarial process, the loss function in PolicyGradient is used, that is, logarithmic loss * reward value.
[0096] For Discriminator, the loss function in both processes is the same, that is, the logarithmic loss function introduced earlier.
[0097] In the present invention, from making a decision to making the decision as an electronic medical record, in one embodiment, the electronic medical record is obtained as follows:
[0098] (1) Read the patient’s basic information, including gender, age, etc., from the electronic medical record;
[0099] (2) Free text was read from the fields of the chief complaint and the four diagnostic methods (inspection, auscultation, questioning, and palpation) in the electronic medical record, and symptoms (symptom names) were extracted after post-structural processing;
[0100] (3) Read free text from the current medical history field of the electronic medical record, and extract the current medical history (medical history name, course of disease) after post-structuring processing.
[0101] (4) Based on the patient's basic information, symptoms, and current medical history, a decision support model is used to calculate and obtain the recommended drug group.
[0102] (5) Manually modify the medication group, including deleting or adding medications and dosages, and return the result to the medical order field of the electronic medical record.
[0103] The present invention adopts a batch online learning strategy to accumulate a batch of training data, re-learn, and update the parameters of the model.
[0104] In addition, the embodiment of the present invention also provides a TCM decision-making assistance method, including:
[0105] S1, receiving patient information of patients in TCM medical records, wherein the patient information includes basic information of the patient, current medical history, symptoms and TCM entity data;
[0106] S2, using a dynamic weighting method to score the symptoms according to preset rules, obtaining and outputting the weight of each indicator, and performing weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms;
[0107] S3, based on the SeqGAN algorithm, trains a symptom-to-drug model, and according to the weight of each symptom corresponding to the symptom body and the preset rules, outputs the optimal Chinese medicine group for each symptom corresponding to the symptom body as an auxiliary decision result.
[0108] Since the medical auxiliary decision-making method is a method corresponding to the above-mentioned medical auxiliary decision-making system and has the same beneficial effects, the present invention is not limited to this.
[0109] In order to further improve the reliability of decision making and reduce the risks brought by decision making, in one embodiment, after S3, the following is further included:
[0110] S4, the doctor makes corrections and prescribes according to the auxiliary decision results as new training data, and outputs the new data after adding corresponding weights according to its own level.
[0111] Based on the results of the decision support, the doctor will make corrections and prescribe, which will serve as new training data, and the new data will be weighted. The training data of doctors with high levels will have high weights, while the training data of doctors with low diseases will have low weights. In this way, the opinions of doctors at different levels can be combined to achieve more efficient decision-making. At the same time, different decisions made by different doctors can also provide a large number of samples for low-level doctors, improve learning efficiency, and reduce learning costs.
[0112] Since there are some medical records in the existing medical records that can be directly recognized by computers and some that cannot be directly recognized by computers, in order to improve recognition efficiency, in one embodiment, S1 further includes:
[0113] The Bert_BiLSTM_CRF model is used to perform text recognition on the TCM medical records in non-text format and to output the patient information in the TCM medical records in a computer-processable text format.
[0114] By using OCR technology to perform text recognition on non-text TCM medical records, computer-processable text is formed, the subsequent processing is unified, the processing cost is reduced, and the decision-making efficiency is improved. The present invention generally adopts a combination of multiple methods to perform text recognition of TCM medical records, generally including Google's open source OCR engine Tesseract and Baidu's character recognition API.
[0115] Since some weight functions need to be used in the scoring process, and different weight functions may be used for different diseases, and the weights thereof are also different, in order to achieve flexible and accurate identification, in one embodiment, S2 further includes:
[0116] It is used to select at least one of the Cauchy distribution function, the piecewise variable power function and the partially normal distribution function as the weight function for running the dynamic weighting method according to the weight function selection instruction.
[0117] The present invention does not limit the weight function to be called. The weight function to be used may be pre-defined for different diseases, or may be customized by the physician before making a decision. The present invention does not limit this.
[0118] In summary, the TCM decision-making support system and method provided in the embodiments of the present invention obtains the weights of the corresponding symptoms by dynamically evaluating the patient's symptoms, and uses the SeqGAN algorithm to calculate and output the optimal Chinese medicine group as the decision output, thereby improving the efficiency and accuracy of TCM decision-making. Moreover, since all symptoms have corresponding ones, the difficulty of decision-making is greatly reduced, which helps to realize intelligent medical care.
[0119] The above is a detailed introduction to the TCM decision-making support system and method provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A TCM decision-making support system, characterized in that: include: The patient information acquisition module is used to receive the patient information of the patient in the TCM medical record, and the patient information includes the patient's basic information, current medical history, symptoms and TCM entity data; A symptom scoring module, connected to the patient information acquisition module, is used to score the symptoms according to preset rules using a dynamic weighting method, obtain and output the weight of each indicator, and perform weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms; An auxiliary decision-making module is connected to the symptom scoring module, and trains a symptom-to-drug model based on the SeqGAN algorithm, and outputs the optimal Chinese medicine group for each symptom corresponding to the symptom as an auxiliary decision-making result according to the weight of each symptom corresponding to the symptom body and the preset rules; It also includes an incremental data updating module connected to the auxiliary decision module, which is used for doctors to make corrections and prescribe according to the auxiliary decision results as new training data, and output the new training data after adding corresponding weights according to its own level.
2. The TCM decision-making support system as claimed in claim 1, characterized in that: It also includes a weight function selection module connected to the symptom scoring module, which is used to select at least one of the Cauchy distribution function, the piecewise variable power function, and the large normal distribution function as the weight function for the operation of the symptom scoring module according to the weight function selection instruction.
3. The TCM decision-making support system as claimed in claim 2, characterized in that: It also includes a TCM medical record text post-structuring module connected to the symptom scoring module, which uses the Bert_BiLSTM_CRF model to perform text recognition on non-text TCM medical records and converts the patient's basic information, current medical history, symptoms and Chinese medicine entity data in the TCM medical records into a computer-processable text.
4. The TCM decision-making support system as claimed in claim 3, characterized in that: The TCM medical record text post-structuring module includes at least one of an OCR engine Tesseract unit and a character recognition API unit.
5. The TCM decision-making support system as claimed in claim 4, characterized in that: It also includes a term normalization module connected to the TCM medical record text post-structuring module. The term normalization module is based on the TCMLS TCM standard terminology set, and uses a similarity algorithm combined with manual proofreading to normalize the current medical history, TCM symptoms and names of traditional Chinese medicine collected from the TCM medical records. The similarity algorithm is used to calculate the semantic similarity between the candidate terms to be normalized and the standard terms, and the terms with similarity exceeding a threshold are selected for manual proofreading to obtain an accurate synonym set.
6. A TCM decision-making assistance method, characterized in that: include: S1, receiving patient information of patients in TCM medical records, wherein the patient information includes basic information of the patient, current medical history, symptoms and TCM entity data; S2, using a dynamic weighting method to score the symptoms according to preset rules, obtaining and outputting the weight of each indicator, and performing weighted summation of the indicators to calculate the weight of each symptom corresponding to the symptoms; S3, training a symptom-to-drug model based on the SeqGAN algorithm, and outputting the optimal Chinese medicine group for each symptom corresponding to the symptom as an auxiliary decision result according to the weight of each symptom corresponding to the symptom body and the preset rules; After S3, it also includes: S4, the doctor makes corrections and prescribes according to the auxiliary decision results as new training data, and outputs the new training data after adding corresponding weights according to its own level.
7. The TCM decision-making assistance method according to claim 6, characterized in that: The S1 further comprises: The Bert_BiLSTM_CRF model is used to perform text recognition on the TCM medical records in non-text format and to output the patient information in the TCM medical records in a computer-processable text format.
8. The TCM decision-making assistance method according to claim 6, characterized in that: The S2 further includes: It is used to select at least one of the Cauchy distribution function, the piecewise variable power function and the partially normal distribution function as the weight function for running the dynamic weighting method according to the weight function selection instruction.
Citation Information
Patent Citations
Methods and products to diagnose and treat heatiness
CN103998021A
Drug use recommendation system and method based on symptom analysis and machine learning
CN104200069A
Chinese traditional auxiliary diagnosis and treatment device and system
CN105678058A
Neural network algorithm-based traditional Chinese medicine intelligent diagnosis aid system and method
CN109166619A
Traditional Chinese medicine diagnosis and treatment system based on artificial intelligence
CN109360647A
