Infectious disease epidemic trend prediction method, device and computer equipment
Patent Information
- Application Number
- CN202310629232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-31
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-05-31
Smart Images

Figure CN116705341B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a method and device for predicting the epidemic trend of infectious diseases, a computer device, a storage medium and a computer program product. BACKGROUND
[0002] With the change of the environment and global warming, various viruses are being noticed for their impact on human health.
[0003] The existing monitoring method for infectious diseases is often based on clinical symptoms and epidemiological survey data after the onset of the disease. However, the existing infectious disease monitoring method is seriously lagging behind and cannot effectively predict the epidemic trend of infectious diseases. SUMMARY
[0004] Therefore, it is necessary to provide a method and device for predicting the epidemic trend of infectious diseases, a computer device, a computer readable storage medium and a computer program product, which can effectively predict the epidemic trend of infectious diseases.
[0005] A method for predicting the epidemic trend of infectious diseases, the method comprising:
[0006] obtaining historical epidemiological data of a target area; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical data of the infectious disease in the target area;
[0007] determining hidden state encoding information corresponding to each of the epidemiological data through an encoder in a pre-trained epidemic trend prediction model;
[0008] determining attention weights corresponding to each of the historical time nodes through an attention mechanism structure in the epidemic trend prediction model, and fusing each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes to obtain hidden state fusion information corresponding to a current time step;
[0009] outputting a prediction result of the epidemic trend of the infectious disease according to the hidden state fusion information corresponding to the current time step.
[0010] In one embodiment, the determination of the attention weights corresponding to each of the historical time nodes through the attention mechanism structure in the epidemic trend prediction model comprises:
[0011] obtaining hidden state decoding information corresponding to a previous time step stored in the epidemic trend prediction model; the previous time step is a time step preceding the current time step.
[0012] For any of the historical time nodes, input the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to any of the historical time nodes into an attention score layer in the attention mechanism structure to obtain attention score information corresponding to any of the historical time nodes;
[0013] According to the attention score information corresponding to each of the historical time nodes, determine the attention weight corresponding to each of the historical time nodes.
[0014] In one of the embodiments, the determining the attention weight corresponding to each of the historical time nodes according to the attention score information corresponding to each of the historical time nodes comprises:
[0015] Input the attention score information corresponding to each of the historical time nodes into a normalization layer in the attention mechanism structure to obtain a normalization result corresponding to each of the attention score information, and obtain the attention weight corresponding to each of the historical time nodes.
[0016] In one of the embodiments, the fusing the hidden state encoding information according to the attention weight corresponding to each of the historical time nodes to obtain the hidden state fusion information corresponding to the current time step comprises:
[0017] According to the attention weight corresponding to each of the historical time nodes, perform weighted summation on the hidden state encoding information to obtain a weighted summation result.
[0018] Determine the weighted summation result as the hidden state fusion information corresponding to the current time step.
[0019] In one of the embodiments, the outputting the epidemic trend prediction result of the infectious disease corresponding to the current time step according to the hidden state fusion information corresponding to the current time step comprises:
[0020] Decode the hidden state fusion information through a decoder in the epidemic trend prediction model to obtain hidden state decoding information corresponding to the current time step;
[0021] Input the hidden state decoding information corresponding to the current time step into a fully connected layer in the epidemic trend prediction model to obtain the epidemic trend prediction result corresponding to the current time step.
[0022] In one of the embodiments, the decoding the hidden state fusion information through a decoder in the epidemic trend prediction model to obtain the hidden state decoding information corresponding to the current time step comprises:
[0023] obtain hidden state decoding information and a popular trend prediction result corresponding to a previous time step stored by the popular trend prediction model; the previous time step is a time step before the current time step;
[0024] input the hidden state decoding information corresponding to the previous time step, the popular trend prediction result corresponding to the previous time step, and the hidden state fusion information corresponding to the current time step into the decoder to obtain hidden state decoding information corresponding to the current time step.
[0025] In one of the embodiments, the encoder comprises at least one encoding network, and the hidden state encoding information corresponding to each of the epidemiological data is determined by the encoder in the pre-trained popular trend prediction model, comprising:
[0026] taking the earliest historical time node in the historical time nodes as a current historical time node;
[0027] inputting the epidemiological data corresponding to the current historical time node into the encoding network corresponding to the current historical time node to obtain hidden state encoding information corresponding to the current historical time node;
[0028] inputting the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to a next historical time node into the encoding network corresponding to the current historical time node to obtain hidden state encoding information corresponding to the next historical time node; the next historical time node is a historical time node after the current historical time node;
[0029] taking the hidden state encoding information corresponding to the next historical time node as the hidden state encoding information corresponding to the current historical time node, and returning to the step of inputting the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node, until hidden state encoding information corresponding to each of the historical time nodes is obtained.
[0030] In one of the embodiments, the training method adopted by the pre-trained popular trend prediction model comprises:
[0031] obtaining training sample data; the training sample data comprises a popular trend actual result corresponding to a label time node and epidemiological sample data of a preset number of historical time nodes before the label time node;
[0032] inputting the epidemiological sample data of each of the historical time nodes into a to-be-trained popular trend prediction model to obtain a popular trend prediction result corresponding to the label time node; a process of the to-be-trained popular trend prediction model processing the epidemiological sample data is identical in principle to a process of the pre-trained popular trend prediction model processing the epidemiological data;
[0033] training the to-be-trained popular trend prediction model based on a difference between the popular trend actual result and the popular trend prediction result corresponding to the label time node until the pre-trained popular trend prediction model is obtained.
[0034] An infectious disease popular trend prediction device, the device comprising:
[0035] an acquisition module configured to acquire historical epidemiological data of a target region; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical treatment data of the infectious disease of the target region;
[0036] an encoding module configured to determine hidden state encoding information corresponding to each of the epidemiological data by an encoder in a pre-trained popular trend prediction model;
[0037] a fusion module configured to determine attention weights corresponding to each of the historical time nodes by an attention mechanism structure in the popular trend prediction model, and fuse each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes to obtain hidden state fusion information corresponding to a current time step;
[0038] a decoding module configured to output a popular trend prediction result of the infectious disease according to the hidden state fusion information corresponding to the current time step.
[0039] A computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing steps of the above method when executing the computer program.
[0040] A computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement steps of the above method.
[0041] A computer program product comprising a computer program, the computer program being executed by a processor to implement steps of the above method.
[0042] The aforementioned method, apparatus, computer equipment, storage medium, and computer program product for predicting the epidemic trend of infectious diseases acquire epidemiological data of a target area at a predetermined number of historical time points before the prediction time point. This epidemiological data is obtained by combining meteorological data and infectious disease treatment data of the target area. The encoder in a pre-trained epidemic trend prediction model determines the hidden state encoding information corresponding to each epidemiological data point. The attention mechanism structure in the epidemic trend prediction model determines the attention weights corresponding to each historical time point, and the hidden state encoding information is fused according to the attention weights corresponding to each historical time point to obtain the hidden state fusion information corresponding to the current time step. Based on the hidden state fusion information corresponding to the current time step, the epidemic trend prediction result of the infectious disease is output. Thus, it is possible to analyze the relationship between climate and infectious disease pathogens using a deep learning-based epidemic trend prediction model, effectively determine the impact of epidemiological data at each historical time point on the epidemic trend prediction result using an attention mechanism, and fuse the hidden state information corresponding to each historical time point in conjunction with this impact, thereby effectively predicting the epidemic trend of the infectious disease. This achieves accurate prediction of the epidemic trend of infectious diseases in conjunction with climate change, and effectively predicts the epidemic trend of infectious diseases after the prediction time point. Attached Figure Description
[0043] Figure 1 This is a diagram illustrating the application environment of an infectious disease epidemic trend prediction method in one embodiment.
[0044] Figure 2 This is a flowchart illustrating a method for predicting the epidemic trend of an infectious disease in one embodiment;
[0045] Figure 3 This is a flowchart illustrating a method for predicting the epidemic trend of an infectious disease in another embodiment;
[0046] Figure 4 This is a schematic diagram of the data processing flow of an infectious disease epidemic trend prediction model in one embodiment;
[0047] Figure 5 This is a schematic diagram of the structure of an infectious disease epidemic trend prediction model in one embodiment;
[0048] Figure 6 This is a schematic diagram of an attention mechanism structure in one embodiment;
[0049] Figure 7 This is a trend chart of outpatient visit data for a type of influenza in one embodiment;
[0050] Figure 8 This is a trend chart of meteorological data in one embodiment;
[0051] Figure 9 a schematic diagram of a Pearson correlation coefficient of a multi-element feature in one embodiment;
[0052] Figure 10 a training flowchart of an infectious disease epidemic trend prediction model in one embodiment;
[0053] Figure 11 a change diagram of a loss function value of an infectious disease epidemic trend prediction model in one embodiment;
[0054] Figure 12 a change diagram of an accuracy decay rate of an infectious disease epidemic trend prediction model in one embodiment;
[0055] FIG. 13(a) is a prediction result diagram of an infectious disease epidemic trend prediction model in one embodiment;
[0056] FIG. 13(b) is a prediction result diagram of an infectious disease epidemic trend prediction model in one embodiment;
[0057] Figure 14 a structural block diagram of an infectious disease epidemic trend prediction device in one embodiment;
[0058] Figure 15 an internal structure diagram of a computer device in one embodiment. DETAILED DESCRIPTION
[0059] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0060] The infectious disease epidemic trend prediction method provided by the embodiments of the present application can be applied to, for example Figure 1The application environment shown. Among them, the electronic device 102 can obtain the historical epidemiological data of the target area from the infectious disease monitoring server 104 and the weather monitoring server 106; the historical epidemiological data includes the epidemiological data of a preset number of historical time nodes before the prediction time node; the epidemiological data is the data obtained by combining the weather data of the target area and the consultation data of the infectious disease; the electronic device 102 determines the hidden state encoding information corresponding to each of the epidemiological data through the encoder in the pre-trained epidemic trend prediction model; the electronic device 102 determines the attention weight corresponding to each of the historical time nodes through the attention mechanism structure in the epidemic trend prediction model, and fuses each of the hidden state encoding information according to the attention weight corresponding to each of the historical time nodes, to obtain the hidden state fusion information corresponding to the current time step; the electronic device 102 outputs the epidemic trend prediction result of the infectious disease according to the hidden state fusion information corresponding to the current time step. Wherein, the electronic device 102 can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices, etc. The infectious disease monitoring server 104 and the weather monitoring server 106 can be realized by independent servers or server clusters composed of multiple servers.
[0061] In one embodiment, as shown in Figure 2 , an infectious disease epidemic trend prediction method is provided, which is applied to the electronic device in Figure 1 for example, including the following steps:
[0062] Step S202, obtaining the historical epidemiological data of the target area corresponding to the prediction time node.
[0063] Among them, the target area can refer to the area whose infectious disease epidemic trend needs to be predicted. In actual application, the target area can be a city, a province or a country.
[0064] Among them, the infectious disease can be a kind of disease caused by various pathogens, which can be transmitted between people, animals or people and animals.
[0065] Among them, the pathogen can be a microorganism or a parasite. For example, it can include viruses, bacteria, fungi or parasites, etc.
[0066] Among them, the prediction time node can refer to the time node whose infectious disease epidemic trend needs to be predicted. In actual application, the prediction time node can have multiple.
[0067] Among them, the historical epidemiological data includes the epidemiological data of a preset number of historical time nodes before the prediction time node.
[0068] The epidemiological data can be epidemiological characteristic data associated with the prevalence of the infectious disease. The epidemiological data can include meteorological data, medical case data, etc. In actual application, the epidemiological data is data obtained by combining meteorological data and medical data of the infectious disease in the target area.
[0069] The meteorological data can include maximum temperature, minimum temperature, precipitation, average humidity, etc. The medical case data can include the number of infectious disease cases, such as the number of influenza cases, etc.
[0070] In a specific implementation, when the electronic device needs to predict the prevalence trend of a certain infectious disease in the target area at a prediction time node, the electronic device can obtain historical epidemiological data corresponding to the prediction time node. Specifically, the electronic device can obtain medical case data of the infectious disease corresponding to W historical time nodes before the prediction time node through an infectious disease monitoring center of the target area, and obtain meteorological data of the target area corresponding to each historical time node. The electronic device can combine the meteorological data and the medical case data corresponding to each historical time node to obtain epidemiological data corresponding to each historical time node.
[0071] Then, the electronic device can perform data standardization on the epidemiological data corresponding to each historical time node to obtain standardized epidemiological data. The data standardization can use the maximum-minimum normalization method. That is, the electronic device can use a conversion function to perform mapping operation on each epidemiological data, so that each epidemiological data falls in the interval [0, 1] after normalization.
[0072] The conversion function can be represented as:
[0073]
[0074] wherein x i is the epidemiological data, max is the maximum value of the original sequence, min is the minimum value, y i is the normalized data, y i ∈[0,1] interval.
[0075] In actual application, the historical epidemiological data can be represented as Y=[y i-w ,y i-(w-1) ,...,y i-2 ,y i-1 ].
[0076] wherein y i can represent combined data of meteorological data and medical case data at time node i.
[0077] In step S202, the encoder in the pre-trained epidemic trend prediction model is used to determine hidden state encoding information corresponding to each piece of epidemiological data.
[0078] The pre-trained epidemic trend prediction model can be a neural network model pre-trained for predicting the epidemic trend of the infectious disease. It should be noted that the model structure and training method of the pre-trained epidemic trend prediction model will be further defined below, and will not be described in detail here.
[0079] The hidden state encoding information can be the hidden state information output by the encoder.
[0080] In a specific implementation, after obtaining the historical epidemiological data corresponding to the prediction time node, the electronic device can input the historical epidemiological data into the pre-trained epidemic trend prediction model; and the encoder in the epidemic trend prediction model is used to encode the epidemiological data corresponding to each historical time node to obtain hidden state encoding information corresponding to each historical time node.
[0081] In step S202, the attention mechanism structure in the epidemic trend prediction model is used to determine the attention weight corresponding to each historical time node, and the hidden state encoding information is fused according to the attention weight corresponding to each historical time node to obtain hidden state fusion information corresponding to the current time step.
[0082] The hidden state fusion information can be information obtained by fusing the hidden state encoding information. In actual applications, the hidden state fusion information can also be a context vector.
[0083] In a specific implementation, after obtaining the hidden state encoding information corresponding to each historical time node, the electronic device can input the hidden state encoding information corresponding to each historical time node into the attention mechanism structure in the epidemic trend prediction model to obtain the attention weight corresponding to each historical time node. It should be noted that the working process of the attention mechanism structure will be further defined below, and will not be described in detail here.
[0084] After obtaining the attention weight corresponding to each historical time node, the electronic device fuses the hidden state encoding information according to the attention weight corresponding to each historical time node to obtain hidden state fusion information corresponding to the current time step. Specifically, the electronic device can weight-sum the hidden state encoding information according to the attention weight corresponding to each historical time node to obtain a weighted sum result; and the electronic device determines that the weighted sum result is the hidden state fusion information corresponding to the current time step.
[0085] In step S202, the epidemic trend prediction result of the infectious disease at the current time step is output according to the hidden state fusion information corresponding to the current time step.
[0086] In a specific implementation, after obtaining the hidden state fusion information, the electronic device can perform encoding processing on the hidden state fusion information to obtain an encoding result for the hidden state fusion information. Then, the electronic device can perform classification processing on the encoding result by using the classifier in the epidemic trend prediction model to obtain the epidemic trend prediction result of the infectious disease at the current time step.
[0087] In the above infectious disease epidemic trend prediction method, the epidemiological data of the target region at a preset number of historical time nodes before the prediction time node is obtained. The epidemiological data is data obtained by combining the meteorological data and the medical data of the infectious disease of the target region. The encoder in the pre-trained epidemic trend prediction model is used to determine the hidden state encoding information corresponding to each epidemiological data. The attention mechanism structure in the epidemic trend prediction model is used to determine the attention weight corresponding to each historical time node, and the hidden state encoding information is fused according to the attention weight corresponding to each historical time node to obtain the hidden state fusion information corresponding to the current time step. The epidemic trend prediction result of the infectious disease is output according to the hidden state fusion information corresponding to the current time step. In this way, the relationship between climate and infectious disease pathogens can be analyzed by using the deep learning-based epidemic trend prediction model, and the influence of the epidemiological data of each historical time node on the epidemic trend prediction result can be effectively determined by using the attention mechanism, and the hidden state information of each historical time node is fused in combination with the influence, thereby effectively predicting the epidemic trend of the infectious disease, accurately predicting the epidemic trend of the infectious disease in combination with climate change, and effectively predicting the epidemic trend of the infectious disease after the prediction time node.
[0088] In another embodiment, determining the attention weight corresponding to each historical time node by using the attention mechanism structure in the epidemic trend prediction model includes: obtaining the hidden state decoding information corresponding to the previous time step stored in the epidemic trend prediction model; inputting the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to any historical time node into an attention score layer in the attention mechanism structure to obtain the attention score information corresponding to each historical time node; and determining the attention weight corresponding to each historical time node according to the attention score information corresponding to each historical time node.
[0089] The previous time step is a previous time step of a current time step of the popular trend prediction model. Specifically, the current time step of the popular trend prediction model can be represented as t, and the previous time step is represented as t-1.
[0090] In a specific implementation, in the process of determining the attention weights corresponding to each historical time node through the attention mechanism structure in the popular trend prediction model, the electronic device can obtain the hidden state decoding information corresponding to the previous time step stored by the popular trend prediction model. Then, for any historical time node, the electronic device can input the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to any historical time node into the attention score layer in the attention mechanism structure to obtain the attention score information corresponding to each historical time node. The attention score layer can use a preset attention score model. In actual application, the attention score model can include a dot product model, a bilinear model, an additive model, etc. For example, the attention score model can be represented as:
[0091]
[0092] wherein score(h i ,s t-1 ) represents the attention score information corresponding to the historical time node i; h i represents the i-th column vector of the hidden state matrix (i.e., the hidden state encoding information); s t-1 represents the hidden state decoding information output by the decoder of the previous time step, and W, U, and v represent weight parameter matrices.
[0093] Then, the electronic device can determine the attention weights corresponding to each historical time node according to the attention score information corresponding to each historical time node.
[0094] The technical solution of the embodiment obtains the hidden state decoding information corresponding to the previous time step stored by the popular trend prediction model, inputs the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to any historical time node into the attention score layer in the attention mechanism structure to obtain the attention score information corresponding to each historical time node, and determines the attention weights corresponding to each historical time node according to the attention score information corresponding to each historical time node, thereby effectively determining the influence of the epidemiological data corresponding to each historical time node on the popular trend prediction result.
[0095] In another embodiment, the attention weight corresponding to each historical time node is determined according to the attention score information corresponding to each historical time node, including: inputting the attention score information corresponding to each historical time node into a normalization layer in the attention mechanism structure to obtain the normalization result corresponding to each attention score information, and obtaining the attention weight corresponding to each historical time node.
[0096] In a specific implementation, in the process of determining the attention weight corresponding to each historical time node according to the attention score information corresponding to each historical time node, the electronic device can input the attention score information corresponding to each historical time node into a normalization layer in the attention mechanism structure to obtain the normalization result corresponding to each attention score information, and obtain the attention weight corresponding to each historical time node. The normalization layer can use a normalization exponential function (Softmax function).
[0097] Specifically, after the electronic device obtains the attention score information score(h i ,s t-1 ) corresponding to each historical time node, the electronic device can input the attention score information score(h i ,s t-1 ) corresponding to each historical time node into a normalization exponential function, output a probability distribution, that is, the normalization result corresponding to each attention score information, to obtain the attention weight a t (i) corresponding to each historical time node i at the current time step t.
[0098] The normalization exponential function can be expressed as:
[0099]
[0100] It can be understood that the greater the attention weight a t (i) corresponding to the historical time node i is, the greater the influence of the epidemiological data corresponding to the historical time node i on the prediction value is.
[0101] The electronic device can perform weighted summation on the hidden state encoding information according to the attention weight corresponding to each historical time node to obtain a weighted summation result, and determine that the weighted summation result is the hidden state fusion information corresponding to the current time step. In actual application, the hidden state fusion information corresponding to the current time step at the current time step t can be expressed as:
[0102]
[0103] The technical scheme of the embodiment can effectively determine the influence of the epidemiological data corresponding to each historical time node on the epidemic trend prediction result by using the attention mechanism, and fuse the hidden state information corresponding to each historical time node in combination with the influence, thereby effectively predicting the epidemic trend of the infectious disease.
[0104] In another embodiment, the epidemic trend prediction result corresponding to the current time step is output according to the hidden state fusion information corresponding to the current time step, including: decoding the hidden state fusion information by using the decoder in the epidemic trend prediction model to obtain hidden state decoding information corresponding to the current time step; and inputting the hidden state decoding information corresponding to the current time step into the full connection layer in the epidemic trend prediction model to obtain the epidemic trend prediction result corresponding to the current time step.
[0105] In the process of outputting the epidemic trend prediction result corresponding to the current time step according to the hidden state fusion information corresponding to the current time step, the electronic device can decode the hidden state fusion information by using the decoder in the epidemic trend prediction model to obtain hidden state decoding information corresponding to the current time step. Specifically, the electronic device can input the hidden state fusion information into the decoder in the epidemic trend prediction model of the infectious disease to obtain the hidden state decoding information corresponding to the current time step output at the current time step t. Then, the electronic device can input the hidden state decoding information corresponding to the current time step into the full connection layer in the epidemic trend prediction model to obtain the epidemic trend prediction result corresponding to the current time step.
[0106] The technical scheme of the embodiment can decode the hidden state fusion information by using the decoder in the epidemic trend prediction model to obtain hidden state decoding information corresponding to the current time step, and input the hidden state decoding information corresponding to the current time step into the full connection layer in the epidemic trend prediction model to obtain the epidemic trend prediction result corresponding to the current time step, so that the hidden state fusion information obtained by fusing the hidden state information corresponding to each historical time node can be efficiently and quickly predicted to obtain the epidemic trend prediction result of the infectious disease in the future.
[0107] In another embodiment, the hidden state decoding information corresponding to the current time step is obtained by decoding the hidden state fusion information by using the decoder in the epidemic trend prediction model, including: obtaining the hidden state decoding information corresponding to the previous time step and the epidemic trend prediction result stored in the epidemic trend prediction model; and inputting the hidden state decoding information corresponding to the previous time step, the epidemic trend prediction result corresponding to the previous time step, and the hidden state fusion information corresponding to the current time step into the decoder to obtain the hidden state decoding information corresponding to the current time step.
[0108] The decoder can employ an LSTM (Long Short-Term Memory) network.
[0109] The previous time step is a previous time step of a current time step of the popular trend prediction model. Specifically, the current time step of the popular trend prediction model can be represented as t, and the previous time step is represented as t-1.
[0110] In a specific implementation, in the process of decoding the hidden state fusion information by the decoder in the popular trend prediction model to obtain the hidden state decoding information corresponding to the current time step, the electronic device can obtain the hidden state decoding information s t-1 and the popular trend prediction result y t-1 corresponding to the previous time step stored by the popular trend prediction model; then, the electronic device can input the hidden state decoding information s t-1 corresponding to the previous time step, the popular trend prediction result y t-1 corresponding to the previous time step, and the hidden state fusion information C t corresponding to the current time step to the decoder to obtain the hidden state decoding information s t corresponding to the current time step. In actual application, the hidden state decoding information corresponding to the current time step can be represented as:
[0111] s t =LSTM decoder (y t-1 ,s t-1 ,C t ).
[0112] The technical scheme of the embodiment can obtain the epidemiological data of the target region at a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining the meteorological data and the medical treatment data of the target region; determine the hidden state encoding information corresponding to each epidemiological data through the encoder in the pre-trained epidemic trend prediction model; determine the attention weight corresponding to each historical time node through the attention mechanism structure in the epidemic trend prediction model, and fuse each hidden state encoding information according to the attention weight corresponding to each historical time node to obtain the hidden state fusion information corresponding to the current time step; output the epidemic trend prediction result of the infectious disease according to the hidden state fusion information corresponding to the current time step; in this way, the relationship between climate and infectious disease pathogens can be analyzed by using the deep learning-based epidemic trend prediction model, and the influence of the epidemiological data corresponding to each historical time node on the epidemic trend prediction result can be effectively determined by using the attention mechanism, and the hidden state information corresponding to each historical time node is fused in combination with the influence, so that the epidemic trend of the infectious disease can be effectively predicted, the epidemic trend of the infectious disease after the prediction time node can be effectively predicted, and the epidemic trend of the infectious disease can be accurately predicted in combination with climate change.
[0113] In another embodiment, the encoder includes at least one encoding network, and determining the hidden state encoding information corresponding to each epidemiological data through the encoder in the pre-trained epidemic trend prediction model includes: taking the earliest historical time node in the historical time nodes as a current historical time node; inputting the epidemiological data corresponding to the current historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the current historical time node; inputting the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node; the next historical time node is the next historical time node of the current historical time node; taking the hidden state encoding information corresponding to the next historical time node as the hidden state encoding information corresponding to the current historical time node, and returning to input the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node until the hidden state encoding information corresponding to each historical time node is obtained.
[0114] The encoder includes at least one encoding network. In practical applications, the encoding network can be an LSTM (Long Short-Term Memory) network.
[0115] In its implementation, the electronic device determines the hidden state coding information corresponding to each epidemiological data point through the encoder in the pre-trained epidemic trend prediction model. The electronic device uses the earliest historical time point among all historical time points as the current historical time point. Then, it inputs the epidemiological data corresponding to the current historical time point into the coding network corresponding to that time point to obtain the hidden state coding information. The electronic device then inputs the hidden state coding information of the current historical time point and the epidemiological data of the next historical time point into the coding network corresponding to the current historical time point to obtain the hidden state coding information of the next historical time point. Finally, the electronic device uses the hidden state coding information of the next historical time point as the hidden state coding information of the current historical time point, and returns to the previous step of inputting the hidden state coding information of the current historical time point and the epidemiological data of the next historical time point into the coding network corresponding to the current historical time point to obtain the hidden state coding information of the next historical time point, repeating this process until the hidden state coding information for each historical time point is obtained. In practical applications, the hidden state coding information can be represented as:
[0116] H = [h] i-w ,h i-(w-1) ,...,h t-1 ] = LSTM encoder (Y)
[0117] The data is propagated forward by the encoder's LSTM network, i.e., at the current time h. t-1 The hidden state h of the previous LSTM unit t-2 and the current input value y t-1 Together, they calculated and obtained the hidden state matrix H = [h] for each time point. t-w ,h t-w+1 ,...,h t-1 ] = LSTM encoder (Y), where the column vectors of the hidden state matrix represent the states of multiple features at the same time step.
[0118] The technical scheme of the embodiment comprises the following steps: obtaining epidemiological data of a target region at a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical treatment data of the target region; determining hidden state encoding information corresponding to each epidemiological data by an encoder in a pre-trained epidemic trend prediction model; determining attention weights corresponding to each historical time node by an attention mechanism structure in the epidemic trend prediction model, and fusing each hidden state encoding information according to the attention weights corresponding to each historical time node to obtain hidden state fusion information corresponding to a current time step; and outputting an epidemic trend prediction result of the infectious disease according to the hidden state fusion information corresponding to the current time step. In this way, the relationship between climate and infectious disease pathogens can be analyzed by using the deep learning-based epidemic trend prediction model, the influence of the epidemiological data corresponding to each historical time node on the epidemic trend prediction result can be effectively determined by using the attention mechanism, and the hidden state information corresponding to each historical time node can be fused in combination with the influence, so that the epidemic trend of the infectious disease can be effectively predicted, the epidemic trend of the infectious disease after the prediction time node can be effectively predicted, and the epidemic trend of the infectious disease can be accurately predicted in combination with climate change.
[0119] In another embodiment, as shown in Figure 3 , an infectious disease epidemic trend prediction method is provided. The method is applied to an electronic device in Figure 1 for example, and comprises the following steps:
[0120] In step S302, historical epidemiological data of a target region is obtained; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical treatment data of the target region.
[0121] In step S304, an encoder in a pre-trained epidemic trend prediction model is used to determine hidden state encoding information corresponding to each epidemiological data.
[0122] In step S306, hidden state decoding information corresponding to a previous time step stored in the epidemic trend prediction model is obtained; the previous time step is a time step before the current time step.
[0123] In step S308, for any historical time node, the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to the any historical time node are input into an attention score layer in an attention mechanism structure in the epidemic trend prediction model to obtain attention score information corresponding to the any historical time node.
[0124] Step S310, input the attention score information corresponding to each of the historical time nodes to a normalization layer in the attention mechanism structure, obtain a normalization result corresponding to each of the attention score information, and obtain the attention weight corresponding to each of the historical time nodes.
[0125] Step S312, weight and sum each of the hidden state encoding information according to the attention weight corresponding to each of the historical time nodes, and obtain a weighted sum result.
[0126] Step S314, determine the weighted sum result as the hidden state fusion information corresponding to the current time step.
[0127] Step S316, obtain the hidden state decoding information and the popular trend prediction result corresponding to a previous time step stored in the popular trend prediction model; the previous time step is a time step before the current time step.
[0128] Step S318, input the hidden state decoding information corresponding to the previous time step, the popular trend prediction result corresponding to the previous time step, and the hidden state fusion information corresponding to the current time step to a decoder of the popular trend prediction model, and obtain the hidden state decoding information corresponding to the current time step.
[0129] Step S320, input the hidden state decoding information corresponding to the current time step to a fully connected layer in the popular trend prediction model, and obtain the popular trend prediction result of the infectious disease.
[0130] It should be noted that the specific definition of the above steps can be referred to the specific definition of the infectious disease popular trend prediction method described above, which will not be repeated here.
[0131] In order to facilitate the understanding of those skilled in the art, Figure 4 An example provides a schematic diagram of a data processing flow of an infectious disease popular trend prediction model; as shown in the figure, Figure 4 The electronic device can input the epidemiological data x of each historical time node to the encoder of the infectious disease popular trend prediction model, and obtain the hidden state encoding information h; the electronic device converts the hidden state encoding information into hidden state fusion information (i.e. context vector C) through the infectious disease popular trend prediction model; the decoder in the popular trend prediction model decodes the hidden state fusion information to obtain the hidden state decoding information S; the electronic device inputs the hidden state decoding information to the fully connected layer in the popular trend prediction model, and obtains the popular trend prediction result corresponding to the current time step.
[0132] Specifically, please refer to Figure 5 , Figure 5An example provides a structural diagram of an infectious disease epidemic trend prediction model; wherein the electronic device can obtain historical epidemiological data Y = [y i-w ,y i-(w-1) ,...,y i-2 ,y i-1 ] of a target area; the historical epidemiological data includes the epidemiological data of a preset number of historical time nodes before the prediction time node. Then, the electronic device inputs the historical epidemiological data into the pre-trained epidemic trend prediction model; wherein the electronic device takes the earliest y i-w th historical time node in each historical time node as the current historical time node; inputs the epidemiological data corresponding to the current historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the current historical time node; inputs the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node; the next historical time node is the next historical time node of the current historical time node; takes the hidden state encoding information corresponding to the next historical time node as the hidden state encoding information corresponding to the current historical time node, and returns to input the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node, until the hidden state encoding information H = [h i-w ,h i-(w-1) ,...,h t-1 ] corresponding to each historical time node is obtained = LSTM encoder (Y).
[0133] Then, the electronic device can determine the attention weight corresponding to each historical time node through the attention mechanism structure in the epidemic trend prediction model; please refer to Figure 6 , Figure 6 An example provides a structural diagram of an attention mechanism structure; wherein the electronic device can input the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to any historical time node into the attention score layer in the attention mechanism structure to obtain the attention score information corresponding to each historical time node; wherein the attention score layer can adopt a preset attention score model; in actual application, the attention score model can include dot product model, bilinear model, additive model, etc. The electronic device obtains the attention score information socre(h i ,s t-1) corresponding to each historical time node, and input the attention score information socre(h i ,s t-1 ) to a normalization exponential function, output a probability distribution, i.e. the normalization result corresponding to each attention score information, to obtain the attention weight a t (i) corresponding to each historical time node at the current time step t. The electronic device can weight and sum each hidden state encoding information according to the attention weight corresponding to each historical time node, to obtain a weighted sum result; and the electronic device determines the weighted sum result as the hidden state fusion information (i.e. the context vector) corresponding to the current time step.
[0134] The electronic device can input the hidden state decoding information s t-1 at the previous time step, the popular trend prediction result y t-1 at the previous time step, and the hidden state fusion information C t at the current time step to the decoder to obtain the hidden state decoding information at the current time step output at the current time step t. Then, the electronic device can input the hidden state decoding information at the current time step to the fully connected layer in the popular trend prediction model to obtain the popular trend prediction result y^ t at the current time step. Through the above method, the electronic device can output the popular trend prediction results of each time step following the current time step.
[0135] In another embodiment, the training method adopted by the pre-trained popular trend prediction model comprises: obtaining training sample data; the training sample data comprises a popular trend actual result corresponding to a label time node and popular epidemiological sample data of a preset number of historical time nodes before the label time node; inputting the popular epidemiological sample data of each historical time node to the popular trend prediction model to be trained to obtain a popular trend prediction result corresponding to the label time node; the process of the popular trend prediction model to be trained processing the popular epidemiological sample data is the same as the process principle of the pre-trained popular trend prediction model processing the popular epidemiological data; based on the difference between the popular trend actual result and the popular trend prediction result corresponding to the label time node, the popular trend prediction model to be trained is trained until the pre-trained popular trend prediction model is obtained.
[0136] In specific implementation, the pre-trained epidemic trend prediction model can be trained using the following method: the electronic device can acquire training sample data, which may include the actual epidemic trend results corresponding to the labeled time node and epidemiological sample data from a preset number of historical time nodes before the labeled time node. For example, the electronic device can use a dataset of influenza outpatient visits from a municipal infectious disease monitoring center from January 2009 to December 2017 and meteorological data from the World Energy Forecasting Database to determine the training sample data. For ease of understanding by those skilled in the art, Figure 7 An example is shown in the trend chart of the number of people seeking medical treatment for a type of influenza; among them, Figure 7 This is a trend chart of influenza virus infection data in the urban area of a certain city. Figure 8 An example is shown in a trend chart of meteorological data, in which, Figure 8 This is a trend graph of the average temperature in the urban area of a certain city. From... Figure 7 and Figure 8 It can be seen that temperature is clearly correlated with the trend of influenza virus infection.
[0137] For ease of understanding by those skilled in the art, such as Figure 9 As shown, Figure 9 A schematic diagram of Pearson correlation coefficients with multiple features is provided, which shows that influenza sequences are significantly correlated with climatic features such as temperature and humidity.
[0138] Electronic devices can input epidemiological sample data from various historical time points into the epidemic trend prediction model to be trained, and obtain the epidemic trend prediction results corresponding to the labeled time points. It should be noted that the process of the epidemic trend prediction model to be trained processing epidemiological sample data is the same as the process of the pre-trained epidemic trend prediction model processing epidemiological data described above, and will not be repeated here.
[0139] Electronic devices can train a trend prediction model based on the difference between the actual trend results and the trend prediction results corresponding to the label time points, until a pre-trained trend prediction model is obtained.
[0140] Specifically, electronic devices can analyze the predictive ability of a model based on evaluation metrics. The MAE (Mean Absolute Error) metric can be used to evaluate the model, measuring the deviation and average distance between the predicted and actual values. A smaller MAE value indicates that the model's prediction is closer to the actual value. Specifically, electronic devices can employ gradient descent and backpropagation algorithms from deep learning, using this metric value to adjust the model parameters of the trend prediction model, thus training the trend prediction model until a pre-trained trend prediction model is obtained.
[0141] The MAE index can be represented as:
[0142]
[0143] The popular trend prediction result can be represented as y The actual popular trend result can be represented as y i The actual popular trend result can be represented as y
[0144] In addition, the electronic device can utilize the precision decay rate index to calculate the growth amplitude of the RMSE (Root Mean Square Error) of the current time step and the previous time step, and obtain the precision decay rate information for evaluating the pros and cons of the popular trend prediction model.
[0145] The precision decay rate index can be represented as:
[0146]
[0147] The RMSE (Root Mean Square Error) can be represented as:
[0148]
[0149] Specifically, the electronic device can utilize the precision decay rate information to adjust the model parameters of the popular trend prediction model by using the gradient descent algorithm and the back propagation algorithm in deep learning, so as to train the popular trend prediction model to be trained, until the pre-trained popular trend prediction model is obtained.
[0150] In practical applications, the electronic device can divide the training sample data into a training set and a test set according to a ratio of 7:3. The training set data is used to train and save the model, and the test set is used to test and predict the test effect of the model. For the convenience of understanding of those skilled in the art, please refer to Figure 10 , Figure 10 A training flowchart of an infectious disease popular trend prediction model is provided; including the following steps: 1) collecting to obtain data; 2) performing data preprocessing on the collected data to obtain training sample data; 3) dividing the training sample data into a training set and a test set according to a ratio of 7:3. 4) using the training sample data in the training set to train the pre-constructed popular trend prediction model to be trained, to obtain a trained popular trend prediction model. 5) using the training sample data in the test set to analyze and evaluate the trained popular trend prediction model, until the trained popular trend prediction model meets the training end condition, to obtain a pre-trained popular trend prediction model.
[0151] The electronic device can use an Adam optimization algorithm (a kind of extension of the stochastic gradient descent method) and an EarlyStopping strategy to optimize the network parameters of the epidemic trend prediction model to be trained, and the patience round number parameter of the EarlyStopping strategy can be set to 5, please refer to Figure 11 When the training round number epoch reaches about 100, the loss function value (MAE evaluation index) tends to be stable.
[0152] At the same time, the electronic device can analyze the prediction ability of the model according to the precision decay rate index, which calculates the growth rate of the current time step and the previous time step. The more stable the model is, the more gentle the precision decay rate is. The results are shown in Figure 12 As can be seen from the analysis of the working principle of the attention mechanism, the reason why the precision decay rate is low and tends to be gentle is related to the role played by the attention mechanism adopted by the present disclosure.
[0153] In order to facilitate the understanding of those skilled in the art, FIG. 13 also provides a prediction result diagram of an epidemic trend prediction model; wherein, FIG. 13(a) exemplarily shows a comparison diagram of the virus epidemic trend prediction value and the true value at t+1 time step; and FIG. 13(b) exemplarily shows a comparison diagram of the virus epidemic trend prediction value and the true value at t+6 time step.
[0154] It should be understood that although each step in the flowchart involved in each embodiment described above is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0155] Based on the same inventive concept, the present application also provides an epidemic trend prediction device for implementing the above-mentioned epidemic trend prediction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more epidemic trend prediction device embodiments provided below can refer to the limitations of the epidemic trend prediction method described above, which will not be repeated here.
[0156] In one embodiment, as Figure 14As shown, an infectious disease epidemic trend prediction apparatus is provided, comprising:
[0157] The acquisition module 1410 is configured to acquire historical epidemiological data of a target region; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical treatment data of the infectious disease of the target region;
[0158] The encoding module 1420 is configured to determine hidden state encoding information corresponding to each of the epidemiological data by an encoder in a pre-trained epidemic trend prediction model.
[0159] The fusion module 1430 is configured to determine attention weights corresponding to each of the historical time nodes by an attention mechanism structure in the epidemic trend prediction model, and fuse each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes to obtain hidden state fusion information corresponding to a current time step.
[0160] The decoding module 1440 is configured to output an epidemic trend prediction result of the infectious disease according to the hidden state fusion information corresponding to the current time step.
[0161] In one of the embodiments, the fusion module 1430 is configured to acquire hidden state decoding information corresponding to a previous time step stored in the epidemic trend prediction model; the previous time step is a time step before the current time step; for any historical time node, the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to the any historical time node are input into an attention score layer in the attention mechanism structure to obtain attention score information corresponding to the any historical time node; and the attention weights corresponding to each of the historical time nodes are determined according to the attention score information corresponding to each of the historical time nodes.
[0162] In one of the embodiments, the fusion module 1430 is configured to input the attention score information corresponding to each of the historical time nodes into a normalization layer in the attention mechanism structure to obtain a normalization result corresponding to each of the attention score information, and obtain the attention weights corresponding to each of the historical time nodes.
[0163] In one of the embodiments, the fusion module 1430 is configured to perform weighted summation on each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes to obtain a weighted summation result; and determine the weighted summation result as the hidden state fusion information corresponding to the current time step.
[0164] In one of the embodiments, the decoding module 1440 is configured to decode the hidden state fusion information by using a decoder in the popular trend prediction model to obtain hidden state decoding information corresponding to the current time step; and input the hidden state decoding information corresponding to the current time step into a full connection layer in the popular trend prediction model to obtain the popular trend prediction result corresponding to the current time step.
[0165] In one of the embodiments, the decoding module 1440 is configured to obtain hidden state decoding information and a popular trend prediction result corresponding to a previous time step stored in the popular trend prediction model; the previous time step is a time step before the current time step; and input the hidden state decoding information corresponding to the previous time step, the popular trend prediction result corresponding to the previous time step, and the hidden state fusion information corresponding to the current time step into the decoder to obtain the hidden state decoding information corresponding to the current time step.
[0166] In one of the embodiments, the encoder comprises at least one encoding network, and the encoding module 1420 is configured to take the earliest historical time node in the historical time nodes as a current historical time node; input epidemiological data corresponding to the current historical time node into the encoding network corresponding to the current historical time node to obtain hidden state encoding information corresponding to the current historical time node; input the hidden state encoding information corresponding to the current historical time node and epidemiological data corresponding to a next historical time node into the encoding network corresponding to the current historical time node to obtain hidden state encoding information corresponding to the next historical time node; the next historical time node is a historical time node after the current historical time node; take the hidden state encoding information corresponding to the next historical time node as the hidden state encoding information corresponding to the current historical time node, and return to the step of inputting the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node until hidden state encoding information corresponding to each of the historical time nodes is obtained.
[0167] In one of the embodiments, the device is further configured to obtain training sample data, wherein the training sample data comprises an actual result of a popular trend corresponding to a label time node and epidemiological sample data of a preset number of historical time nodes before the label time node; input the epidemiological sample data of each of the historical time nodes into a to-be-trained popular trend prediction model to obtain a prediction result of the popular trend corresponding to the label time node; the to-be-trained popular trend prediction model processes the epidemiological sample data in the same principle as the pre-trained popular trend prediction model processes the epidemiological data; and train the to-be-trained popular trend prediction model based on a difference between the actual result of the popular trend and the prediction result of the popular trend corresponding to the label time node until the pre-trained popular trend prediction model is obtained.
[0168] The modules in the infectious disease popular trend prediction device described above can be implemented by software, hardware, or a combination thereof, in whole or in part. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in the computer device in software form, so as to be called and executed by a processor to perform the operations corresponding to the modules.
[0169] In one embodiment, a computer device is provided, which can be a terminal, and an internal structure diagram thereof can be as shown in Figure 15 The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved through WIFI, mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program is executed by the processor to implement an infectious disease popular trend prediction method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0170] Those skilled in the art can understand that Figure 15 The structure shown in the above description is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0171] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory storing a computer program, the computer program being executed by the processor to cause the processor to perform the steps of the infectious disease prevalence trend prediction method. The steps of the infectious disease prevalence trend prediction method can be the steps of the infectious disease prevalence trend prediction method of any of the embodiments described above.
[0172] In an embodiment, a computer readable storage medium is provided, storing a computer program, the computer program being executed by a processor to cause the processor to perform the steps of the infectious disease prevalence trend prediction method. The steps of the infectious disease prevalence trend prediction method can be the steps of the infectious disease prevalence trend prediction method of any of the embodiments described above.
[0173] In an embodiment, a computer program product is provided, comprising a computer program, the computer program being executed by a processor to cause the processor to perform the steps of the infectious disease prevalence trend prediction method. The steps of the infectious disease prevalence trend prediction method can be the steps of the infectious disease prevalence trend prediction method of any of the embodiments described above.
[0174] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.
[0175] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0176] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.
[0177] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method of predicting an epidemic trend of an infectious disease, characterized by, The method comprises: obtaining historical epidemiological data of a target area; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical data of the target area and the infectious disease; determining hidden state encoding information corresponding to each of the epidemiological data through an encoder in a pre-trained epidemic trend prediction model; the hidden state encoding information of a first historical time node is obtained according to the epidemiological data of the historical time node; the hidden state encoding information of a non-first historical time node is obtained according to the epidemiological data of the historical time node and the hidden state encoding information of a previous historical time node; determining attention weights corresponding to each of the historical time nodes through an attention mechanism structure in the epidemic trend prediction model, and fusing each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes, to obtain hidden state fusion information corresponding to a current time step; the attention weight corresponding to the historical time node is obtained according to hidden state decoding information corresponding to a previous time step and the hidden state encoding information corresponding to the historical time node; obtaining hidden state decoding information corresponding to the current time step according to the hidden state fusion information corresponding to the current time step and hidden state decoding information corresponding to a previous time step and an epidemic trend prediction result through a decoder in the epidemic trend prediction model, and outputting the epidemic trend prediction result of the infectious disease according to the hidden state decoding information.
2. The method of claim 1, wherein, The determining of the attention weights corresponding to each of the historical time nodes through the attention mechanism structure in the epidemic trend prediction model comprises: obtaining hidden state decoding information corresponding to a previous time step stored in the epidemic trend prediction model; the previous time step is a time step before the current time step; for any one of the historical time nodes, inputting the hidden state decoding information corresponding to the previous time step and the hidden state encoding information corresponding to the any one of the historical time nodes into an attention score layer in the attention mechanism structure, to obtain attention score information corresponding to the any one of the historical time nodes; determining the attention weights corresponding to each of the historical time nodes according to the attention score information corresponding to each of the historical time nodes.
3. The method of claim 2, wherein, The determining of the attention weights corresponding to each of the historical time nodes according to the attention score information corresponding to each of the historical time nodes comprises: inputting the attention score information corresponding to each of the historical time nodes into a normalization layer in the attention mechanism structure, to obtain a normalization result corresponding to each of the attention score information, and obtain the attention weights corresponding to each of the historical time nodes.
4. The method of claim 1, wherein, The fusing of each of the hidden state encoding information according to the attention weights corresponding to each of the historical time nodes, to obtain hidden state fusion information corresponding to a current time step, comprises: According to the attention weight corresponding to each historical time node, the hidden state encoding information is weighted and summed to obtain a weighted sum result; Determine the weighted sum result as the hidden state fusion information corresponding to the current time step.
5. The method of claim 1, wherein, According to the hidden state fusion information corresponding to the current time step, the hidden state decoding information and the popular trend prediction result corresponding to the previous time step, the decoder in the popular trend prediction model obtains the hidden state decoding information corresponding to the current time step, and outputs the popular trend prediction result of the infectious disease according to the hidden state decoding information, including: According to the hidden state fusion information corresponding to the current time step, the hidden state decoding information and the popular trend prediction result corresponding to the previous time step, the decoder in the popular trend prediction model obtains the hidden state decoding information corresponding to the current time step; The hidden state decoding information corresponding to the current time step is input into the full connection layer in the popular trend prediction model to obtain the popular trend prediction result corresponding to the current time step.
6. The method of claim 5, wherein, According to the hidden state fusion information corresponding to the current time step, the hidden state decoding information and the popular trend prediction result corresponding to the previous time step, the decoder in the popular trend prediction model obtains the hidden state decoding information corresponding to the current time step, including: Obtain the hidden state decoding information and the popular trend prediction result corresponding to the previous time step stored by the popular trend prediction model; the previous time step is the previous time step of the current time step; The hidden state decoding information corresponding to the previous time step, the popular trend prediction result corresponding to the previous time step and the hidden state fusion information corresponding to the current time step are input into the decoder to obtain the hidden state decoding information corresponding to the current time step.
7. The method of claim 1, wherein, The encoder includes at least one encoding network, and the encoder in the pre-trained popular trend prediction model determines the hidden state encoding information corresponding to each epidemiological data, including: The earliest historical time node in each historical time node is taken as a current historical time node; The epidemiological data corresponding to the current historical time node is input into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the current historical time node; The hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node are input into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node; the next historical time node is the next historical time node of the current historical time node; The hidden state encoding information corresponding to the next historical time node is taken as the hidden state encoding information corresponding to the current historical time node, and the step of inputting the hidden state encoding information corresponding to the current historical time node and the epidemiological data corresponding to the next historical time node into the encoding network corresponding to the current historical time node to obtain the hidden state encoding information corresponding to the next historical time node is returned, until the hidden state encoding information corresponding to each historical time node is obtained.
8. The method of claim 1, wherein, The training method adopted by the pre-trained popular trend prediction model comprises: obtaining training sample data; the training sample data comprises a popular trend actual result corresponding to a label time node and epidemiological sample data of a preset number of historical time nodes before the label time node; inputting the epidemiological sample data of each historical time node into a popular trend prediction model to be trained to obtain a popular trend prediction result corresponding to the label time node; the process of the popular trend prediction model to be trained processing the epidemiological sample data is the same in principle as the process of the pre-trained popular trend prediction model processing the epidemiological data; training the popular trend prediction model to be trained based on the difference between the popular trend actual result and the popular trend prediction result corresponding to the label time node until the pre-trained popular trend prediction model is obtained.
9. An infectious disease epidemic trend prediction apparatus characterized by comprising: The device comprises: an obtaining module configured to obtain historical epidemiological data of a target region; the historical epidemiological data comprises epidemiological data of a preset number of historical time nodes before a prediction time node; the epidemiological data is data obtained by combining meteorological data and medical treatment data of the infectious disease of the target region; an encoding module configured to determine hidden state encoding information corresponding to each epidemiological data by using an encoder in a pre-trained popular trend prediction model; wherein the hidden state encoding information of a first historical time node is obtained according to the epidemiological data of the historical time node; and the hidden state encoding information of a non-first historical time node is obtained according to the epidemiological data of the historical time node and hidden state encoding information of a previous historical time node; a fusion module configured to determine attention weights corresponding to each historical time node by using an attention mechanism structure in the popular trend prediction model, and fuse each hidden state encoding information according to the attention weights corresponding to each historical time node to obtain hidden state fusion information corresponding to a current time step; wherein the attention weights corresponding to the historical time node are obtained according to hidden state decoding information corresponding to a previous time step and hidden state encoding information corresponding to the historical time node. The decoding module is configured to obtain hidden state decoding information corresponding to the current time step by a decoder in the popular trend prediction model according to the hidden state fusion information corresponding to the current time step and the hidden state decoding information corresponding to the previous time step and the popular trend prediction result, and output the popular trend prediction result of the infectious disease according to the hidden state decoding information. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8.
12. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Infectious disease epidemic trend prediction method and device
CN113793693A