CN116913459B - Medicine recommendation method and system based on deep convolution network control gate model - Google Patents
Medicine recommendation method and system based on deep convolution network control gate model Download PDFInfo
- Publication number
- CN116913459B CN116913459B CN202311171207.0A CN202311171207A CN116913459B CN 116913459 B CN116913459 B CN 116913459B CN 202311171207 A CN202311171207 A CN 202311171207A CN 116913459 B CN116913459 B CN 116913459B
- Authority
- CN
- China
- Prior art keywords
- patient
- sentence
- diagnosis
- layer
- control gate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 239000003814 drug Substances 0.000 title claims abstract description 93
- 229940079593 drug Drugs 0.000 title claims abstract description 85
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000003745 diagnosis Methods 0.000 claims abstract description 77
- 238000012549 training Methods 0.000 claims abstract description 19
- 238000013507 mapping Methods 0.000 claims abstract description 8
- 238000004364 calculation method Methods 0.000 claims description 50
- 239000011159 matrix material Substances 0.000 claims description 34
- 238000006243 chemical reaction Methods 0.000 claims description 19
- 230000004913 activation Effects 0.000 claims description 18
- 238000011176 pooling Methods 0.000 claims description 12
- 230000008569 process Effects 0.000 claims description 9
- 238000009825 accumulation Methods 0.000 claims description 6
- 230000004927 fusion Effects 0.000 claims description 6
- 230000003213 activating effect Effects 0.000 claims description 3
- 238000013506 data mapping Methods 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 238000007689 inspection Methods 0.000 abstract description 6
- 239000010410 layer Substances 0.000 description 74
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 239000002356 single layer Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H20/00—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
- G16H20/10—ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/20—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Public Health (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Epidemiology (AREA)
- Primary Health Care (AREA)
- Medicinal Chemistry (AREA)
- Chemical & Material Sciences (AREA)
- Pathology (AREA)
- Databases & Information Systems (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The application provides a medication recommendation method and a system based on a deep convolutional network control gate model, wherein the method comprises the following steps: s1: acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data; s2: according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data, converting the digital ID mapping of each piece of patient diagnosis and treatment examination information and the final medication data; s3: taking the diagnosis and treatment information of the patient converted into the digital ID as input, taking final medication data as a label, and inputting a control gate model for training; s4: the actual patient diagnosis and treatment information is input into a control gate model, and the recommended medication probability is output. According to the application, the existing user diagnosis and inspection data are learned through the deep convolution network control gate model, after training is finished, the trained model can be used for recommending the medication of the patient based on new diagnosis and inspection indexes of the patient, and finally the optimal medication of the patient is recommended.
Description
Technical Field
The application relates to the technical field of medical medication recommendation, in particular to a medication recommendation method and system based on a deep convolutional network control gate model.
Background
With the development of information technology and the wide application in the medical field, a great amount of patient diagnosis and treatment information and medication data are accumulated in the patient diagnosis and treatment process. Based on the diagnosis and treatment information of the patient and the medication data, intelligent medication recommendation of the patient is realized, and the workload of medical staff can be reduced.
However, in the conventional medication recommendation method, the medication recommendation is generally performed by classifying patients according to the categories, however, in actual clinic, the patient diagnosis and treatment information often has specificity, and if the medication recommendation is performed according to the patient diagnosis and treatment information, the patient diagnosis and treatment information needs to be explicitly classified in advance.
Disclosure of Invention
According to the medication recommendation method and system based on the deep convolutional network control gate model, the characteristics of the existing user diagnosis and inspection data are learned through the deep convolutional network control gate model, after training is finished, the trained model can be used for recommending the medication of the patient based on new patient diagnosis and inspection indexes, the optimal medication of the patient is finally recommended, automation of patient medication recommendation to a certain extent is achieved, manual workload is reduced to a certain extent, and therefore the technical problem in the process can be solved.
The technical scheme for solving the technical problems is as follows:
in a first aspect, the present application provides a medication recommendation method based on a deep convolutional network control gate model, comprising the steps of:
s1: acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
s2: according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data, converting the digital ID mapping of each piece of patient diagnosis and treatment examination information and the final medication data;
s3: taking the diagnosis and treatment information of the patient converted into the digital ID as input, taking final medication data as a label, and inputting a StackGatedCNN control gate model for training;
s4: the actual patient diagnosis and treatment information is input into a StarkGatedCNN control gate model, and the recommended medication probability is output.
In some embodiments, the S3 comprises:
s31: inputting the patient diagnosis and treatment information converted into the digital ID into an enabling layer, and outputting sentence vector representation x of the patient diagnosis and treatment information;
s32: inputting sentence vector representation x into a control gate model layer, and obtaining an intra-sentence character vector set through calculation;
s33: and carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value.
In some embodiments, the S31:
s311: matrix multiplication is carried out on the patient diagnosis and treatment information converted into the digital ID and the weighting matrix of the ebedding, so that the ebedding matrix representation of the input data is obtained;
s312: and outputting sentence vector representation x of the diagnosis and treatment information of the patient through an ebedding layer.
In some embodiments, the S31:
s311: matrix multiplication is carried out on the patient diagnosis and treatment information converted into the digital ID and the weighting matrix of the ebedding, so that the ebedding matrix representation of the input data is obtained;
s312: and outputting sentence vector representation x of the diagnosis and treatment information of the patient through an ebedding layer.
In some embodiments, the specific calculation process of S33 is:
wherein,representing linear layer weights, ++>The dimensions are the same and are d×d, d represents the last vector dimension of the output of the emmbedding layer; />Representing a current sentence vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the sentence currently calculated, i represents the ith character in the sentence, and t represents the time of accumulation calculation from the current t-th character; />The weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
In a second aspect, the present application provides a medication recommendation system based on a deep convolutional network control gate model, comprising:
the data acquisition module is used for acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
the data mapping conversion module is used for carrying out digital ID mapping conversion on each piece of patient diagnosis and treatment examination information and the final medication data according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data;
the model training module is used for inputting the diagnosis and treatment information of the patient converted into the digital ID, using the final medication data as a label, and inputting a StackGatedCNN control gate model for training;
the medication prediction module is used for inputting the actual patient diagnosis and treatment information into the StarkGatedCNN control gate model and outputting the recommended medication probability.
In some embodiments, the model training module comprises:
the vector conversion sub-module is used for inputting the patient diagnosis and treatment information converted into the digital ID into the ebedding layer and outputting sentence vector representation x of the patient diagnosis and treatment information;
the control gate submodule is used for inputting the sentence vector representation x into the control gate model layer and obtaining an intra-sentence character vector set through calculation;
and the probability calculation sub-module is used for carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value.
In some embodiments, the vector conversion submodule includes:
the matrix multiplication unit is used for carrying out matrix multiplication on the patient diagnosis and treatment information converted into the digital ID and the ebedding weight matrix to obtain an ebedding matrix representation of the input data;
and the data output unit is used for outputting sentence vector representation x of the diagnosis and treatment information of the patient through the ebedding layer.
In some embodiments, the control gate submodule includes:
the feature acquisition unit is used for dividing windows of sentence vector representation x by utilizing sliding of the filter, convolving each divided window and activating by utilizing a tanh function to obtain a feature set of sentence vector representation x corresponding to the current filter;
the feature extraction unit is used for extracting the feature with the highest value in the feature set corresponding to each filter in the Maxpooling layer;
and the intra-sentence character vector set output unit is used for performing sigmoid function activation and fusion residual connection on the feature set with the maximum value, and outputting the intra-sentence character vector set through LayerNorm layer conversion.
In some embodiments, the specific calculation process of the probability calculation sub-module is:
wherein,representing linear layer weights, ++>The dimensions are the same and are d×d, d represents the last vector dimension of the output of the emmbedding layer; />Representing a current sentence vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the sentence currently calculated, i represents the ith character in the sentence, and t represents the time of accumulation calculation from the current t-th character; />The weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
The beneficial effects of the application are as follows:
according to the medication recommendation method and system based on the deep convolutional network control gate model, the existing user diagnosis and inspection data are learned through the deep convolutional network model, after training is finished, the trained model can be used for recommending the medication of the patient based on new patient diagnosis and inspection indexes, the optimal medication of the patient is finally recommended, automation of patient medication recommendation to a certain extent is achieved, and manual workload is reduced to a certain extent.
Drawings
FIG. 1 is a flow chart of a medication recommendation method based on a deep convolutional network control gate model of the present application;
FIG. 2 is a sub-flowchart of step S3 of the present application;
FIG. 3 is a sub-flowchart of step S31 of the present application;
fig. 4 is a sub-flowchart of step S32 of the present application.
Detailed Description
The principles and features of the present application are described below with reference to the drawings, the examples are illustrated for the purpose of illustrating the application and are not to be construed as limiting the scope of the application.
In order that the above-recited objects, features and advantages of the present application can be more clearly understood, a more particular description of the application will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It is to be understood that the depicted embodiments are some, but not all, embodiments of the present application. The specific embodiments described herein are to be considered in an illustrative rather than a restrictive sense. All other embodiments, which are obtained by a person skilled in the art based on the described embodiments of the application, fall within the scope of protection of the application.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
FIG. 1 is a flow chart of a medication recommendation method based on a deep convolutional network control gate model of the present application.
The medicine recommendation method based on the deep convolution network control gate model, combined with fig. 1, comprises the following steps:
s1: acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
s2: according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data, converting the digital ID mapping of each piece of patient diagnosis and treatment examination information and the final medication data;
specifically, the data adopted in the scheme are the existing diagnosis and treatment examination information of the patient and the corresponding final medication data of the patient, and the acquired data can be stored through excel. Firstly, mapping conversion is carried out on the diagnosis and treatment examination information of each patient and the final medication data of the patient with respect to the digital ID, and the diagnosis and treatment examination information of each patient and the final medication data of the patient are converted into digital ID to be represented and used as training data, so that the model can be conveniently input for training.
S3: taking the diagnosis and treatment information of the patient converted into the digital ID as input, taking final medication data as a label, and inputting a StackGatedCNN control gate model for training;
in some embodiments, in conjunction with the sub-flowchart of fig. 2, i.e., S3, the S3 includes:
s31: inputting the patient diagnosis and treatment information converted into the digital ID into an enabling layer, and outputting sentence vector representation x of the patient diagnosis and treatment information;
in some embodiments, in conjunction with the sub-flowchart of fig. 3, i.e., S31, the S31:
s311: matrix multiplication is carried out on the patient diagnosis and treatment information converted into the digital ID and the weighting matrix of the ebedding, so that the ebedding matrix representation of the input data is obtained;
s312: and outputting sentence vector representation x of the diagnosis and treatment information of the patient through an ebedding layer.
Specifically, the model adopted in the scheme is a StackGatedCNN control gate model, the model firstly comprises an ebedding layer, matrix multiplication is carried out on an ebedding weight matrix and an ID mapped by input data in the ebedding layer, an ebedding word vector is obtained to be used as an ebedding matrix representation of the input data, the vector dimension is 256 dimensions, and the original ID mapped data is output as sentence vector representation x through ebedding.
S32: inputting sentence vector representation x into a control gate model layer, and obtaining an intra-sentence character vector set through calculation;
in some embodiments, in conjunction with the sub-flowchart of fig. 4, i.e., S32, the S32 includes:
s321: window division is carried out on the sentence vector representation x by utilizing sliding of the filter, convolution is carried out on each divided window, and a feature set of the sentence vector representation x corresponding to the current filter is obtained by utilizing tanh function activation;
s322: extracting the feature with the highest value in the feature set corresponding to each filter in the Maxpooling layer;
s323: and performing sigmoid function activation and fusion residual connection on the feature set with the maximum value, and outputting an intra-sentence character vector set through LayerNorm layer conversion.
Specifically, the stackGatedCNN control gate model further comprises a control gate model layer, wherein the calculation process in the control gate model layer is that firstly, a single-layer cnn network is calculated, and sentences can be formed by sliding a filter with a window length of hIn the form of a collection of windows, i.e. +.>And is about the window therein>The convolution is carried out and then is activated by a tanh function, and the formula is as follows:
where n is the number of characters in the sentence vector representing x, b represents the bias weight, W represents the bias weight,representing the results after passing through the linear layer and the activation function layer.
The sliding convolution window is re-activated, and can be obtained:
wherein,representing the feature set corresponding to the i-th filter.
Thus, the m filters are:
next, a Maxpooling layer is provided, which can receive the output after the convolution kernel is activatedThe objective of the maximum pooling to obtain the features corresponding to a particular filter is to capture the most important features for each feature map, i.e. one with the highest value:
wherein,representing the feature with the highest value in the feature set corresponding to the ith filter.
Further, the output of the pooling layer is:
calculating the output result of the pooling layer by imitating the idea of a gate unit, defining z_gate=z, and subjecting z_gate to a sigmoid activation function:
then, matrix operation is carried out on z_gated and z activated by the sigmoid activation function, and output of the model layer is obtained:
where z_gated represents the calculation of the pooling layer according to the gate unit idea and z represents the pooling layer output.
Further, using a residual connection mechanism, adding the original vector representation H before the control gate model layer calculation and z output through the control gate model layer, and outputting information z after fusion residual connection:
the data form for z was then transformed by LayerNorm to a mean of 0 and variance of 1:
where f represents LayerNorm conversion, H represents the original vector representation before control gate model layer computation,the calculated result of z through the LayerNorm layer is shown.
Furthermore, in the feed_forward layer, a network structure is defined as two full-connection layers, a relu activation function is added into a similar bert model between the two full-connection layers, then the full-connection layers are added with LayerNorm for residual connection, and the LayerNorm is normalized, and the two full-connection layers are input into a formula to express:
wherein,representing the result of the calculation through the linear layer and the fedforward layer, < >>Representing weights representing the linear layers inside Relu, < ->Weights representing the linear layers outside Relu, < ->Represents the bias of the linear layer inside Relu, < >>Representing the bias of the linear layer outside the Relu.
It should be noted that, here, the calculation of the stack gateway nn is already completed, and because in this solution, a model mode is adopted in the stack gateway nn, num_layers are set to 2, and the output vector set x of the unbedding network layer is transmitted to the next network for calculation through the above calculation process twice as the finally output character vector representation.
S33: and carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value.
Specifically, let theFor the sentence character vector set which is calculated and output by the StackGatedCNN +.>We are subjected to mean pooling and tanh function activation, and sum-linear layer calculation as vector representation of the current sentence, respectively +.>The calculation formula is as follows:
wherein the linear layer weightsD x d, where d is the last vector dimension of the output of the emmbedding layer; />Representing a current sentence vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the currently calculated sentence, i represents the ith character in the sentence, and t represents the time of accumulation calculation starting from the current t-th character.
Finally, willThe drug probability p value of the recommended drug of the user is obtained by a full connection layer followed by a softmax, and the formula is as follows:
wherein the method comprises the steps ofThe weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
S4: the actual patient diagnosis and treatment information is input into a StarkGatedCNN control gate model, and the recommended medication probability is output.
Specifically, after model training is completed, the trained model can be used for recommending the patient medication based on new patient diagnosis, examination and detection indexes, and finally the optimal medication of the patient is recommended, so that the patient medication recommendation automation to a certain extent is realized.
The second aspect of the present application also provides a medication recommendation system based on a deep convolutional network control gate model, comprising:
the data acquisition module is used for acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
the data mapping conversion module is used for carrying out digital ID mapping conversion on each piece of patient diagnosis and treatment examination information and the final medication data according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data;
the model training module is used for inputting the diagnosis and treatment information of the patient converted into the digital ID, using the final medication data as a label, and inputting a StackGatedCNN control gate model for training;
the medication prediction module is used for inputting the actual patient diagnosis and treatment information into the StarkGatedCNN control gate model and outputting the recommended medication probability.
In some embodiments, the model training module comprises:
the vector conversion sub-module is used for inputting the patient diagnosis and treatment information converted into the digital ID into the ebedding layer and outputting sentence vector representation x of the patient diagnosis and treatment information;
the control gate submodule is used for inputting the sentence vector representation x into the control gate model layer and obtaining an intra-sentence character vector set through calculation;
and the probability calculation sub-module is used for carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value.
In some embodiments, the vector conversion submodule includes:
the matrix multiplication unit is used for carrying out matrix multiplication on the patient diagnosis and treatment information converted into the digital ID and the ebedding weight matrix to obtain an ebedding matrix representation of the input data;
and the data output unit is used for outputting sentence vector representation x of the diagnosis and treatment information of the patient through the ebedding layer.
In some embodiments, the control gate submodule includes:
the feature acquisition unit is used for dividing windows of sentence vector representation x by utilizing sliding of the filter, convolving each divided window and activating by utilizing a tanh function to obtain a feature set of sentence vector representation x corresponding to the current filter;
the feature extraction unit is used for extracting the feature with the highest value in the feature set corresponding to each filter in the Maxpooling layer;
and the intra-sentence character vector set output unit is used for performing sigmoid function activation and fusion residual connection on the feature set with the maximum value, and outputting the intra-sentence character vector set through LayerNorm layer conversion.
In some embodiments, the specific calculation process of the probability calculation sub-module is:
wherein,representing linear layer weights, ++>The dimensions are the same and are d×d, d represents the last vector dimension of the output of the emmbedding layer; />Representing a current sentence vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the sentence currently calculated, i represents the ith character in the sentence, and t represents the time of accumulation calculation from the current t-th character; />The weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
Those skilled in the art will appreciate that while some embodiments described herein include some features but not others included in other embodiments, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments.
Those skilled in the art will appreciate that the descriptions of the various embodiments are each focused on, and that portions of one embodiment that are not described in detail may be referred to as related descriptions of other embodiments.
Although the embodiments of the present application have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and alterations without departing from the spirit and scope of the present application, and such modifications and alterations fall within the scope of the appended claims, which are to be construed as merely illustrative of the present application, but the scope of the application is not limited thereto, and various equivalent modifications and substitutions will be readily apparent to those skilled in the art within the scope of the present application, and are intended to be included within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
The present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the present application, and these modifications and substitutions are intended to be included in the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (2)
1. The medicine recommendation method based on the deep convolution network control gate model is characterized by comprising the following steps of:
s1: acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
s2: according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data, converting the digital ID mapping of each piece of patient diagnosis and treatment examination information and the final medication data;
s3: taking the diagnosis and treatment information of the patient converted into the digital ID as input, taking final medication data as a label, and inputting a StackGatedCNN control gate model for training;
s4: inputting actual patient diagnosis and treatment information into a StarGatedCNN control gate model, and outputting the recommended medication probability;
the step S3 comprises the following steps:
s31: inputting the patient diagnosis and treatment information converted into the digital ID into an enabling layer, and outputting sentence vector representation x of the patient diagnosis and treatment information;
s32: inputting sentence vector representation x into a control gate model layer, and obtaining an intra-sentence character vector set through calculation;
s33: carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value;
the step S31:
s311: matrix multiplication is carried out on the patient diagnosis and treatment information converted into the digital ID and the weighting matrix of the ebedding, so that the ebedding matrix representation of the input data is obtained;
s312: outputting sentence vector representation x of the diagnosis and treatment information of the patient through an ebedding layer;
the S32 includes:
s321: window division is carried out on the sentence vector representation x by utilizing sliding of the filter, convolution is carried out on each divided window, and a feature set of the sentence vector representation x corresponding to the current filter is obtained by utilizing tanh function activation;
s322: extracting the feature with the highest value in the feature set corresponding to each filter in the Maxpooling layer;
s323: performing sigmoid function activation and fusion residual connection on the feature set with the maximum value, and outputting an intra-sentence character vector set through LayerNorm layer conversion;
the specific calculation process of S33 is as follows:
wherein (1)>Representing linear layer weights, ++>The dimensions are the same and are d×d, d represents the last vector dimension of the output of the emmbedding layer; />Representing a current sentence vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the sentence currently calculated, i represents the ith character in the sentence, and t represents the time of accumulation calculation from the current t-th character; />The weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
2. Drug recommendation system based on deep convolutional network control gate model, characterized by comprising:
the data acquisition module is used for acquiring the existing diagnosis and treatment examination information of the patient and corresponding final medication data;
the data mapping conversion module is used for carrying out digital ID mapping conversion on each piece of patient diagnosis and treatment examination information and the final medication data according to the corresponding relation between the patient diagnosis and treatment examination information and the final medication data;
the model training module is used for inputting the diagnosis and treatment information of the patient converted into the digital ID, using the final medication data as a label, and inputting a StackGatedCNN control gate model for training; the medication prediction module is used for inputting the actual patient diagnosis and treatment information into the StarkGatedCNN control gate model and outputting the recommended medication probability;
the model training module comprises:
the vector conversion sub-module is used for inputting the patient diagnosis and treatment information converted into the digital ID into the ebedding layer and outputting sentence vector representation x of the patient diagnosis and treatment information;
the control gate submodule is used for inputting the sentence vector representation x into the control gate model layer and obtaining an intra-sentence character vector set through calculation;
the probability calculation sub-module is used for carrying out average pooling, tanh function activation and linear layer calculation on the intra-sentence character vector set to obtain a final medication probability value;
the vector conversion submodule comprises:
the matrix multiplication unit is used for carrying out matrix multiplication on the patient diagnosis and treatment information converted into the digital ID and the ebedding weight matrix to obtain an ebedding matrix representation of the input data;
the data output unit is used for outputting sentence vector representation x of the diagnosis and treatment information of the patient through the ebedding layer;
the control gate submodule includes:
the feature acquisition unit is used for dividing windows of sentence vector representation x by utilizing sliding of the filter, convolving each divided window and activating by utilizing a tanh function to obtain a feature set of sentence vector representation x corresponding to the current filter;
the feature extraction unit is used for extracting the feature with the highest value in the feature set corresponding to each filter in the Maxpooling layer;
the intra-sentence character vector set output unit is used for performing sigmoid function activation and fusion residual connection on the feature set with the maximum value, and outputting the intra-sentence character vector set through LayerNorm layer conversion; the specific calculation process of the probability calculation sub-module is as follows:
wherein (1)>Representing linear layer weights, ++>The dimensions are the same and are d×d, d represents the last vector dimension of the output of the emmbedding layer; />Representing a current sentenceA sub-vector representation; h represents an intra-sentence character vector set; />Representing the bias weight; j represents the total number of characters in the sentence currently calculated, i represents the ith character in the sentence, and t represents the time of accumulation calculation from the current t-th character; />The weight matrix representing the final linear layer, the dimension is L multiplied by d, L is the number of medicines, and p is the probability value of the final output target medicine; />Representing the result of the calculation through the first linear layer; />Representing the result of the calculation through the second linear layer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311171207.0A CN116913459B (en) | 2023-09-12 | 2023-09-12 | Medicine recommendation method and system based on deep convolution network control gate model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311171207.0A CN116913459B (en) | 2023-09-12 | 2023-09-12 | Medicine recommendation method and system based on deep convolution network control gate model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116913459A CN116913459A (en) | 2023-10-20 |
CN116913459B true CN116913459B (en) | 2023-12-15 |
Family
ID=88351501
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311171207.0A Active CN116913459B (en) | 2023-09-12 | 2023-09-12 | Medicine recommendation method and system based on deep convolution network control gate model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116913459B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117894424B (en) * | 2024-03-14 | 2024-05-14 | 四川省医学科学院·四川省人民医院 | Recommendation system for constructing T2DM patient drug scheme based on deep learning and reinforcement learning |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113326384A (en) * | 2021-06-22 | 2021-08-31 | 四川大学 | Construction method of interpretable recommendation model based on knowledge graph |
CN113436746A (en) * | 2021-06-30 | 2021-09-24 | 平安科技(深圳)有限公司 | Medicine taking recommendation method, device, equipment and storage medium based on sorting algorithm |
CN116527357A (en) * | 2023-04-26 | 2023-08-01 | 东北大学 | Web attack detection method based on gate control converter |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111753543B (en) * | 2020-06-24 | 2024-03-12 | 北京百度网讯科技有限公司 | Medicine recommendation method, device, electronic equipment and storage medium |
-
2023
- 2023-09-12 CN CN202311171207.0A patent/CN116913459B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113326384A (en) * | 2021-06-22 | 2021-08-31 | 四川大学 | Construction method of interpretable recommendation model based on knowledge graph |
CN113436746A (en) * | 2021-06-30 | 2021-09-24 | 平安科技(深圳)有限公司 | Medicine taking recommendation method, device, equipment and storage medium based on sorting algorithm |
CN116527357A (en) * | 2023-04-26 | 2023-08-01 | 东北大学 | Web attack detection method based on gate control converter |
Non-Patent Citations (2)
Title |
---|
Conditional Generation Net for Medication Recommendation;Wu Rui, et al.;《Arxiv》;全文 * |
Severity Based Detection of Conjunctivitis and Drug Recommendation System Using CNN;V. R. Prakash, et al.;《2023 IEEE 12th International Conference on Communication Systems and Network Technologies (CSNT)》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN116913459A (en) | 2023-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023202508A1 (en) | Cognitive graph-based general practice patient personalized diagnosis and treatment scheme recommendation system | |
Zhu et al. | Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network | |
CN112801168B (en) | Lesion area prediction analysis method, system and terminal equipment of tumor image | |
CN113421652A (en) | Method for analyzing medical data, method for training model and analyzer | |
CN116913459B (en) | Medicine recommendation method and system based on deep convolution network control gate model | |
Han et al. | Supervised threshold-based heart sound classification algorithm | |
WO2020224433A1 (en) | Target object attribute prediction method based on machine learning and related device | |
CN116779091B (en) | Automatic generation method of multi-mode network interconnection and fusion chest image diagnosis report | |
CN116110565A (en) | Method for auxiliary detection of crowd depression state based on multi-modal deep neural network | |
CN115579141A (en) | Interpretable disease risk prediction model construction method and disease risk prediction device | |
Xiao et al. | Exploration of Attention Mechanism-Enhanced Deep Learning Models in the Mining of Medical Textual Data | |
AU2024204390A1 (en) | Computer based object detection within a video or image | |
CN117672450A (en) | Personalized medicine recommendation method and system based on knowledge graph | |
CN114783601A (en) | Physiological data analysis method and device, electronic equipment and storage medium | |
CN112216379A (en) | Disease diagnosis system based on intelligent joint learning | |
CN117194604B (en) | Intelligent medical patient inquiry corpus construction method | |
Ramesh et al. | AI based dynamic prediction model for mobile health application system | |
Rampogu | A review on the use of machine learning techniques in monkeypox disease prediction | |
Shaik et al. | Gated contextual transformer network for multi-modal retinal image clinical description generation | |
Wang et al. | Predicting clinical visits using recurrent neural networks and demographic information | |
CN116975233A (en) | Medical question answer generation method and device, storage medium and electronic equipment | |
CN115964475A (en) | Dialogue abstract generation method for medical inquiry | |
Khan et al. | Heart disease prediction using novel Ensemble and Blending based Cardiovascular Disease Detection Networks: EnsCVDD-Net and BlCVDD-Net | |
CN114694841A (en) | Adverse event risk prediction method based on patient electronic health record | |
CN114582449A (en) | Electronic medical record named entity standardization method and system based on XLNet-BiGRU-CRF model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |