Early gestational diabetes prediction method and device, computer equipment and storage medium
Through the analysis of deep learning algorithms and DNA sequencing results, a deep learning classification model was constructed, which solved the problem of difficulty in accurately predicting gestational diabetes in the early stage of pregnancy in the prior art, and achieved high-accuracy early prediction and timely intervention.
Patent Information
- Application Number
- CN202411872146.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-22
AI Technical Summary
The prior art is difficult to accurately predict gestational diabetes in the early stages of pregnancy, resulting in timely intervention.
Deep learning algorithm is used to build a sample matrix by obtaining DNA sequencing results, training a deep learning classification model, and predicting the probability of early gestational diabetes.
High accuracy prediction of early gestational diabetes is achieved, which can provide timely intervention in the early stage of pregnancy and improve health risk assessments for pregnant women and fetus.
Smart Images

Figure CN119864160A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, device, computer equipment and storage medium for predicting early gestational diabetes. Background Art
[0002] Pregnancy-related diseases refer to various health problems that occur during pregnancy, especially diseases such as gestational diabetes, which have become a serious public health challenge worldwide. Pregnancy-related diseases not only threaten the health of pregnant women, but may also lead to serious consequences such as fetal growth restriction, premature birth, and even death.
[0003] Currently, the detection of pregnancy diseases mainly relies on routine clinical examinations and laboratory tests. Although these detection methods can help doctors identify potential problems to a certain extent, they still have many limitations. In particular, more accurate screening for gestational diabetes can only be performed in the second and third trimesters of pregnancy, and it is difficult to identify it in the early stages, so timely intervention is not possible in the early stages.
[0004] It can be seen that in the prior art, there is still a lack of methods for early prediction of gestational diabetes. Summary of the invention
[0005] In order to solve the above technical problem or at least partially solve the above technical problem, the present invention provides a method, apparatus, computer equipment and storage medium for predicting early gestational diabetes.
[0006] In a first aspect, the present invention provides a method for predicting early gestational diabetes, the method comprising:
[0007] Get the original sample and initial model;
[0008] Acquire training samples according to the original samples, wherein the training samples are bam files, and each bam file includes: DNA sequencing results of the samples;
[0009] According to the bam file, obtain a sample matrix;
[0010] Using the sample matrix to train the initial model to obtain a deep learning classification model;
[0011] According to the deep learning classification model, the probability of early gestational diabetes is obtained.
[0012] In the embodiment of the present invention, obtaining the probability of early gestational diabetes according to the deep learning classification model includes:
[0013] Obtain samples to be predicted;
[0014] According to the learning classification model, obtaining the classification corresponding to the sample to be predicted;
[0015] According to the corresponding classification, obtain a corresponding importance score;
[0016] The importance score is used to indicate the probability of early gestational diabetes in the sample to be predicted.
[0017] In the embodiment of the present invention, the training samples include experimental samples and control samples;
[0018] The step of obtaining a sample matrix according to the bam file includes:
[0019] According to the bam file, obtaining the sequencing coverage of each genome in the DNA sequencing results of the sample;
[0020] According to the sequencing coverage, extracting the optimal sequencing depth of each genome in the DNA sequencing results of the sample by a dynamic programming algorithm;
[0021] Constructing a feature vector, wherein the feature vector is composed of the optimal sequencing depth of each genome;
[0022] Construct the initial sample matrix;
[0023] Performing standardization processing on the initial sample matrix to obtain a standard sample matrix;
[0024] The initial sample matrix includes an initial experimental sample matrix and an initial control sample matrix, and the standard sample matrix includes a standard experimental sample matrix and a standard control sample matrix.
[0025] The initial experimental sample matrix is a matrix composed of the eigenvectors corresponding to all experimental samples, and the initial control sample matrix is a matrix composed of the eigenvectors corresponding to all control samples.
[0026] In the embodiment of the present invention, the optimal sequencing depth of each genome in the DNA sequencing results of the sample is extracted by a dynamic programming algorithm, as follows:
[0027] D(i)=max(D(i-1)+C(i),D(ik)+C(ik),…)
[0028] Wherein, D(i) represents the optimal sequencing depth of the genome at position i, and C(i) represents the sequencing coverage of the genome at position i.
[0029] In the embodiment of the present invention, the initial sample matrix is standardized to obtain a standard sample matrix in the following manner:
[0030] Zij=(Vij-μj) / σj
[0031]
[0032] Among them, Zij represents the Z-score value of the i-th sample of the standard sample matrix on the j-th feature, Vij represents the original value of the i-th sample of the standard sample matrix on the j-th feature, μj represents the mean of the j-th feature of the standard sample matrix, σj represents the standard deviation of the j-th feature of the standard sample matrix, and N is the total number of standard samples in the standard sample matrix.
[0033] In an embodiment of the present invention, the deep learning classification model includes:
[0034] Input layer, used to receive samples to be predicted;
[0035] An embedding layer, used for mapping the sample to be predicted from discrete depth features to continuous space according to a mapping formula;
[0036] CNN convolutional layer, used to perform convolution according to the convolution formula;
[0037] A bidirectional long short-term memory layer, including a forward LSTM and a backward LSTM, wherein the forward LSTM is used to learn sequence information from the past to the future, and the backward LSTM is used to capture information from the future to the past;
[0038] Attention layer, used to capture important feature windows;
[0039] A fully connected layer, used for connecting various layers of the deep learning classification model;
[0040] Wherein, the mapping formula is:
[0041] y=E(x)
[0042] E∈R (V×d)
[0043] The convolution formula is:
[0044]
[0045] The attention weight α of the attention layer is:
[0046] α=softmax(w T tanh(W a ·H T +b a ))
[0047] The context vector v of the attention layer is:
[0048]
[0049] The output function of the fully connected layer is:
[0050] z=softmax(W f ·v+b f )
[0051] Among them, x is the sample to be predicted, E is the deep learning matrix, R represents the mapping space, y is the output embedding vector, V is the deep learning matrix dimension, d is the embedding dimension, C i is the output feature map of the convolutional layer, W j is the parameter of deep learning, E i is the i-th element of the input sequence, k is the size of the convolution kernel, b is the first bias term, α is the attention weight, softmax is a fixed function, and w T is the transpose of the attention layer weight vector, tanh is the hyperbolic tangent activation function, W a is the weight matrix of the attention layer, H T is the transpose of the attention layer input sequence, b a is the bias term of the attention layer, α t is the attention weight with timestamp, H t is the timestamped representation of the input sequence, W f is the weight matrix of the fully connected output layer, b f is the bias term of the output layer, and z is the output function of the fully connected layer.
[0052] In the embodiment of the present invention, in the bidirectional long short-term memory layer, the forward LSTM is:
[0053] h ft =LSTM f (C t ,h ft -1)
[0054] The backward LSTM is:
[0055] h bt =LSTM b (C t ,h bt +1)
[0056] The output of the bidirectional long short-term memory layer is:
[0057] H=[h f ;h b ]
[0058] The LSTM is:
[0059] i t =σ(W i ·[h t -1,x t ]+b i )
[0060] f t =σ(W f ·[h t -1,x t ]+b f )
[0061] o t =σ(W o ·[ht-1,x t ]+b o )
[0062]
[0063] h t =o t *tanh(c t )
[0064] Among them, h ft represents the hidden state of the forward LSTM at time step t, C t is the input state, h bt represents the hidden state of the backward LSTM at time step t, h f represents the hidden state sequence of all time steps of the forward LSTM, h b represents the hidden state sequence of all time steps of the backward LSTM, i t is the LSTM input gate, σ is the sigmoid activation function, h t is the hidden state, x t is the input matrix, b i is the second bias term, f t is the LSTM forget gate parameter, W f is the weight matrix, b f is the bias term of the output layer, o t is the LSTM output gate, b o is the third bias term, is the candidate input matrix state, tanh is the hyperbolic tangent activation function, W c is the weight matrix, b c is the fourth bias term.
[0065] In a second aspect, a device for predicting early gestational diabetes is provided, the device comprising:
[0066] A model building unit, used to obtain original samples and initial models;
[0067] A sample acquisition unit, used to acquire a training sample according to the original sample, wherein the training sample is a bam file, and each bam file includes: a DNA sequencing result of the sample;
[0068] The sample acquisition unit is also used to acquire a sample matrix according to the bam file;
[0069] A model training unit, used to train the initial model using the sample matrix to obtain a deep learning classification model;
[0070] A prediction unit is used to obtain the probability of early gestational diabetes according to the deep learning classification model.
[0071] According to a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above methods when executing the computer program.
[0072] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the method as described in any one of the above items is implemented.
[0073] The present invention provides a method, device, computer equipment and storage medium for predicting early gestational diabetes, the method comprising: obtaining original samples and an initial model; obtaining training samples according to the original samples, the training samples being bam files, each of the bam files comprising: DNA sequencing results of the sample; obtaining a sample matrix according to the bam file; training the initial model using the sample matrix to obtain a deep learning classification model; obtaining the probability of early gestational diabetes according to the deep learning classification model. The present invention can achieve the prediction of early gestational diabetes. The present invention adopts a deep learning algorithm, which enables the deep information of different regions to be flexibly processed when analyzing the genome, rather than relying on traditional window division, with higher precision and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0076] Figure 1 This is an application environment diagram of the early gestational diabetes prediction method according to an embodiment of the present invention;
[0077] Figure 2 Schematic diagram of the process of predicting early gestational diabetes mellitus according to an embodiment of the present invention;
[0078] Figure 3 is a structural block diagram of a device for predicting early gestational diabetes according to an embodiment of the present invention;
[0079] Figure 4 1 is a diagram showing the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0080] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] Figure 1 FIG. 1 is an application environment diagram of a method for predicting early gestational diabetes in an embodiment. Figure 1 , the early gestational diabetes prediction method is applied to the early gestational diabetes prediction system. The early gestational diabetes prediction method includes a terminal 110 and / or a server 120. The terminal 110 and the server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, and the mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 can be implemented as an independent server or a server cluster composed of multiple servers.
[0082] The method for predicting early gestational diabetes mellitus of the present invention is applied to the terminal 110 and / or the server 120 .
[0083] Figure 2 FIG. 1 is a flow chart of a method for predicting early gestational diabetes according to an embodiment of the present invention. Figure 2 As shown, the method includes:
[0084] Step 210, obtaining original samples and initial models;
[0085] Step 220, obtaining training samples according to the original samples, wherein the training samples are bam files, and each of the bam files includes: DNA sequencing results of the samples;
[0086] Step 230, obtaining a sample matrix according to the bam file;
[0087] Step 240, using the sample matrix to train the initial model to obtain a deep learning classification model;
[0088] Step 250: Obtain the probability of early gestational diabetes based on the deep learning classification model.
[0089] BAM (Binary compressed SAM Format) is one of the commonly used file formats in the field of bioinformatics and is widely used in bioinformatics analysis. BAM files have a smaller storage space.
[0090] In the embodiment of the present invention, obtaining the probability of early gestational diabetes according to the deep learning classification model includes:
[0091] Obtain samples to be predicted;
[0092] According to the learning classification model, obtaining the classification corresponding to the sample to be predicted;
[0093] According to the corresponding classification, obtain a corresponding importance score;
[0094] The importance score is used to indicate the probability of early gestational diabetes in the sample to be predicted.
[0095] In an embodiment of the present invention, the model used for prediction is a deep learning classification model, which adopts a deep learning algorithm. This makes it possible to flexibly process the depth information of different regions when analyzing the genome, rather than relying on traditional window division, with higher precision and accuracy.
[0096] In the embodiment of the present invention, the training samples include experimental samples and control samples;
[0097] The step of obtaining a sample matrix according to the bam file includes:
[0098] According to the bam file, obtaining the sequencing coverage of each genome in the DNA sequencing results of the sample;
[0099] According to the sequencing coverage, extracting the optimal sequencing depth of each genome in the DNA sequencing results of the sample by a dynamic programming algorithm;
[0100] Constructing a feature vector, wherein the feature vector is composed of the optimal sequencing depth of each genome;
[0101] Construct the initial sample matrix;
[0102] Performing standardization processing on the initial sample matrix to obtain a standard sample matrix;
[0103] The initial sample matrix includes an initial experimental sample matrix and an initial control sample matrix, and the standard sample matrix includes a standard experimental sample matrix and a standard control sample matrix.
[0104] The initial experimental sample matrix is a matrix composed of the eigenvectors corresponding to all experimental samples, and the initial control sample matrix is a matrix composed of the eigenvectors corresponding to all control samples.
[0105] In the embodiment of the present invention, the optimal sequencing depth of each genome in the DNA sequencing results of the sample is extracted by a dynamic programming algorithm, as follows:
[0106] D(i)=max(D(i-1)+C(i),D(ik)+C(ik),…)
[0107] Wherein, D(i) represents the optimal sequencing depth of the genome at position i, and C(i) represents the sequencing coverage of the genome at position i.
[0108] This formula shows that when calculating the optimal depth of position i, the optimal depths of the previous multiple positions plus the coverage of the current position can be selected to effectively capture the structural variation region.
[0109] In the embodiment of the present invention, the initial sample matrix is standardized to obtain a standard sample matrix in the following manner:
[0110] Zij=(Vij-μj) / σj
[0111]
[0112] Among them, Zij represents the Z-score value of the i-th sample of the standard sample matrix on the j-th feature, Vij represents the original value of the i-th sample of the standard sample matrix on the j-th feature, μj represents the mean of the j-th feature of the standard sample matrix, σj represents the standard deviation of the j-th feature of the standard sample matrix, and N is the total number of standard samples in the standard sample matrix.
[0113] In an embodiment of the present invention, the deep learning classification model includes:
[0114] Input layer, used to receive samples to be predicted;
[0115] An embedding layer, used for mapping the sample to be predicted from discrete depth features to continuous space according to a mapping formula;
[0116] CNN convolutional layer, used to perform convolution according to the convolution formula;
[0117] A bidirectional long short-term memory layer, including a forward LSTM and a backward LSTM, wherein the forward LSTM is used to learn sequence information from the past to the future, and the backward LSTM is used to capture information from the future to the past;
[0118] Attention layer, used to capture important feature windows;
[0119] A fully connected layer, used for connecting various layers of the deep learning classification model;
[0120] Wherein, the mapping formula is:
[0121] y=E(x)
[0122] E∈R (V×d)
[0123] The convolution formula is:
[0124]
[0125] The attention weight α of the attention layer is:
[0126] α=softmax(w T tanh(W a ·H T +b a ))
[0127] The context vector v of the attention layer is:
[0128]
[0129] The output function of the fully connected layer is:
[0130] z=softmax(W f ·v+b f )
[0131] Among them, x is the sample to be predicted, E is the deep learning matrix, R represents the mapping space, y is the output embedding vector, V is the deep learning matrix dimension, d is the embedding dimension, C i is the output feature map of the convolutional layer, W j is the parameter of deep learning, E i is the i-th element of the input sequence, k is the size of the convolution kernel, b is the first bias term, α is the attention weight, softmax is a fixed function, and w T is the transpose of the attention layer weight vector, tanh is the hyperbolic tangent activation function, W a is the weight matrix of the attention layer, H T is the transpose of the attention layer input sequence, b a is the bias term of the attention layer, α t is the attention weight with timestamp, H t is the timestamped representation of the input sequence, W f is the weight matrix of the fully connected output layer, b f is the bias term of the output layer, and z is the output function of the fully connected layer.
[0132] In the embodiment of the present invention, in the bidirectional long short-term memory layer, the forward LSTM is:
[0133] h ft =LSTM f (C t ,h ft -1)
[0134] The backward LSTM is:
[0135] h bt =LSTM b (C t ,h bt +1)
[0136] The output of the bidirectional long short-term memory layer is:
[0137] H=[h f ;h b ]
[0138] The LSTM is:
[0139] i t =σ(W i ·[h t -1,x t ]+b i )
[0140] f t =σ(W f ·[h t -1,x t ]+b f )
[0141] o t =σ(W o ·[ht-1,x t ]+b o )
[0142]
[0143] h t =o t *tanh(c t )
[0144] Among them, h ft represents the hidden state of the forward LSTM at time step t, C t is the input state, h bt represents the hidden state of the backward LSTM at time step t, h f represents the hidden state sequence of all time steps of the forward LSTM, h b represents the hidden state sequence of all time steps of the backward LSTM, it is the LSTM input gate, σ is the sigmoid activation function, h t is the hidden state, x t is the input matrix, b i is the second bias term, f t is the LSTM forget gate parameter, W f is the weight matrix, b f is the bias term of the output layer, o t is the LSTM output gate, b o is the third bias term, is the candidate input matrix state, tanh is the hyperbolic tangent activation function, W c is the weight matrix, b c is the fourth bias term.
[0145] In the embodiment of the present invention, prediction can actually be considered as a classification problem. In the embodiment of the present invention, the depth matrix V is annotated, all experimental samples are encoded as 1, and all control samples are encoded as 0, so as to constitute a binary classification problem for the control and reference samples based on the genome sequencing depth matrix. In the embodiment of the present invention, a deep neural network based on CNN is constructed to realize the classifier. At the same time, in order to extract the most important window area for binary classification in the model to realize the construction of downstream gene regions and libraries, the embodiment of the present invention adds a bidirectional long short-term memory network model based on the attention mechanism to the network architecture. For sequence data, the model can effectively capture the long dependencies between sequences and identify the window areas that are important for classification through the attention mechanism. The deep learning classification model structure of the embodiment of the present invention combines CNN, BiLSTM and attention mechanism, which can effectively process integer matrix input and identify important features in binary classification tasks. In the embodiment of the present invention, the deep learning classification model can determine which genomic windows are more important to the probability of gestational diabetes in the group, so as to realize the prediction of early gestational diabetes and facilitate the timely intervention of early gestational diabetes.
[0146] The embodiment of the present invention also provides a device for predicting early gestational diabetes. Figure 3 As shown, the device comprises:
[0147] A model building unit 310 is used to obtain original samples and an initial model;
[0148] The sample acquisition unit 320 is used to acquire a training sample according to the original sample, wherein the training sample is a bam file, and each bam file includes: a DNA sequencing result of the sample;
[0149] The sample acquisition unit 320 is also used to acquire a sample matrix according to the bam file;
[0150] A model training unit 330 is used to train the initial model using the sample matrix to obtain a deep learning classification model;
[0151] The prediction unit 340 is used to obtain the probability of early gestational diabetes according to the deep learning classification model.
[0152] In the embodiment of the present invention, the prediction unit 340 is further configured to:
[0153] Obtain samples to be predicted;
[0154] According to the learning classification model, obtaining the classification corresponding to the sample to be predicted;
[0155] According to the corresponding classification, obtain a corresponding importance score;
[0156] The importance score is used to indicate the probability of early gestational diabetes in the sample to be predicted.
[0157] In the embodiment of the present invention, the training samples include experimental samples and control samples;
[0158] The sample acquisition unit 320 is further used for:
[0159] According to the bam file, obtaining the sequencing coverage of each genome in the DNA sequencing results of the sample;
[0160] According to the sequencing coverage, extracting the optimal sequencing depth of each genome in the DNA sequencing results of the sample by a dynamic programming algorithm;
[0161] Constructing a feature vector, wherein the feature vector is composed of the optimal sequencing depth of each genome;
[0162] Construct the initial sample matrix;
[0163] Performing standardization processing on the initial sample matrix to obtain a standard sample matrix;
[0164] The initial sample matrix includes an initial experimental sample matrix and an initial control sample matrix, and the standard sample matrix includes a standard experimental sample matrix and a standard control sample matrix.
[0165] The initial experimental sample matrix is a matrix composed of the eigenvectors corresponding to all experimental samples, and the initial control sample matrix is a matrix composed of the eigenvectors corresponding to all control samples.
[0166] In the embodiment of the present invention, the sample acquisition unit 320 is further used to extract the optimal sequencing depth of each genome in the DNA sequencing result of the sample by a dynamic programming algorithm in the following manner:
[0167] D(i)=max(D(i-1)+C(i),D(ik)+C(ik),…)
[0168] Wherein, D(i) represents the optimal sequencing depth of the genome at position i, and C(i) represents the sequencing coverage of the genome at position i.
[0169] In the embodiment of the present invention, the sample acquisition unit 320 is further configured to perform standardization processing on the initial sample matrix to obtain a standard sample matrix in the following manner:
[0170] Zij=(Vij-μj) / σj
[0171]
[0172] Among them, Zij represents the Z-score value of the i-th sample of the standard sample matrix on the j-th feature, Vij represents the original value of the i-th sample of the standard sample matrix on the j-th feature, μj represents the mean of the j-th feature of the standard sample matrix, σj represents the standard deviation of the j-th feature of the standard sample matrix, and N is the total number of standard samples in the standard sample matrix.
[0173] In an embodiment of the present invention, the deep learning classification model includes:
[0174] Input layer, used to receive samples to be predicted;
[0175] An embedding layer, used for mapping the sample to be predicted from discrete depth features to continuous space according to a mapping formula;
[0176] CNN convolutional layer, used to perform convolution according to the convolution formula;
[0177] A bidirectional long short-term memory layer, including a forward LSTM and a backward LSTM, wherein the forward LSTM is used to learn sequence information from the past to the future, and the backward LSTM is used to capture information from the future to the past;
[0178] Attention layer, used to capture important feature windows;
[0179] A fully connected layer, used for connecting various layers of the deep learning classification model;
[0180] Wherein, the mapping formula is:
[0181] y=E(x)
[0182] E∈R (V×d)
[0183] The convolution formula is:
[0184]
[0185] The attention weight α of the attention layer is:
[0186] α=softmax(w T tanh(W a ·H T +b a ))
[0187] The context vector v of the attention layer is:
[0188]
[0189] The output function of the fully connected layer is:
[0190] z=softmax(W f ·v+b f )
[0191] Among them, x is the sample to be predicted, E is the deep learning matrix, R represents the mapping space, y is the output embedding vector, V is the deep learning matrix dimension, d is the embedding dimension, C i is the output feature map of the convolutional layer, W j is the parameter of deep learning, E i is the i-th element of the input sequence, k is the size of the convolution kernel, b is the first bias term, α is the attention weight, softmax is a fixed function, and w T is the transpose of the attention layer weight vector, tanh is the hyperbolic tangent activation function, W a is the weight matrix of the attention layer, H T is the transpose of the attention layer input sequence, b a is the bias term of the attention layer, α t is the attention weight with timestamp, H t is the timestamped representation of the input sequence, W f is the weight matrix of the fully connected output layer, b f is the bias term of the output layer, and z is the output function of the fully connected layer.
[0192] In the embodiment of the present invention, in the bidirectional long short-term memory layer, the forward LSTM is:
[0193] h ft =LSTM f (C t ,h ft -1)
[0194] The backward LSTM is:
[0195] h bt =LSTM b (C t,h bt +1)
[0196] The output of the bidirectional long short-term memory layer is:
[0197] H=[h f ;h b ]
[0198] The LSTM is:
[0199] i t =σ(W i ·[h t -1,x t ]+b i )
[0200] f t =σ(W f ·[h t -1,x t ]+b f )
[0201] o t =σ(W o ·[ht-1,x t ]+b o )
[0202]
[0203] h t =o t *tanh(c t )
[0204] Among them, h ft represents the hidden state of the forward LSTM at time step t, C t is the input state, h bt represents the hidden state of the backward LSTM at time step t, h f represents the hidden state sequence of all time steps of the forward LSTM, h b represents the hidden state sequence of all time steps of the backward LSTM, i t is the LSTM input gate, σ is the sigmoid activation function, h t is the hidden state, x t is the input matrix, b i is the second bias term, f t is the LSTM forget gate parameter, W f is the weight matrix, b f is the bias term of the output layer, o t is the LSTM output gate, b o is the third bias term, is the candidate input matrix state, tanh is the hyperbolic tangent activation function, W c is the weight matrix, b c is the fourth bias term.
[0205] In the embodiments of the present invention, early gestational diabetes can be predicted with high accuracy through a deep learning classification model.
[0206] In one embodiment of the present invention, blood samples of 20,000 pregnant women at 6-13 weeks of pregnancy were collected. Pregnant women at 6-13 weeks of pregnancy are generally considered to be in the early stages of pregnancy. After the blood samples of these pregnant women were processed, according to the deep learning classification model of the embodiment of the present invention, it was found that the model of the present invention achieved an accuracy rate of 93.76%, indicating that the method of the embodiment of the present invention has a high overall performance level.
[0207] An embodiment of the present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following method when executing the computer program: obtaining original samples and an initial model; obtaining training samples based on the original samples, wherein the training samples are bam files, and each bam file includes: a DNA sequencing result of the sample; obtaining a sample matrix based on the bam file; training the initial model using the sample matrix to obtain a deep learning classification model; and obtaining the probability of early gestational diabetes based on the deep learning classification model.
[0208] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following method is implemented: obtaining original samples and an initial model; obtaining training samples based on the original samples, wherein the training samples are bam files, and each bam file includes: a DNA sequencing result of the sample; obtaining a sample matrix based on the bam file; using the sample matrix to train the initial model to obtain a deep learning classification model; and obtaining the probability of early gestational diabetes based on the deep learning classification model.
[0209] The above-mentioned method for predicting early gestational diabetes achieves the beneficial effect of being able to solve the technical problems raised in the background technology.
[0210] Figure 2 FIG. 1 is a flow chart of a method for predicting early gestational diabetes in one embodiment. Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0211] Figure 4 The internal structure diagram of a computer device in one embodiment is shown. The computer device may specifically be Figure 1 The server 120 in FIG. Figure 4 As shown, the computer device includes a processor, a memory, a network interface, an input device and a display screen connected through a system bus. Among them, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement the early gestational diabetes prediction method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can execute the early gestational diabetes prediction method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0212] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0213] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0214] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0215] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for predicting early gestational diabetes, characterized in that: The method comprises: Get the original sample and initial model; Acquire training samples according to the original samples, wherein the training samples are bam files, and each bam file includes: DNA sequencing results of the samples; According to the bam file, obtain a sample matrix; Using the sample matrix to train the initial model to obtain a deep learning classification model; According to the deep learning classification model, the probability of early gestational diabetes is obtained.
2. The method according to claim 1, characterized in that The obtaining the probability of early gestational diabetes according to the deep learning classification model includes: Obtain samples to be predicted; According to the learning classification model, obtaining the classification corresponding to the sample to be predicted; According to the corresponding classification, obtain a corresponding importance score; The importance score is used to indicate the probability of early gestational diabetes in the sample to be predicted.
3. The method according to claim 1, characterized in that The training samples include experimental samples and control samples; The step of obtaining a sample matrix according to the bam file includes: According to the bam file, obtaining the sequencing coverage of each genome in the DNA sequencing results of the sample; According to the sequencing coverage, extracting the optimal sequencing depth of each genome in the DNA sequencing results of the sample by a dynamic programming algorithm; Constructing a feature vector, wherein the feature vector is composed of the optimal sequencing depth of each genome; Construct the initial sample matrix; Performing standardization processing on the initial sample matrix to obtain a standard sample matrix; The initial sample matrix includes an initial experimental sample matrix and an initial control sample matrix, and the standard sample matrix includes a standard experimental sample matrix and a standard control sample matrix. The initial experimental sample matrix is a matrix composed of the eigenvectors corresponding to all experimental samples, and the initial control sample matrix is a matrix composed of the eigenvectors corresponding to all control samples.
4. The method according to claim 3, characterized in that The optimal sequencing depth of each genome in the DNA sequencing results of the sample is extracted by the dynamic programming algorithm, and is performed as follows: D(i)=max(D(i-1)+C(i),D(ik)+C(ik),…) Wherein, D(i) represents the optimal sequencing depth of the genome at position i, and C(i) represents the sequencing coverage of the genome at position i.
5. The method according to claim 3, characterized in that: The initial sample matrix is standardized to obtain a standard sample matrix in the following manner: Zij=(Vij-μj) / σj Among them, Zij represents the Z-score value of the i-th sample of the standard sample matrix on the j-th feature, Vij represents the original value of the i-th sample of the standard sample matrix on the j-th feature, μj represents the mean of the j-th feature of the standard sample matrix, σj represents the standard deviation of the j-th feature of the standard sample matrix, and N is the total number of standard samples in the standard sample matrix.
6. The method according to claim 1, characterized in that The deep learning classification model includes: Input layer, used to receive samples to be predicted; An embedding layer, used for mapping the sample to be predicted from discrete depth features to continuous space according to a mapping formula; CNN convolutional layer, used to perform convolution according to the convolution formula; A bidirectional long short-term memory layer, including a forward LSTM and a backward LSTM, wherein the forward LSTM is used to learn sequence information from the past to the future, and the backward LSTM is used to capture information from the future to the past; Attention layer, used to capture important feature windows; A fully connected layer, used for connecting various layers of the deep learning classification model; Wherein, the mapping formula is: y=E(x) E∈R (V×d) The convolution formula is: The attention weight α of the attention layer is: α=softmax(w T ·tanh(W a ·H T +b a )) The context vector v of the attention layer is: The output function of the fully connected layer is: z=softmax(W f ·v+b f ) Among them, x is the sample to be predicted, E is the deep learning matrix, R represents the mapping space, y is the output embedding vector, V is the deep learning matrix dimension, d is the embedding dimension, C i is the output feature map of the convolutional layer, W j is the parameter of deep learning, E i is the i-th element of the input sequence, k is the size of the convolution kernel, b is the first bias term, α is the attention weight, softmax is a fixed function, and w T is the transpose of the attention layer weight vector, tanh is the hyperbolic tangent activation function, W a is the weight matrix of the attention layer, H T is the transpose of the attention layer input sequence, b a is the bias term of the attention layer, α t is the attention weight with timestamp, H t is the timestamped representation of the input sequence, W f is the weight matrix of the fully connected output layer, b f is the bias term of the output layer, and z is the output function of the fully connected layer.
7. The method according to claim 6, characterized in that In the bidirectional long short-term memory layer, the forward LSTM is: h ft =LSTM f (C t ,h ft -1) The backward LSTM is: h bt =LSTM b (C t ,h bt +1) The output of the bidirectional long short-term memory layer is: H=[h f ;h b ] The LSTM is: i t =σ(W i ·[h t -1,x t ]+b i ) f t =σ(W f ·[h t -1,x t ]+b f ) the t =σ(W o ·[ht-1,x t ]+b o ) h t =o t *tanh(c t ) Among them, h ft represents the hidden state of the forward LSTM at time step t, C t is the input state, h bt represents the hidden state of the backward LSTM at time step t, h f represents the hidden state sequence of all time steps of the forward LSTM, h b represents the hidden state sequence of all time steps of the backward LSTM, i t is the LSTM input gate, σ is the sigmoid activation function, h t is the hidden state, x t is the input matrix, b i is the second bias term, f t is the LSTM forget gate parameter, W f is the weight matrix, b f is the bias term of the output layer, o t is the LSTM output gate, b o is the third bias term, is the candidate input matrix state, tanh is the hyperbolic tangent activation function, W c is the weight matrix, b c is the fourth bias term.
8. An early gestational diabetes prediction device, characterized in that: The device comprises: A model building unit, used to obtain original samples and initial models; A sample acquisition unit, used to acquire a training sample according to the original sample, wherein the training sample is a bam file, and each bam file includes: a DNA sequencing result of the sample; The sample acquisition unit is also used to acquire a sample matrix according to the bam file; A model training unit, used to train the initial model using the sample matrix to obtain a deep learning classification model; A prediction unit is used to obtain the probability of early gestational diabetes according to the deep learning classification model.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.