Disease prediction method and device, electronic equipment and computer readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2022-09-21
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]本发明提供一种疾病预测方法、装置、电子设备及计算机可读存储介质,用以解决现有技术中由于电子健康记录数据具有长期依赖性及时间不规则性等特性,就容易导致电子设备基于该电子健康记录数据,利用现有的疾病预测方法,无法得到较为准确的疾病预测结果的缺陷,实现将电子健康记录数据对应的在线时间序列预测作为一个持续学习问题,利用LSTM模型及时间卷积网络,可有效协调在线时间序列预测与持续学习之间的关系,以解决该电子健康记录数据无法兼顾长期依赖性和时间不规则性的问题,从而提高疾病预测结果的准确性
[0020] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the disease prediction method as described above.
Smart Images

Figure CN115662626B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical data processing technology, and in particular to a disease prediction method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] In recent years, with the continuous development of medical informatization, electronic devices can obtain more and more health data from electronic health records, i.e., electronic medical records. This health data can include: disease details, diagnostic process and results, and treatment process. Among these, the health data has a time sequence and can contain a large amount of valuable medical information, making it a major carrier for data-driven medical development.
[0003] Existing methods for disease prediction based on electronic health record data can be based on traditional machine learning and statistical techniques, such as logistic regression, support vector machines, and random forests. However, due to the long-term dependence and temporal irregularity of electronic health record data, existing disease prediction methods may fail to produce accurate disease prediction results when using this data on electronic devices. Summary of the Invention
[0004] This invention provides a disease prediction method, apparatus, electronic device, and computer-readable storage medium to address the shortcomings of existing technologies where the long-term dependence and temporal irregularity of electronic health record data can lead to inaccurate disease prediction results when using existing disease prediction methods based on this data. The invention treats online time series prediction corresponding to electronic health record data as a continuous learning problem. By utilizing an LSTM model and a temporal convolutional network, the relationship between online time series prediction and continuous learning can be effectively coordinated, thus solving the problem that electronic health record data cannot simultaneously account for long-term dependence and temporal irregularity, thereby improving the accuracy of disease prediction results.
[0005] This invention provides a disease prediction method, comprising:
[0006] Based on the acquired electronic health record data, online time series forecasts are determined;
[0007] The online time series prediction is input into the Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model. This set of stationary segments includes multiple time-stationary segments. The LSTM model is trained based on historical online time series predictions and historical stationary segment sets.
[0008] The set of stationary segments is input into a temporal convolutional network to obtain the disease prediction results output by the temporal convolutional network. The temporal convolutional network is trained on the set of historical stationary segments using partial derivative modeling and sparse memory interaction methods.
[0009] According to a disease prediction method provided by the present invention, the LSTM model is trained based on the following steps: obtaining the cumulative error between the historical online time series prediction and the historical stationary segment set; adjusting the pre-trained LSTM model according to the cumulative error to obtain the trained LSTM model.
[0010] According to a disease prediction method provided by the present invention, the temporal convolutional network is trained based on the following steps: obtaining the adaptive parameters corresponding to the pre-trained temporal convolutional network; using the partial derivative modeling method, determining the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on the adaptive parameters; and using the sparse memory interaction method, training the pre-trained temporal convolutional network based on the historical stationary segment set and the first fitness coefficient to obtain the trained temporal convolutional network.
[0011] According to a disease prediction method provided by the present invention, the method utilizes partial derivative modeling to determine the first fitness coefficient corresponding to a pre-trained temporal convolutional network based on adaptive parameters. The method includes: determining the current gradient corresponding to the pre-trained temporal convolutional network using the gradient formula in the partial derivative modeling method; mapping the current gradient to obtain the first fitness coefficient; wherein the gradient formula is... This represents the current gradient; γ represents the first coefficient, γ∈(0,1); This represents the gradient corresponding to the exponential moving average (EMA) of the adaptive parameter. This represents the gradient of the historical stationary segment set at time t in layer l.
[0012] According to a disease prediction method provided by the present invention, the method utilizes a sparse memory interaction method to train a pre-trained temporal convolutional network based on a set of historical stationary segments and a first fitness coefficient to obtain a trained temporal convolutional network. The method includes: determining an intermediate fitness coefficient based on the set of historical stationary segments; determining a second fitness coefficient corresponding to the pre-trained temporal convolutional network using a fitness coefficient formula in the sparse memory interaction method; and adjusting the pre-trained temporal convolutional network based on the second fitness coefficient to obtain a trained temporal convolutional network. The fitness coefficient formula is as follows: u′ l This represents the second fitness coefficient; T represents the second coefficient, T∈(0,1); u l This represents the first fitness coefficient; This represents the intermediate fitness coefficient.
[0013] According to a disease prediction method provided by the present invention, determining an intermediate fitness coefficient based on a set of historical stationary segments includes: determining each time stationary segment included in the set of stationary segments using a first formula in a sparse memory interaction method; determining a preset number of target time stationary segments using a second formula; and determining an intermediate fitness coefficient according to a third formula; wherein the first formula is r l =softmax(M l u l The second formula is r. l (k) =TopK(r l The third formula is: M l This represents the associative memory, which stores the first fitness coefficient; r l This indicates the associated memory M l The corresponding attention weight; K represents the preset number; r l (k) This indicates that the most relevant K memory items are retrieved from the set of stationary segments, and these memory items are time-stationary segments; r l (k) [i] indicates that r l (k) The i-th time stationary segment; M l [i] represents the associative memory M l The i-th row of memory; This represents the intermediate fitness coefficient.
[0014] According to a disease prediction method provided by the present invention, the method further includes: updating the historical stable segment set included in the trained temporal convolutional network based on the stable segment set to obtain a new historical stable segment set.
[0015] The present invention also provides a disease prediction device, comprising:
[0016] The determination module is used to determine online time series forecasts based on the electronic health record data acquired by the acquisition module;
[0017] The output module is used to input the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model. This set of stationary segments includes multiple time-stationary segments. The LSTM model is trained based on historical online time series predictions and historical stationary segment sets. The set of stationary segments is then input into a temporal convolutional network to obtain the disease prediction results output by the temporal convolutional network. This temporal convolutional network is trained using partial derivative modeling and sparse memory interaction methods on the historical stationary segment set.
[0018] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the disease prediction method as described above.
[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the disease prediction method as described above.
[0020] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the disease prediction method as described above.
[0021] The disease prediction method, device, electronic device, and computer-readable storage medium provided by this invention determine online time series prediction based on acquired electronic health record data; input the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model, the set of stationary segments including multiple time-stationary segments, the LSTM model being trained based on historical online time series predictions and historical stationary segment sets; input the set of stationary segments into a temporal convolutional network to obtain the disease prediction result output by the temporal convolutional network, the temporal convolutional network being trained on the historical stationary segment set using partial derivative modeling and sparse memory interaction methods. This method addresses the shortcomings of existing technologies where the long-term dependence and temporal irregularity of electronic health record data can lead to inaccurate disease prediction results when using existing disease prediction methods based on this data. The method treats online time series prediction corresponding to electronic health record data as a continuous learning problem. By utilizing an LSTM model and a temporal convolutional network, the relationship between online time series prediction and continuous learning can be effectively coordinated. This solves the problem that electronic health record data cannot simultaneously account for long-term dependence and temporal irregularity, thereby improving the accuracy of disease prediction results. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating the disease prediction method provided by the present invention;
[0024] Figure 2This is a schematic diagram of the structure of the disease prediction device provided by the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0027] It should be noted that, in existing technologies, the long-term dependency of electronic health record data refers to the close relationship between historical diseases and interventions and the future development of a patient's disease. For example, electronic devices archive each patient's examination, diagnosis, and medication records in the form of electronic medical records. These electronic medical records can provide a basis for future treatment measures, thus significantly influencing the development of the patient's disease.
[0028] The temporal irregularity of electronic health record data refers to the sporadic nature of the data in electronic medical records. For example, the electronic device only records relevant data when a patient visits the hospital for treatment, but the time when the patient arrives at the hospital for treatment is essentially random.
[0029] In summary, electronic devices, based on electronic health record data, cannot obtain relatively accurate disease prediction results using existing disease prediction methods.
[0030] It should be noted that the execution subject involved in the embodiments of the present invention can be a disease prediction device or an electronic device. The embodiments of the present invention will be further described below using an electronic device as an example.
[0031] like Figure 1 As shown in the schematic diagram of the disease prediction method provided by the present invention, it may include:
[0032] 101. Based on the acquired electronic health record data, determine online time series forecasts.
[0033] Electronic health record data refers to a patient's health diagnosis records, which may include medication records, surgical records, and physical examination records.
[0034] Online time series forecasting refers to the process of arranging the values of electronic health record data at different times in chronological order to form a sequence.
[0035] After acquiring electronic health record data, the electronic device can obtain a sequence formed by arranging the values corresponding to the electronic health record data at different times in chronological order. That is, it can obtain the online time series prediction corresponding to the electronic health record data, so that the electronic device can make accurate predictions on the electronic health record data based on the online time series prediction.
[0036] 102. Input the online time series forecast into the Long Short-Term Memory (LSTM) model to obtain the set of stationary segments output by the LSTM model.
[0037] The stationary segment set includes multiple time-stationary segments, and the Long Short-Term Memory (LSTM) model is trained based on historical online time series prediction and historical stationary segment set.
[0038] A time-stationary segment refers to a continuous sequence of electronic health record data within a preset period. Each time-stationary segment can serve as a learning task for continuous learning, and the points of change in these learning tasks are independent of the environment.
[0039] In some embodiments, the LSTM model can be trained by an electronic device based on the following steps: the electronic device acquires the cumulative error between historical online time series predictions and historical stationary segments; the electronic device adjusts the pre-trained LSTM model based on the cumulative error to obtain a trained LSTM model.
[0040] Assume there are N historical online time series predictions and N historical stationary segment sets, where N is an integer greater than or equal to 1. The i-th historical online time series prediction corresponds to the i-th historical stationary segment set. An electronic device can obtain the first error between the first historical online time series prediction and the first historical stationary segment set, then the second error between the second historical online time series prediction and the second historical stationary segment set, and so on. Based on these N historical online time series predictions and N historical stationary segment sets, the electronic device can obtain N errors. Then, the electronic device accumulates these N errors by summing them to obtain the cumulative error. Next, based on this cumulative error, the electronic device adjusts the model parameters in the pre-trained LSTM model to obtain a trained LSTM model with more accurate model parameters. In this way, after obtaining the online time series prediction, the electronic device can directly input the online time series prediction into the trained LSTM model to obtain the stationary segment set output by the trained LSTM model, which is also relatively accurate.
[0041] It should be noted that during the training of the pre-trained LSTM model, online time series prediction does not require a separate test set, which can effectively save power consumption of electronic devices.
[0042] 103. Input the set of stationary segments into the temporal convolutional network to obtain the disease prediction results output by the temporal convolutional network.
[0043] Among them, the Temporal Convolutional Network (TCN) is trained on a set of historical stationary segments using partial derivative modeling and sparse memory interaction methods. This TCN can be regarded as the backbone deep neural network.
[0044] Disease prediction results refer to the future trajectory of a patient's disease diagnosis.
[0045] In some embodiments, the temporal convolutional network can be trained by an electronic device based on the following steps: the electronic device obtains the adaptive parameters corresponding to the pre-trained temporal convolutional network; the electronic device uses a partial derivative modeling method to determine the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on the adaptive parameters; the electronic device uses a sparse memory interaction method to train the pre-trained temporal convolutional network based on a set of historical stationary segments and the first fitness coefficient to obtain a trained temporal convolutional network.
[0046] Optionally, the electronic device uses a partial derivative modeling method to determine the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on adaptive parameters. This may include: the electronic device acquiring a partial derivative modeling method in the adapter; the electronic device using the partial derivative modeling method to determine the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on adaptive parameters.
[0047] Optionally, the electronic device uses a sparse memory interaction method to train a pre-trained temporal convolutional network based on a set of historical stationary segments and a first fitness coefficient to obtain a trained temporal convolutional network. This may include: the electronic device acquiring a sparse memory interaction method in an associative memory; the electronic device using the sparse memory interaction method to train the pre-trained temporal convolutional network based on a set of historical stationary segments and a first fitness coefficient to obtain a trained temporal convolutional network.
[0048] In enhancing the dynamic prediction capabilities of temporal convolutional networks (TCNNs) in electronic devices, the contributions of the adapter and the associative memory were analyzed. If only the adapter is built during the training of a pre-trained TCNN, the network may not effectively learn repeatedly trained models. Conversely, if only the associative memory is built, the network may not effectively address the problem of rapid adaptation to sudden data changes. Therefore, the electronic device must build both an adapter and an associative memory. This allows the device to effectively address the rapid adaptation to sudden data changes using partial derivative modeling methods in the adapter, and to effectively promote the learning of repeatedly trained patterns using sparse memory interaction methods in the associative memory. Consequently, the electronic device can not only effectively improve the online learning rate of the TCNN but also significantly enhance its dynamic prediction capabilities.
[0049] In some embodiments, the electronic device uses a partial derivative modeling method to determine the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on adaptive parameters. This may include: the electronic device using the gradient formula in the partial derivative modeling method to determine the current gradient corresponding to the pre-trained temporal convolutional network; and the electronic device mapping the current gradient to obtain the first fitness coefficient.
[0050] Wherein, the gradient formula is
[0051] This represents the current gradient; γ represents the first coefficient, γ∈(0,1); This represents the gradient corresponding to the exponential moving average (EMA) of the adaptive parameters; This represents the gradient of a set of historical stationary segments at time t in layer l.
[0052] The first fitness coefficient can be used as u l express.
[0053] During the interaction between the trigger adapter and the associated memory, the current adaptive coefficients of the pre-trained temporal convolutional network cannot capture the entire training event. Therefore, the electronic device can first use the gradient formula in the partial derivative modeling method to determine the current gradient corresponding to the pre-trained temporal convolutional network. The current gradient The accuracy is relatively high, and then the electronic device is based on the current gradient. The first fitness coefficient u is obtained l In this way, the electronic device, using the adapter, can obtain a highly accurate first fitness coefficient u by reading the query with attention and retrieving the most similar data from the past. l .
[0054] In some embodiments, the electronic device uses a sparse memory interaction method to train a pre-trained temporal convolutional network based on a set of historical stationary segments and a first fitness coefficient to obtain a trained temporal convolutional network. This may include: the electronic device determining an intermediate fitness coefficient based on the set of historical stationary segments; the electronic device determining a second fitness coefficient corresponding to the pre-trained temporal convolutional network using the fitness coefficient formula in the sparse memory interaction method; and the electronic device adjusting the pre-trained temporal convolutional network based on the second fitness coefficient to obtain a trained temporal convolutional network.
[0055] The formula for the fitness coefficient is:
[0056] u′ l The second fitness coefficient is represented by T, where T ∈ (0, 1); u l Indicates the first fitness coefficient; This represents the intermediate fitness coefficient.
[0057] After determining the intermediate fitness coefficient based on a set of historical stationary segments, the electronic device can use the fitness coefficient formula in the sparse memory interaction method to accurately determine the second fitness coefficient corresponding to the pre-trained temporal convolutional network. That is, the accuracy of the second fitness coefficient is relatively high. Then, the electronic device adjusts the network parameters in the pre-trained temporal convolutional network according to the second fitness coefficient to obtain a trained temporal convolutional network, which is also relatively accurate.
[0058] In some embodiments, the electronic device determines an intermediate fitness coefficient based on a set of historical stationary segments, which may include: the electronic device using a first formula in a sparse memory interaction method to determine each time stationary segment included in the set of stationary segments; the electronic device using a second formula to determine a preset number of target time stationary segments; and the electronic device using a third formula to determine an intermediate fitness coefficient.
[0059] The first formula is r l =softmax(M l u l );
[0060] The second formula is r l (k) =TopK(r l );
[0061] The third formula is
[0062] M l This represents an associative memory that can store the first fitness coefficient u. l ;r lRepresents associative memory M l The corresponding attention weights; K represents the preset number; r l (k) This indicates that the most relevant top-preset number K memory items are retrieved from the set of stationary segments, where each memory item is a time-stationary segment; r l (k) [i] represents r l (k) The i-th time stationary segment; M l [i] represents the associative memory M l The i-th row of memory; This represents the intermediate fitness coefficient.
[0063] Because of the storage conflict patterns in the associative memory, the electronic device can use sparse attention to retrieve the top K most relevant memory items from the memory items stored in the associative memory.
[0064] For example, K can be 2.
[0065] The electronic device can accurately obtain the intermediate fitness coefficients corresponding to the historical stationary segment set by using the first, second and third formulas in the sparse memory interaction method. Based on the intermediate fitness coefficients with higher accuracy, the electronic device can more accurately adjust the network parameters in the pre-trained temporal convolutional network.
[0066] In some embodiments, after step 103, the method may further include: the electronic device updating the set of historical stationary segments included in the trained temporal convolutional network according to the set of stationary segments, to obtain a new set of historical stationary segments.
[0067] Optionally, the electronic device updates the set of historical stationary segments included in the trained temporal convolutional network based on the set of stationary segments to obtain a new set of historical stationary segments. This can be achieved, but is not limited to, one of the following implementation methods:
[0068] Implementation Method 1: Electronic devices utilize the fourth formula in the sparse memory interaction method to store a new set of historical stationary fragments in an associative memory.
[0069] The fourth formula is
[0070] M′ l1 This indicates that the associative memory for storing the new set of historical stationary segments is obtained using the fourth formula; This indicates the outer product operation.
[0071] Electronic devices based on A new set of historical stationary fragments can be obtained. This outer product operation can effectively store the new set of historical stationary fragments in the relevant location indicated by the memory item, such as associative memory.
[0072] Implementation Method 2: Electronic devices utilize the fifth formula in the sparse memory interaction method to store a new set of historical stationary fragments in an associative memory.
[0073] The fifth formula is M′ l2 ←M1 / max(1,||M1||2).
[0074] M′ l2 This indicates that the associative memory for storing the new set of historical stationary segments is obtained using the fourth formula.
[0075] The electronic device can obtain a new set of historical stationary segments based on M1 / max(1, ||M1||2), and then store the new set of historical stationary segments in the associative memory.
[0076] The above process can be applied to online continuous learning scenarios without explicitly switching the detection task, thus relaxing the definition of the task boundary and enabling the LSTM model and temporal convolutional network to continuously improve their learning of the training data, thereby improving the learning efficiency of the LSTM model and temporal convolutional network.
[0077] In this embodiment of the invention, online time series prediction is determined based on the acquired electronic health record data; the online time series prediction is input into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model; the set of stationary segments is then input into a temporal convolutional network to obtain the disease prediction result output by the temporal convolutional network. This method addresses the shortcomings of existing technologies where the long-term dependence and temporal irregularity of electronic health record data can lead to inaccurate disease prediction results when using existing disease prediction methods based on this data. By treating online time series prediction corresponding to electronic health record data as a continuous learning problem, and utilizing the LSTM model and temporal convolutional network, the relationship between online time series prediction and continuous learning can be effectively coordinated. This solves the problem that electronic health record data cannot simultaneously account for long-term dependence and temporal irregularity, thereby improving the accuracy of disease prediction results.
[0078] The disease prediction device provided by the present invention is described below. The disease prediction device described below can be referred to in correspondence with the disease prediction method described above.
[0079] like Figure 2 As shown in the schematic diagram of the disease prediction device provided by the present invention, it may include:
[0080] The determination module 201 is used to determine online time series forecasts based on the electronic health record data acquired by the acquisition module 203;
[0081] Output module 202 is used to input the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model. The set of stationary segments includes multiple time-stationary segments. The LSTM model is trained based on historical online time series predictions and historical stationary segment sets. The set of stationary segments is then input into a temporal convolutional network to obtain the disease prediction results output by the temporal convolutional network. The temporal convolutional network is trained using partial derivative modeling and sparse memory interaction methods on the historical stationary segment set.
[0082] Optionally, module 203 is specifically used to obtain the cumulative error between the historical online time series prediction and the historical stationary segment set;
[0083] The output module 202 is specifically used to adjust the pre-trained LSTM model based on the accumulated error to obtain the trained LSTM model.
[0084] Optionally, module 203 is used to obtain the adaptive parameters corresponding to the pre-trained temporal convolutional network;
[0085] The determination module 201 is specifically used to determine the first fitness coefficient corresponding to the pre-trained temporal convolutional network based on the adaptive parameter using the partial derivative modeling method; and to train the pre-trained temporal convolutional network based on the historical stationary segment set and the first fitness coefficient using the sparse memory interaction method, so as to obtain the trained temporal convolutional network.
[0086] Optionally, module 201 is specifically used to determine the current gradient corresponding to the pre-trained temporal convolutional network using the gradient formula in the partial derivative modeling method; and to map the current gradient to obtain the first fitness coefficient; wherein, the gradient formula is... This represents the current gradient; γ represents the first coefficient, γ∈(0,1); This represents the gradient corresponding to the exponential moving average (EMA) of the adaptive parameter. This represents the gradient of the historical stationary segment set at time t in layer l.
[0087] Optionally, module 201 is specifically used to determine intermediate fitness coefficients based on the historical stationary segment set; determine the second fitness coefficient corresponding to the pre-trained temporal convolutional network using the fitness coefficient formula in the sparse memory interaction method; and adjust the pre-trained temporal convolutional network according to the second fitness coefficient to obtain a trained temporal convolutional network; wherein, the fitness coefficient formula is as follows: u′l This represents the second fitness coefficient; T represents the second coefficient, T∈(0,1); u l This represents the first fitness coefficient; This represents the intermediate fitness coefficient.
[0088] Optionally, the determining module 201 is specifically used to determine each time-stationary segment included in the stationary segment set using a first formula in the sparse memory interaction method; to determine a preset number of target time-stationary segments using a second formula; and to determine the intermediate fitness coefficient according to a third formula; wherein, the first formula is r l =softmax(M l u l The second formula is r. l (k) =TopK(r l The third formula is: M l This represents the associative memory, which stores the first fitness coefficient; r l This indicates the associated memory M l The corresponding attention weight; K represents the preset number; r l (k) This indicates that the most relevant K memory items are retrieved from the set of stationary segments, and these memory items are time-stationary segments; r l (k) [i] indicates that r l (k) The i-th time stationary segment; M l [i] represents the associative memory M l The i-th row of memory; This represents the intermediate fitness coefficient.
[0089] Optionally, the determining module 201 is further configured to update the set of historical stable segments included in the trained temporal convolutional network based on the set of stable segments, so as to obtain a new set of historical stable segments.
[0090] like Figure 3The diagram shows the structure of an electronic device provided by the present invention. This electronic device may include a processor 310, a communication interface 320, an associated memory 330, a communication bus 340, and an adapter 350. The processor 310, communication interface 320, associated memory 330, and adapter 350 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the associated memory 330 and adapter 350 to execute a disease prediction method. This method includes: determining an online time series prediction based on acquired electronic health record data; inputting the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model, the set of stationary segments including multiple time-stationary segments, the LSTM model being trained based on historical online time series predictions and historical stationary segment sets; and inputting the set of stationary segments into a temporal convolutional network to obtain the disease prediction result output by the temporal convolutional network, the temporal convolutional network being trained using a partial derivative modeling method and a sparse memory interaction method on the historical stationary segment set.
[0091] Furthermore, the logical instructions in the aforementioned associated memory 330 and adapter 350 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0092] Optionally, the electronic devices involved in the embodiments of the present invention may include: computers, mobile terminals, and wearable devices, etc.
[0093] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the disease prediction method provided by the above methods. The method includes: determining an online time series prediction based on acquired electronic health record data; inputting the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model, the set of stationary segments including multiple time-stationary segments, the LSTM model being trained based on historical online time series predictions and historical stationary segment sets; inputting the set of stationary segments into a temporal convolutional network to obtain a disease prediction result output by the temporal convolutional network, the temporal convolutional network being trained using a partial derivative modeling method and a sparse memory interaction method on the historical stationary segment set.
[0094] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the disease prediction method provided by the methods described above. The method includes: determining an online time series prediction based on acquired electronic health record data; inputting the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model, the set of stationary segments including multiple time-stationary segments, the LSTM model being trained based on historical online time series predictions and historical stationary segment sets; and inputting the set of stationary segments into a temporal convolutional network to obtain a disease prediction result output by the temporal convolutional network, the temporal convolutional network being trained using a partial derivative modeling method and a sparse memory interaction method on the historical stationary segment set.
[0095] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A disease prediction device, characterized in that, include: The determination module is used to determine online time series forecasts based on the acquired electronic health record data; The output module is used to input the online time series prediction into a Long Short-Term Memory (LSTM) model to obtain a set of stationary segments output by the LSTM model. The set of stationary segments includes multiple time-stationary segments. The LSTM model is trained based on historical online time series predictions and historical stationary segment sets. The set of stationary segments is then input into a temporal convolutional network to obtain the disease prediction results output by the temporal convolutional network. The temporal convolutional network is trained on the historical stationary segment set using partial derivative modeling and sparse memory interaction methods. The acquisition module is used to obtain the adaptive parameters corresponding to the pre-trained temporal convolutional network. The determining module is specifically used to determine the current gradient corresponding to the pre-trained temporal convolutional network using the gradient formula in the partial derivative modeling method. The current gradient is mapped to obtain the first fitness coefficient; Wherein, the gradient formula is l ; l This represents the current gradient; Indicates the first coefficient. ; l This represents the gradient corresponding to the exponential moving average (EMA) of the adaptive parameter; This represents the gradient of the historical stationary segment set at time t in layer l; The determining module is specifically used to train the pre-trained temporal convolutional network using a sparse memory interaction method based on the historical stationary segment set and the first fitness coefficient, to obtain a trained temporal convolutional network.
2. The disease prediction device according to claim 1, characterized in that, The output module is specifically used to obtain the cumulative error between the historical online time series prediction and the historical stationary segment set; and to adjust the pre-trained LSTM model based on the cumulative error to obtain the trained LSTM model.
3. The disease prediction device according to claim 1, characterized in that, The determining module is specifically used to determine the intermediate fitness coefficient based on the set of historical stationary segments; The second fitness coefficient of the pre-trained temporal convolutional network is determined using the fitness coefficient formula in the sparse memory interaction method; the pre-trained temporal convolutional network is then adjusted based on the second fitness coefficient to obtain a trained temporal convolutional network; wherein, the fitness coefficient formula is... l t ; l This represents the second fitness coefficient; T represents the second coefficient, T∈(0,1); This represents the first fitness coefficient; t This represents the intermediate fitness coefficient.
4. The disease prediction device according to claim 3, characterized in that, The determining module is specifically used to determine each time-stationary segment included in the stationary segment set using the first formula in the sparse memory interaction method; and to determine a preset number of target time-stationary segments using the second formula. The intermediate fitness coefficient is determined according to the third formula; where the first formula is r. l =softmax(M l u l The second formula is r l (k) =TopK(r l The third formula is: l = l (k) [i]M l [i]; M l This indicates an associative memory that stores the first fitness coefficient; r l The associated memory M represents l The corresponding attention weight; K represents the preset number; r l (k) This indicates that the most relevant top-preset number K memory items are retrieved from the set of stationary segments, where each memory item is a time-stationary segment; r l (k) [i] represents the r l (k) The i-th time stationary segment; M l [i] represents the associative memory M l The i-th row of memory; l This represents the intermediate fitness coefficient.
5. The disease prediction device according to claim 4, characterized in that, The determining module is specifically used to update the set of historical stationary segments included in the trained temporal convolutional network according to the set of stationary segments, so as to obtain a new set of historical stationary segments.
Citation Information
Patent Citations
Disease diagnosis system based on cyclic time convolution network, equipment and medium
CN111798975A
Water quality prediction method, device and equipment based on space-time fusion and storage medium
CN111882138A
Depression detection method based on natural language processing and time sequence convolutional network
CN112927781A
System and method for neural time series preprocessing
US20210342691A1