CN114627993A - Information prediction method, information prediction device, storage medium and computer equipment - Google Patents
Information prediction method, information prediction device, storage medium and computer equipment Download PDFInfo
- Publication number
- CN114627993A CN114627993A CN202210233050.9A CN202210233050A CN114627993A CN 114627993 A CN114627993 A CN 114627993A CN 202210233050 A CN202210233050 A CN 202210233050A CN 114627993 A CN114627993 A CN 114627993A
- Authority
- CN
- China
- Prior art keywords
- information
- predicted
- preset
- content
- vector
- 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.)
- Pending
Links
Images
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
- G16H10/00—ICT specially adapted for the handling or processing of patient-related medical or healthcare data
- G16H10/60—ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
-
- 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
-
- 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
-
- 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/70—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for mining of medical data, e.g. analysing previous cases of other patients
Landscapes
- Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- General Health & Medical Sciences (AREA)
- Public Health (AREA)
- Biomedical Technology (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Epidemiology (AREA)
- Primary Health Care (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Pathology (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Medical Treatment And Welfare Office Work (AREA)
Abstract
The invention discloses an information prediction method, an information prediction device, a storage medium and computer equipment, relates to the technical field of digital medical treatment, and mainly aims to improve the efficiency of model training and further improve the efficiency of information prediction. The method comprises the following steps: acquiring disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted comprises prompt information corresponding to content to be filled in the blank, and the content to be filled in the blank is any dimension information; and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information. The invention is suitable for predicting information.
Description
Technical Field
The invention relates to the technical field of digital medical treatment, in particular to an information prediction method, an information prediction device, a storage medium and computer equipment.
Background
The disease information includes medical knowledge of disease symptoms, examination, diagnosis and the like, and demographic information and medical information of patients, such as allergy history, treatment history, disease history, family medical history and the like, and as the application rate of the disease information gradually increases, massive information in the disease information can be extracted through data mining, richer clinical application is constructed, medical care decision is assisted, and the medical health service quality is improved, wherein the information prediction for the patients by utilizing the disease information is an important application to the disease information.
At present, a neural network model constructed by sample medical record data is generally adopted for information prediction. However, this method can only predict certain information, and if it is desired to predict other information of the patient, it is also necessary to obtain corresponding sample medical record data to reconstruct the model, for example, a trained drug recommendation model can only recommend a drug to the patient, and if it is desired to predict the hospitalization time of the patient, it is necessary to retrain the prediction model, which results in a large amount of sample data to be obtained, increases the burden on the staff, and reduces the training efficiency of the model.
Disclosure of Invention
The invention provides an information prediction method, an information prediction device, a storage medium and computer equipment, which mainly aim to improve the efficiency of model training and further improve the efficiency of information prediction.
According to a first aspect of the present invention, there is provided an information prediction method comprising:
acquiring disease information of a patient to be predicted;
determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
According to a second aspect of the present invention, there is provided an information prediction apparatus comprising:
an acquisition unit for acquiring disease information of a patient to be predicted;
the generating unit is used for determining an information template matched with the prediction information and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted comprises prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and the prediction unit is used for predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
According to a third aspect of the present invention, there is provided a computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring disease information of a patient to be predicted;
determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring disease information of a patient to be predicted;
determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
According to the information prediction method, the information prediction device, the storage medium and the computer equipment, compared with the mode of performing information prediction by adopting a neural network model constructed by sample medical record data at present, the method obtains the disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; finally, a preset information prediction model is used for predicting the content to be emptied in the statement to be predicted, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information, so that the statement to be predicted with prompting information of the content to be emptied is generated by disease information in the form of an information template, the content to be emptied is any dimensional information, and the content to be emptied in the statement to be predicted is predicted by using the preset information prediction model, wherein the preset information prediction model is obtained by training the sample medical record texts which are shielded with different dimensional information, so that the problem that the trained neural network model can only predict certain information, and if other information of a patient is desired to be predicted, corresponding sample medical record data needs to be obtained to reconstruct the model is avoided, the burden of training the model by collecting sample case data by workers is reduced, and the efficiency of model training is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an information prediction method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another information prediction method provided by the embodiment of the invention;
fig. 3 is a schematic structural diagram illustrating an information prediction apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of another information prediction apparatus provided in an embodiment of the present invention;
fig. 5 shows a physical structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
At present, the information prediction mode of the neural network model constructed by the sample medical record data can only predict certain information, if other information of a patient is desired to be predicted, the corresponding sample medical record data is required to be obtained to reconstruct the model, the burden of workers is increased, and the training efficiency of the model is reduced.
In order to solve the above problem, an embodiment of the present invention provides an information prediction method, as shown in fig. 1, where the method includes:
101. disease information of a patient to be predicted is acquired.
The disease information includes medical knowledge such as the type of medical examination, diagnosis, etc., and demographic information such as age, etc. of the patient.
For the embodiment of the invention, in order to overcome the problem of low training efficiency of the model in the prior art, the embodiment of the invention generates the sentence to be predicted with the prompt information of the content to be filled in the blank by the disease information in the form of the information template, wherein the content to be filled in is any dimension information, and the content to be filled in the sentence to be predicted is predicted by utilizing a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts with different occluded dimension information, therefore, the method can avoid that the trained neural network model can only predict certain information, if the trained neural network model wants to predict other information of the patient, the problem that the corresponding sample medical record data needs to be acquired to reconstruct the model is solved, the burden of training the model by collecting the sample medical record data by workers is reduced, and the model training efficiency is improved. The embodiment of the invention is mainly applied to a scene of predicting information, and the execution subject of the embodiment of the invention is a device or equipment capable of predicting information, and the device or equipment can be specifically arranged at a client side or a server side.
Specifically, a large amount of disease information of patients is stored in a hospital database, all the disease information corresponding to each patient is correspondingly stored in the database, all the disease information diagnosed in the hospital by the patient to be predicted can be searched in the database by inputting the identity information of the patient to be predicted, and the disease information is divided and sorted according to a time sequence, for example, the disease information can be divided and sorted according to the age of the patient to be predicted, the sorted disease information is spliced to obtain spliced disease information, then an information template matched with the prediction information is determined, and a sentence to be predicted corresponding to the spliced disease information is generated according to the information template, wherein the sentence to be predicted includes prompt information corresponding to the content to be predicted, and the content to be predicted is any dimension information, finally, a preset information prediction model is used for predicting the content to be filled in the sentence to be predicted, wherein the preset information prediction model is obtained by training sample case texts which are shielded with different dimensional information, so that the problem that the trained neural network model can only predict certain information is avoided, if other information of a patient is desired to be predicted, corresponding sample case history data needs to be obtained to reconstruct the model is solved, the work load of workers is reduced, and the model training efficiency is improved.
102. Determining an information template matched with the prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled in the blank, and the content to be filled in the blank is any dimension information.
The information template may be in a complete empty form, and if the predicted information is a medicine, the information template is in the form of: x in the position of X is disease information, medical is prompt information corresponding to the content to be filled in the blank, and Z in the position of Z is the content to be filled in the blank, namely the information needing prediction in the embodiment of the invention.
For the embodiment of the present invention, after acquiring the disease information of the patient to be predicted, in order to predict the information of the patient to be predicted, first, an information template matching the prediction information needs to be determined, for example, if the information to be predicted is medicine information, the information template matching the prediction information is determined to be a medicine information template, if the information to be predicted is length of stay, the information template matching the prediction information is determined to be a length of stay, and after the information template matching the prediction information is determined, a sentence to be predicted corresponding to the disease information is generated based on the information template, where the sentence to be predicted includes prompt information corresponding to content to be filled in the space, the content to be filled in the space is arbitrary dimension information, for example, the information to be predicted is medicine recommendation information, and the disease information is cough, or the like, And (3) headache, namely, the medicine information template matched with the disease information is as follows: and [ X ] medication [ Z ], and then generating a sentence to be predicted corresponding to the disease information based on the medicine information template as follows: cough and headache, medication: [ Z ], wherein [ Z ] is to-be-filled contents in sentences to be predicted, and drug administration is prompt information corresponding to the to-be-filled contents, the prompt information is changed, the [ Z ] can be any dimension information, then the sentences to be predicted are input into a preset information prediction model to predict the to-be-filled contents, wherein the preset information prediction model is obtained by training sample case texts with different dimension information shielded, namely the preset information prediction model obtained by training once can predict different dimension information, can avoid that the trained neural network model can only predict certain information, and if other information of a patient is to be predicted, the problem that corresponding sample case history data needs to be obtained to reconstruct the model is solved, thereby reducing the problem that workers collect sample case burden data to train the model, meanwhile, the efficiency of model training is improved.
103. And predicting the contents to be filled in the sentences to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
The different-dimension information comprises medicine recommendation information, hospitalization duration information and the like, and the sample case text comprises sample disease information and corresponding medicine recommendation information, hospitalization duration information and the like.
For the embodiment of the invention, after the sentence to be predicted corresponding to the disease information is generated based on the information template, in order to predict the content to be filled in the sentence to be predicted by using the preset information prediction model, firstly, the preset information prediction model needs to be trained by using the sample case text which is shielded by different dimension information, and finally, the content to be filled in the sentence to be predicted is predicted by using the trained preset information prediction model, so that the sentence to be predicted with the content prompt information to be filled in is generated by using the disease information in the form of the information template, wherein the content to be filled in is any dimension information, and the content to be filled in the sentence to be predicted is predicted by using the preset information prediction model, wherein the preset information prediction model is trained by the sample case text which is shielded by different dimension information, therefore, the problem that the trained neural network model can only predict certain information, if other information of a patient is to be predicted, corresponding sample medical record data needs to be obtained to reconstruct the model is solved, the burden of a worker for collecting the sample medical record data to train the model is relieved, meanwhile, the model training efficiency is improved, meanwhile, when information prediction is carried out on rare diseases, because the sample medical record data corresponding to the rare diseases are less, the problem that the prediction accuracy of the model obtained by training based on the sample medical record data with a small quantity can be solved, and the accuracy of the information prediction is improved.
Compared with the mode of carrying out information prediction by adopting a neural network model constructed by sample medical record data at present, the information prediction method provided by the invention obtains the disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; finally, a preset information prediction model is used for predicting the content to be emptied in the statement to be predicted, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information, so that the statement to be predicted with prompting information of the content to be emptied is generated by disease information in the form of an information template, the content to be emptied is any dimensional information, and the content to be emptied in the statement to be predicted is predicted by using the preset information prediction model, wherein the preset information prediction model is obtained by training the sample medical record texts which are shielded with different dimensional information, so that the problem that the trained neural network model can only predict certain information, and if other information of a patient is desired to be predicted, corresponding sample medical record data needs to be obtained to reconstruct the model is avoided, the burden of training the model by collecting sample case data by workers is reduced, and the efficiency of model training is improved.
Further, in order to better describe the above process of predicting information, as a refinement and an extension of the above embodiment, an embodiment of the present invention provides another information prediction method, as shown in fig. 2, where the method includes:
201. disease information of a patient to be predicted is acquired.
For the embodiment of the invention, the disease information of the patient to be predicted is obtained by inputting the identity card number of the patient to be predicted in the disease information database of the hospital, the information template matched with the prediction information is determined, and then the sentence to be predicted corresponding to the disease information is generated according to the information template, wherein the sentence to be predicted comprises prompt information corresponding to the content to be filled with the blank, the content to be filled with the blank can be any dimension information, and finally the sentence to be predicted is input into the preset information prediction model to predict the content to be filled with the blank, wherein the preset information prediction model is obtained by training sample case texts with different dimension information shielded, so that the burden of a worker on training the model is avoided, and the efficiency of model training is improved.
202. Determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information.
For the embodiment of the present invention, after acquiring the disease information of the patient to be predicted, an information template matching with the prediction information needs to be determined, and based on this, step 202 specifically includes: and determining an information template matched with the prediction information from a preset information template table.
The preset information template table records information templates corresponding to various kinds of prediction information, such as a medicine information template, a stay time information template and the like.
For embodiments of the present invention, the prediction information corresponding to the patient to be predicted is first determined, and based on the prediction information, determining an information template matched with the prediction information in the preset information template table, constructing the disease information into a statement to be predicted with prompt information of content to be filled in blank according to the information template, wherein, based on different information templates, the content to be filled in the blank can be any dimension information, for example, the information to be predicted is a diagnosis result, the disease information is cough and fever, then the information template matching the prediction information is determined as [ X ], and the diagnosis: generating a sentence to be predicted corresponding to the disease information as' cough, fever, diagnosis: [ Z ] ", and [ Z ] is the content to be filled in the blank, and finally the statement to be predicted is input into a preset information prediction template to predict the content to be filled in the blank.
203. Determining each character contained in the statement to be predicted and an embedded vector corresponding to each character.
For the embodiment of the present invention, if the preset information prediction model is used to predict the contents to be filled in the sentence to be predicted, first, each character included in the sentence to be predicted and the latent vector corresponding to each character need to be determined, for example, the sentence to be predicted is: cough, fever, taking: and [ Z ], each character corresponding to the sentence to be predicted is cough/,/fever/,/administration/: and/Z, then converting each character in the statement to be predicted into an embedded vector by using a Word2Vec and other Word embedding method, inputting the embedded vector corresponding to each character into a preset information prediction model for semantic information extraction to obtain a semantic information vector corresponding to the statement to be predicted, and finally predicting the content to be filled with space in the statement to be predicted based on the semantic information vector.
204. And inputting the embedded vector into the preset information prediction model for semantic information extraction to obtain a semantic information vector corresponding to the statement to be predicted, wherein the preset information prediction model is obtained by training sample medical record texts with different shielded dimensional information.
The preset information prediction model may specifically be a preset bert model, where the preset bert model includes multiple encoders, each encoder is connected end to end, an output of a previous encoder is used as an input of a next encoder, and the encoder specifically includes an attention layer and a feedforward neural network layer.
For the embodiment of the present invention, in order to improve the prediction accuracy of the preset information prediction model, before the embedded vector is input into the preset information prediction model for semantic information extraction, the preset information prediction model should be trained and constructed for training, and the specific training construction method is as follows: performing word segmentation processing on the sample case text to obtain each word segmentation corresponding to the sample case text, determining a first word segmentation with a first preset number in each word segmentation, and determining a second word segmentation with a second preset number in the remaining word segmentation of each word segmentation; shielding the first participle, and replacing the second participle with characters in a preset character dictionary to obtain a processed sample medical record text; inputting the processed sample medical record text into an initial information prediction model to predict the content of a shielding part to obtain a predicted word segmentation corresponding to the first word segmentation; constructing a loss function corresponding to the initial information prediction model based on the first participle and the prediction participle; and training the initial information prediction model based on the loss function, and constructing the preset information prediction model.
Specifically, after the sample case texts are obtained, the sample case texts comprise sample disease information and prediction information with different dimensions, the sample case texts are sequenced according to a time sequence, word segmentation processing is performed on the sequenced sample case texts to obtain each word segmentation corresponding to the sample case texts, a first preset number of first word segmentation is determined in each word segmentation, for example, the first preset number can be 15% of the total number of each word segmentation, a second preset number of second word segmentation is determined in each word segmentation without the first word segmentation, then the first word segmentation is shielded, in order to prevent the content of the shielded part of an initial information prediction model and improve the prediction precision corresponding to the preset information prediction model, characters in a preset character dictionary need to be adopted to replace the second word segmentation, obtaining a processed sample case text, determining 15% of participles in the participles, determining 80% of third participles in the 15% of participles for shielding processing, determining 10% of fourth participles in the 15% of participles after removing the third participle, replacing the fourth participle with characters in a preset character dictionary, and keeping the remaining participles unchanged, for example, determining that 15% of participles in the corresponding participles of the sample case text are 'patient/60 years old/suffering from/coronary heart disease/taking/quick-acting/first-aid pill', determining that 80% of participles in the 15% participles are 'patient, suffering from, taking, quick-acting, and first-aid pill', shielding processing the 80% participles, and replacing with mask, wherein the remaining participles are '60 years old and coronary heart disease', randomly selecting '60 years' from the rest participles, replacing the '60 years' with cold in a preset character dictionary, then inputting the processed sample case text into an initial information prediction model to predict the content of a sheltered position, namely predicting the content of the mask to obtain the predicted participle at the sheltered position, and constructing a loss function corresponding to the initial information prediction model on the basis of the participle and the predicted participle at the corresponding position before sheltering, namely the first participle and the predicted participle, wherein the method for constructing the loss function corresponding to the initial information prediction model comprises the following steps: determining a first participle vector corresponding to the first participle and a second participle vector corresponding to the predicted participle; calculating vector differences at the same positions of the first word segmentation vector and the second word segmentation vector; and constructing a loss function corresponding to the initial information prediction model by calculating the sum of squares of the vector differences.
Specifically, a first participle vector corresponding to the first participle and a second participle vector corresponding to the predicted participle are respectively determined, vector differences at the same positions in the first participle vector and the second participle vector are calculated, then the vector differences are squared and summed, that is, a root mean square error corresponding to the initial information prediction model is calculated, and a loss function corresponding to the initial information prediction model is constructed by calculating the root mean square error, wherein a formula for specifically calculating the root mean square error is as follows:
wherein Z represents the root mean square error, u1、u2....urRepresenting a first word-dividing vector, v1、v2....vrAnd representing a second word segmentation vector, wherein r represents the number corresponding to the first word segmentation vector, after a loss function corresponding to the initial information prediction model is constructed according to the formula, the initial information prediction model is trained based on the loss function until a minimum loss function value appears, and the preset information prediction model, namely the preset encoder in the embodiment of the invention, is constructed based on the model parameter corresponding to the minimum loss function value, and the preset information prediction model is used for predicting the contents to be filled in the sentence to be predicted.
Further, after the preset information prediction model is constructed, in order to extract the semantic information vector corresponding to the sentence to be predicted, step 204 specifically includes: inputting the embedded vector to the attention layer for feature extraction to obtain a first feature vector corresponding to each character; adding the first feature vector and the embedded vector to obtain a second feature vector corresponding to each character; and inputting the second feature vector to the feedforward neural network layer for feature extraction to obtain a semantic information vector corresponding to the statement to be predicted.
The first feature vector is an output vector of an attention layer, and the semantic information vector corresponding to the statement to be predicted is an output vector of a feedforward neural network layer of a last encoder.
Specifically, in the process of extracting semantic information vectors corresponding to a to-be-predicted statement by using a preset BERT model, firstly, an embedded vector corresponding to each character is input to an attention layer of a first encoder in the preset BERT model to perform feature extraction, so as to obtain an output vector of the attention layer, that is, a first feature vector corresponding to each character, wherein the specific process of performing feature extraction in the attention layer is as follows: determining a query vector, a key vector and a value vector corresponding to each character according to the embedded vector corresponding to each character; multiplying a query vector corresponding to a target character in each character by a key vector corresponding to each character to obtain the attention score of each character for the target character; and multiplying and summing the attention scores corresponding to the characters and the value vectors to obtain a first feature vector corresponding to the target character.
For the embodiment of the present invention, in the process of obtaining the first feature vector corresponding to each character, the embedded vector corresponding to each character in the sentence to be predicted may be multiplied by the weight matrix corresponding to the attention layer in the preset BERT model to obtain the query vector, the key vector, and the value vector corresponding to each character, further, the attention score corresponding to each character may need to be calculated, when calculating the attention score corresponding to any character (target character) in each character, each character in the sentence to be predicted needs to be used to score the target character, specifically, the query vector corresponding to the target character is multiplied by the key vector corresponding to each character to obtain the score value of each character to the target character, that is, the attention score value, and then the attention score and the value vector corresponding to each character are multiplied together to finally obtain the attention layer output vector corresponding to the target character, namely, the first feature vector corresponding to the target character, so that the first feature vector corresponding to each character can be determined in the above manner, so as to obtain the semantic information vector corresponding to the statement to be predicted by using the first feature vector corresponding to each character.
Further, in order to obtain the semantic information vector corresponding to the to-be-predicted sentence, after the embedded vector corresponding to each character in the to-be-predicted sentence is input to the attention layer of the first encoder, and the first feature vector corresponding to each character is extracted, the first feature vector and the embedded vector corresponding to each character need to be added to obtain the second feature vector corresponding to each character, and the second feature vector is input to the feedforward neural network layer of the first encoder for feature extraction, so as to obtain the output vector of the first encoder, because the preset BERT model in the embodiment of the present invention includes a plurality of encoders, and a head-to-tail series connection manner is adopted among the plurality of encoders, the output vector of the first encoder is input to the second encoder for feature extraction, so as to obtain the output vector of the second encoder, so as to use the output vector of the previous encoder as the input vector of the next encoder, and finally, determining the output vector of the last encoder as a semantic information vector corresponding to the statement to be predicted, and then inputting the semantic information necklace into a prediction classifier for classification to obtain the content to be filled in the statement to be predicted.
205. And inputting the semantic information vector into a preset classifier for classification to obtain the contents to be filled in the sentence to be predicted.
For the embodiment of the present invention, after obtaining the semantic information vector corresponding to the statement to be predicted, in order to predict the content to be filled in the statement to be predicted according to the semantic information vector, step 205 specifically includes: inputting the semantic information vector into the preset classifier for classification to obtain probability values of different filling contents corresponding to the statement to be predicted; and determining a maximum probability value in the probability values, and determining the filling content corresponding to the maximum probability value as the filling content to be predicted in the statement to be predicted.
The preset classifier may be specifically a preset multilayer perceptron, and the preset multilayer perceptron includes an input layer, a hidden layer and an output layer.
Specifically, after determining a semantic information vector corresponding to a sentence to be predicted, inputting the semantic information vector into a hidden layer through an input layer of a preset multilayer perceptron, wherein the result output through the hidden layer is as follows:
f(W1x+b1)
wherein x is a semantic information vector corresponding to the statement to be predicted, and W1For the weight of the hidden layer, the connection coefficient of the multilayer perceptron is also preset, b1Biasing for hidden layersThe coefficient, f function may generally adopt sigmoid function or tanh function as follows:
sigmoid(x)=1/(1+e-x)
tanh(x)=(ex-e-x)/(ex+e-x)
further, after the semantic information vector corresponding to the sentence to be predicted is input to the hidden layer through the input layer of the preset multilayer perceptron, and the result output by the hidden layer is obtained, the result is input to the output layer, and classification is performed through the output layer, and the obtained classification result is:
softmax(W2f(W1x+b1)+b2)
wherein, W2As weight coefficients of the output layer, b2And for the bias coefficient of an output layer, the probability values of different blank filling contents corresponding to the statement to be predicted can be output by presetting the output layer of the multilayer perceptron, the maximum probability value is determined in the probability values, and finally the blank filling content corresponding to the maximum probability value is determined as the blank filling content in the statement to be predicted.
According to another information prediction method provided by the invention, compared with the mode of performing information prediction by adopting a neural network model constructed by sample medical record data at present, the method obtains the disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; finally, a preset information prediction model is used for predicting the content to be emptied in the statement to be predicted, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information, so that the statement to be predicted with prompting information of the content to be emptied is generated by disease information in the form of an information template, the content to be emptied is any dimensional information, and the content to be emptied in the statement to be predicted is predicted by using the preset information prediction model, wherein the preset information prediction model is obtained by training the sample medical record texts which are shielded with different dimensional information, so that the problem that the trained neural network model can only predict certain information, and if other information of a patient is desired to be predicted, corresponding sample medical record data needs to be obtained to reconstruct the model is avoided, the burden of training the model by collecting sample case data by workers is reduced, and the efficiency of model training is improved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides an information prediction apparatus, as shown in fig. 3, the apparatus includes: an acquisition unit 31, a generation unit 32, and a prediction unit 33.
The obtaining unit 31 may be configured to obtain disease information of a patient to be predicted.
The generating unit 32 may be configured to determine an information template matched with prediction information, and generate a to-be-predicted statement corresponding to the disease information according to the information template, where the to-be-predicted statement includes prompt information corresponding to-be-filled content, and the to-be-filled content is any dimension information.
The prediction unit 33 may be configured to predict the content to be filled in the sentence to be predicted by using a preset information prediction model, where the preset information prediction model is obtained by training a sample medical record text that is shielded with different dimensional information.
In a specific application scenario, in order to predict the content to be filled in the sentence to be predicted, as shown in fig. 4, the prediction unit 33 includes a first determining module 331, an extracting module 332, and a classifying module 333.
The first determining module 331 may be configured to determine each character included in the statement to be predicted and an embedded vector corresponding to each character.
The extracting module 332 may be configured to input the embedded vector into the preset information prediction model to perform semantic information extraction, so as to obtain a semantic information vector corresponding to the to-be-predicted statement.
The classification module 333 may be configured to input the semantic information vector into a preset classifier for classification, so as to obtain the content to be filled in the sentence to be predicted.
In a specific application scenario, in order to extract the semantic information vector corresponding to the statement to be predicted, the extraction module 332 includes an extraction sub-module and an addition sub-module.
The extraction sub-module may be configured to input the embedded vector to the attention layer to perform feature extraction, so as to obtain a first feature vector corresponding to each character.
The adding submodule may be configured to add the first feature vector and the embedded vector to obtain a second feature vector corresponding to each character.
The extraction submodule may be configured to input the second feature vector to the feedforward neural network layer to perform feature extraction, so as to obtain a semantic information vector corresponding to the to-be-predicted statement.
In a specific application scenario, in order to construct a preset information prediction model, the apparatus further includes: a word segmentation unit 34, a processing unit 35 and a construction unit 36.
The word segmentation unit 34 may be configured to perform word segmentation on the sample case text to obtain each word segmentation corresponding to the sample case text, determine a first word segmentation with a first preset number in each word segmentation, and determine a second word segmentation with a second preset number in remaining word segmentation of each word segmentation.
The processing unit 35 may be configured to perform occlusion processing on the first segmentation word, and replace the second segmentation word with a character in a preset character dictionary to obtain a processed sample medical record text.
The prediction unit 33 may be further configured to input the processed sample medical record text into an initial information prediction model to predict content at a shielding position, so as to obtain a predicted participle corresponding to the first participle.
The constructing unit 36 may be configured to construct a loss function corresponding to the initial information prediction model based on the first participle and the prediction participle.
The constructing unit 36 may be specifically configured to train the initial information prediction model based on the loss function, and construct the preset information prediction model.
In a specific application scenario, in order to construct a loss function corresponding to the initial information prediction model, the constructing unit 36 includes a second determining module 361, a calculating module 362, and a constructing module 363.
The second determining module 361 may be configured to determine a first participle vector corresponding to the first participle and a second participle vector corresponding to the predicted participle.
The calculating module 362 may be configured to calculate respective vector differences at the same positions of the first word segmentation vector and the second word segmentation vector.
The constructing module 363 may be configured to construct a loss function corresponding to the initial information prediction model by calculating a sum of squares of the vector differences.
In a specific application scenario, in order to obtain content to be filled in a sentence to be predicted, the classification module 333 includes a classification sub-module and a determination sub-module.
The classification submodule may be configured to input the semantic information vector into the preset classifier to perform classification, so as to obtain probability values of different gap filling contents corresponding to the sentence to be predicted.
The determining submodule may be configured to determine a maximum probability value in the probability values, and determine the blank filling content corresponding to the maximum probability value as the blank filling content in the sentence to be predicted.
In a specific application scenario, in order to determine an information template matching the disease information, the generating unit 32 may be specifically configured to determine an information template matching the prediction information from a preset information template table.
It should be noted that other corresponding descriptions of the functional modules related to the information prediction apparatus provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: acquiring disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 3, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 5, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 such that when the processor 41 executes the program, the following steps are performed: acquiring disease information of a patient to be predicted; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
According to the technical scheme, the disease information of the patient to be predicted is obtained; determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information; finally, a preset information prediction model is used for predicting the content to be emptied in the statement to be predicted, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information, so that the statement to be predicted with prompting information of the content to be emptied is generated by disease information in the form of an information template, the content to be emptied is any dimensional information, and the content to be emptied in the statement to be predicted is predicted by using the preset information prediction model, wherein the preset information prediction model is obtained by training the sample medical record texts which are shielded with different dimensional information, so that the problem that the trained neural network model can only predict certain information, and if other information of a patient is desired to be predicted, corresponding sample medical record data needs to be obtained to reconstruct the model is avoided, the burden of training the model by collecting sample case data by workers is reduced, and the efficiency of model training is improved.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. An information prediction method, comprising:
acquiring disease information of a patient to be predicted;
determining an information template matched with prediction information, and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted contains prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
2. The method according to claim 1, wherein the predicting the content to be filled in the sentence to be predicted by using the preset information prediction model comprises:
determining each character contained in the statement to be predicted and an embedded vector corresponding to each character;
inputting the embedded vector into the preset information prediction model for semantic information extraction to obtain a semantic information vector corresponding to the statement to be predicted;
and inputting the semantic information vector into a preset classifier for classification to obtain the contents to be filled in the sentence to be predicted.
3. The method according to claim 2, wherein the preset information prediction model is a preset encoder, the preset encoder includes an attention layer and a feedforward neural network layer, and the inputting the embedded vector into the preset information prediction model for semantic information extraction to obtain a semantic information vector corresponding to the sentence to be predicted includes:
inputting the embedded vector to the attention layer for feature extraction to obtain a first feature vector corresponding to each character;
adding the first feature vector and the embedded vector to obtain a second feature vector corresponding to each character;
and inputting the second feature vector to the feedforward neural network layer for feature extraction to obtain a semantic information vector corresponding to the statement to be predicted.
4. The method according to claim 1, wherein before the predicting the content to be filled in the sentence to be predicted by using the preset information prediction model, the method further comprises:
performing word segmentation processing on the sample case text to obtain each word segmentation corresponding to the sample case text, determining a first word segmentation with a first preset number in each word segmentation, and determining a second word segmentation with a second preset number in the remaining word segmentation of each word segmentation;
shielding the first participle, and replacing the second participle with characters in a preset character dictionary to obtain a processed sample medical record text;
inputting the processed sample medical record text into an initial information prediction model to predict the content of a shielding part to obtain a predicted word segmentation corresponding to the first word segmentation;
constructing a loss function corresponding to the initial information prediction model based on the first participle and the prediction participle;
and training the initial information prediction model based on the loss function, and constructing the preset information prediction model.
5. The method of claim 4, wherein constructing the loss function corresponding to the initial information prediction model based on the first participle and the predicted participle comprises:
determining a first participle vector corresponding to the first participle and a second participle vector corresponding to the predicted participle;
calculating vector differences at the same positions of the first word segmentation vector and the second word segmentation vector;
and constructing a loss function corresponding to the initial information prediction model by calculating the sum of squares of the vector differences.
6. The method according to claim 2, wherein the inputting the semantic information vector into a preset classifier for classification to obtain the content to be filled in the sentence to be predicted comprises:
inputting the semantic information vector into the preset classifier for classification to obtain probability values of different filling contents corresponding to the statement to be predicted;
and determining a maximum probability value in the probability values, and determining the filling content corresponding to the maximum probability value as the filling content to be predicted in the statement to be predicted.
7. The method of claim 1, wherein determining an information template that matches the prediction information comprises:
and determining an information template matched with the prediction information from a preset information template table.
8. An information prediction apparatus, comprising:
an acquisition unit for acquiring disease information of a patient to be predicted;
the generating unit is used for determining an information template matched with the prediction information and generating a statement to be predicted corresponding to the disease information according to the information template, wherein the statement to be predicted comprises prompt information corresponding to content to be filled with gaps, and the content to be filled with gaps is any dimension information;
and the prediction unit is used for predicting the content to be filled in the sentence to be predicted by using a preset information prediction model, wherein the preset information prediction model is obtained by training sample medical record texts which are shielded with different dimensional information.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program realizes the steps of the method of any of claims 1 to 7 when executed by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210233050.9A CN114627993A (en) | 2022-03-09 | 2022-03-09 | Information prediction method, information prediction device, storage medium and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210233050.9A CN114627993A (en) | 2022-03-09 | 2022-03-09 | Information prediction method, information prediction device, storage medium and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114627993A true CN114627993A (en) | 2022-06-14 |
Family
ID=81899713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210233050.9A Pending CN114627993A (en) | 2022-03-09 | 2022-03-09 | Information prediction method, information prediction device, storage medium and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114627993A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116562266A (en) * | 2023-07-10 | 2023-08-08 | 中国医学科学院北京协和医院 | Text analysis method, computer device, and computer-readable storage medium |
-
2022
- 2022-03-09 CN CN202210233050.9A patent/CN114627993A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116562266A (en) * | 2023-07-10 | 2023-08-08 | 中国医学科学院北京协和医院 | Text analysis method, computer device, and computer-readable storage medium |
CN116562266B (en) * | 2023-07-10 | 2023-09-15 | 中国医学科学院北京协和医院 | Text analysis method, computer device, and computer-readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109599185B (en) | Disease data processing method and device, electronic equipment and computer readable medium | |
US9165116B2 (en) | Patient data mining | |
CN109637669B (en) | Deep learning-based treatment scheme generation method, device and storage medium | |
CN111986770A (en) | Prescription medication auditing method, device, equipment and storage medium | |
CN110534185B (en) | Labeling data acquisition method, triage device, storage medium and equipment | |
CN110427486B (en) | Body condition text classification method, device and equipment | |
CN113707307A (en) | Disease analysis method and device, electronic equipment and storage medium | |
CN110827941A (en) | Electronic medical record information correction method and system | |
CN112885478A (en) | Medical document retrieval method, medical document retrieval device, electronic device, and storage medium | |
CN115497616A (en) | Method, system, equipment and storage medium for aid decision making of infectious diseases | |
WO2023178970A1 (en) | Medical data processing method, apparatus and device, and storage medium | |
CN116884612A (en) | Intelligent analysis method, device, equipment and storage medium for disease risk level | |
CN114420279A (en) | Medical resource recommendation method, device, equipment and storage medium | |
CN114783603A (en) | Multi-source graph neural network fusion-based disease risk prediction method and system | |
CN115995281A (en) | Data retrieval method and device of disease-specific database based on data management | |
CN112635072A (en) | ICU (intensive care unit) similar case retrieval method and system based on similarity calculation and storage medium | |
CN117711600A (en) | LLM model-based electronic medical record question-answering system | |
CN117292783A (en) | Medical image report generating system | |
CN111415760A (en) | Doctor recommendation method, system, computer equipment and storage medium | |
US20240221949A1 (en) | Systems and Methods for Machine Learning From Medical Records | |
CN113066531B (en) | Risk prediction method, risk prediction device, computer equipment and storage medium | |
CN114627993A (en) | Information prediction method, information prediction device, storage medium and computer equipment | |
CN113657086A (en) | Word processing method, device, equipment and storage medium | |
CN113643825A (en) | Medical case knowledge base construction method and system based on clinical key characteristic information | |
CN116522944A (en) | Picture generation method, device, equipment and medium based on multi-head attention |
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 |