Hospital respiratory infectious disease daily case prediction method based on deep learning

CN122531790APending Publication Date: 2026-08-07DALIAN UNIV OF TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN UNIV OF TECH
Filing Date
2026-04-03
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0010]1.解决现有宏观预测模型难以适配单中心医院小样本、高噪声数据特性,导致过拟合或性能退化的问题;

Benefits of technology

[0147]1.本发明针对现有宏观预测模型难以适配单中心医院小样本、高噪声数据特性,以及对稀疏峰值与长时序依赖建模能力不足的问题,提出了一种基于深度学习的医院呼吸道传染病日病例预测方法:Epi-TITANet,显著提升了医院级呼吸道传染病预测的准确性与早期预警性能,为医院实现精细化、前瞻性的资源管理提供可靠的数据驱动工具。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122531790A_ABST
    Figure CN122531790A_ABST
Patent Text Reader

Abstract

The present application relates to the field of respiratory infectious disease prediction, in particular to a hospital respiratory infectious disease daily case prediction method based on deep learning. The present application aims at the problems that the existing macro prediction model is difficult to adapt to the characteristics of small sample and high noise data of single center hospital, and the modeling ability of sparse peak and long time sequence is insufficient, and proposes a hospital respiratory infectious disease daily case prediction method based on deep learning: Epi-TITANet, which significantly improves the accuracy and early warning performance of hospital respiratory infectious disease prediction, and provides a reliable data-driven tool for the realization of fine and forward-looking resource management of the hospital. The present application adopts a causal dilated convolution network to construct a double-flow encoder, which strictly guarantees causality, efficiently expands the receptive field through an exponential growth factor, effectively adapts to the characteristics of high noise and small sample of local hospital data, and avoids overfitting or performance degradation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of respiratory infectious disease prediction, and in particular to a deep learning-based method for predicting daily cases of respiratory infectious diseases in hospitals. Background Technology

[0002] Since the beginning of the 21st century, global public health security has faced a persistent and severe challenge from respiratory infectious diseases. From the periodic outbreaks of seasonal influenza to SARS, MERS, and the COVID-19 pandemic, these diseases, characterized by rapid transmission, wide impact, and high socioeconomic costs, have placed enormous pressure on modern healthcare systems. Tertiary hospitals, as regional medical centers and core units for responding to public health emergencies, experience non-linear and explosive growth in outpatient and emergency room visits and hospitalization rates during peak seasons or pandemics of respiratory infectious diseases. This can easily lead to a strain on critical medical resources and disruptions in treatment processes, posing a severe test to the hospital's refined operations and emergency response capabilities. Against this backdrop, high-precision and forward-looking disease prediction is a key decision-making basis for optimizing medical resource allocation and improving emergency response efficiency. Although there are currently numerous research and application projects targeting respiratory infectious diseases, most are concentrated at the macro level, such as national or regional levels, with a time resolution typically of weekly or monthly, making it difficult to directly guide daily operational decisions at the hospital level.

[0003] In recent years, scholars have conducted extensive research on how to accurately predict the spread of respiratory infectious diseases. Existing prediction methods mainly include those based on infectious disease dynamics models, statistical models, machine learning, and deep learning. Methods based on infectious disease dynamics models such as SEIR heavily rely on prior assumptions about the transmission mechanism and manual parameter tuning, lacking the ability to fit high-frequency noise and nonlinear fluctuations in real hospital historical visit sequences, making it difficult to directly translate into daily-level workload prediction tools. Statistical model-based methods have two major shortcomings when dealing with daily hospital visit sequences: first, limited feature representation capabilities, making it difficult to effectively integrate multiple covariates such as external environmental factors; second, weak long-range dependency modeling capabilities, failing to fully capture cross-year seasonal patterns and long-term trends, resulting in short lead times and large peak errors in predicting visit peaks. Machine learning-based methods heavily rely on the quality of manual feature engineering, and the models themselves cannot automatically learn deep spatiotemporal dependencies from raw time-series data. When applied to hospital data with limited sample sizes and sudden sparse peaks, they are prone to overfitting to noise or exhibiting instability when extrapolating data distributions.

[0004] Deep learning models, with their powerful end-to-end feature learning and complex nonlinear relationship mapping capabilities, have demonstrated significant advantages in modeling global dependencies in long sequences. However, directly transferring advanced deep learning models to hospital-level prediction scenarios still faces a core contradiction: the model capacity is mismatched with the data scale. Deep learning models are typically highly complex and prone to overfitting on small samples of hospital data. More importantly, existing architectures are mostly general time-series designs, failing to specifically optimize for the coexistence of extremely sparse peaks and slow, long-term trends in hospital visitation data. Their attention mechanisms often treat all time points equally, lacking the ability to differentiate and collaboratively model key abrupt changes (such as the starting point of an epidemic) and long-term background patterns (such as annual seasonality), which is crucial for achieving accurate early warning.

[0005] In summary, a high temporal resolution, robust, and interpretable respiratory infectious disease prediction model suitable for single-center hospitals is a key decision-making basis for optimizing medical resource allocation and improving emergency response efficiency. Existing technologies have the following problems:

[0006] 1. Generalization challenges under small sample sizes: Macro models and general deep learning architectures are difficult to adapt to the characteristics of high noise and small sample sizes of local hospital data, which can easily lead to overfitting or performance degradation.

[0007] 2. Challenges in collaborative modeling of complex time series patterns: The patient visit volume sequence contains both sudden sparse peaks and slow long-cycle trends, and existing methods lack a targeted collaborative modeling mechanism for this heterogeneous time series pattern.

[0008] 3. The challenge of dynamic fusion of multi-source heterogeneous data: The correlation between multi-source data such as the external environment and disease transmission is dynamic and time-varying, and simple feature splicing cannot achieve its adaptive deep fusion. Summary of the Invention

[0009] To address the shortcomings of existing technologies, the present invention aims to provide a deep learning-based method for predicting daily cases of respiratory infectious diseases in hospitals, solving the following key technical problems:

[0010] 1. To address the problem that existing macro-prediction models are difficult to adapt to the characteristics of small sample and high-noise data from single-center hospitals, leading to overfitting or performance degradation;

[0011] 2. To address the problem that existing methods are insufficient in modeling sudden sparse peaks and long-term time-series dependencies in patient visit volume sequences, resulting in limited prediction accuracy;

[0012] 3. To address the shortcomings of existing methods in fully mining the dynamic and nonlinear associations between multi-source heterogeneous data and epidemiological time series, and the inability of simple feature splicing to achieve adaptive deep fusion;

[0013] 4. To address the problem that existing deep learning prediction models lack clinical interpretability mechanisms, making it difficult to meet the needs for model transparency and auditability in medical decision-making.

[0014] To achieve the above objectives, the technical solution of the present invention is as follows:

[0015] A deep learning-based method for predicting daily cases of respiratory infectious diseases in hospitals, named Epi-TITANet, is presented, with the following steps:

[0016] Step S1: Obtain the historical daily confirmed case sequence and the concurrent multidimensional environmental covariate sequence of the target hospital and perform preprocessing. The multidimensional environmental covariate sequence includes daily meteorological data and regional monitoring indicators.

[0017] Step S2: Construct a dual-stream time-series encoder to encode the historical daily confirmed case sequence and the multidimensional environmental covariate sequence respectively, and extract the multi-scale time-series representation of infection history and the multi-scale time-series representation of environmental variables;

[0018] Specifically, the dual-stream temporal encoder is constructed based on a causal dilated temporal convolutional network (CD-TCN), including an infection history stream encoder and an environment variable stream encoder. The two encoders have the same structure and process in parallel.

[0019] Step S2.1: Construct the infection history stream encoder

[0020] enter: ;

[0021] First, the one-dimensional sequence is mapped to a high-dimensional feature space through the input projection layer:

[0022]

[0023] in, is the feature dimension of the hidden layer.

[0024] Then through Encoding is performed by stacking temporal blocks, the first... The input of each timing block is The output is ,in .

[0025] A single temporal block contains two cascaded causal dilated convolutional layers, with the two layers sharing the same dilation factor. . No. The expansion factor of a time block is defined as:

[0026]

[0027] The operation of the first causal dilated convolutional layer is defined as follows:

[0028]

[0029] in, The kernel size; The kernel weight matrix; It is the bias vector; For time step index, .

[0030] To strictly guarantee causality, convolution uses zero-padding, with a padding length of [value missing]. And truncate the same number of time steps at the end of the output to ensure that the current output depends only on the history and the current input.

[0031] The convolutional output passes through batch normalization, ReLU activation function, and Dropout layer in sequence:

[0032]

[0033] The second causal dilated convolutional layer processes the problem in the same way:

[0034]

[0035]

[0036] Block outputs are connected to fused inputs via residual connections:

[0037]

[0038] When the number of input and output channels does not match, the residual connection is aligned in dimensions using a 1×1 convolution:

[0039]

[0040] go through After one time-series block, the final output of the infection history stream is:

[0041]

[0042] in, This refers to a multi-scale temporal representation of the infection history. Indicates the first Infection history feature vector at each time step.

[0043] Step S2.2: Construct an environment variable stream encoder

[0044] enter:

[0045] First, the environmental features are mapped to a high-dimensional feature space through the input projection layer:

[0046]

[0047] in, The hidden layer feature dimension for environmental variables.

[0048] Then, using the same encoder as the infection history stream encoder... Encode the first time block, the second... The processing method for each time block is completely consistent with that of the infection history stream encoder described above.

[0049] go through After one time-series block, the final output of the environment variable stream is:

[0050]

[0051] in, This refers to the multi-scale time-series representation of environmental variables. Indicates the first The environmental variable feature vector at each time step.

[0052] Step S3: Construct a gated cross-attention module to dynamically and adaptively fuse the multi-scale temporal representation of the infection history and the multi-scale temporal representation of the environmental variables, generate fused features, and output an interpretable attention weight matrix;

[0053] Unlike conventional attention mechanisms that operate on the time series dimension, this module preserves and utilizes the independence of environmental variables on the feature dimension.

[0054] Specifically, the gated cross-attention module includes the following sub-steps:

[0055] Step S3.1: Multi-head attention calculation

[0056] Multi-scale temporal characterization of the infection history As a query, it represents the multi-scale time series of environmental variables. The transposed value is used as a key-value pair.

[0057] First of all Transpose the matrix to obtain the environmental feature matrix:

[0058]

[0059] Then calculate the linear projection of Query, Key, and Value:

[0060]

[0061]

[0062]

[0063] in, , , The weight matrix is ​​a learnable weight matrix; The dimension of the key vector. The dimension of the value vector.

[0064] Attention weights are calculated using scaled dot product attention:

[0065]

[0066] in, Indicates the first Time step for the first The weight of attention for each environmental feature.

[0067] Attention output is:

[0068]

[0069] A multi-head attention mechanism is adopted, with a number of heads of attention. The outputs of multiple heads are concatenated:

[0070]

[0071] in, This is for outputting the projection matrix.

[0072] Step S3.2: Gated Residual Fusion

[0073] To avoid overfitting under small sample sizes and enhance robustness, a gated residual fusion mechanism is introduced to dynamically adjust the interaction intensity.

[0074] First, calculate the global representation of the environmental features:

[0075]

[0076] Will Mapped to via a fully connected layer Same dimensions:

[0077]

[0078] in, , .

[0079] Then, gating coefficients are generated by concatenating infection characteristics with the global environment:

[0080]

[0081] in, This indicates that the elements are concatenated one by one and then compressed using a fully connected layer. For the Sigmoid function, , ; Indicates the first The gating coefficient vector of the time step.

[0082] Step S3.3: Adaptive Fusion Output

[0083] Ultimately, adaptive fusion is achieved through residual connections:

[0084]

[0085] in, This represents element-wise multiplication (Hadamard product).

[0086] This design achieves adaptive fusion: gating coefficient Dynamically adjust the fusion strength when Time to return to the characteristics of infection history Ensure stability, when This allows for the full utilization of the selective enhancement effect of attention mechanisms.

[0087] Meanwhile, the attention weight matrix output by the module is:

[0088]

[0089] It provides intuitive visualizations to explain which external environmental factors played a key driving role in different stages of the pandemic.

[0090] Step S4: Construct a lightweight trend detector to process the historical daily confirmed case sequence, explicitly model it, and extract long-term transmission trend components;

[0091] Specifically, the lightweight trend detector employs an efficient dual-path architecture design:

[0092] Step S4.1: Global Linear Trend Path Capture

[0093] Capture global linear trends through a lightweight fully connected layer:

[0094]

[0095] in, As a fully connected layer, first... Flattened, then reshaped through a fully connected layer ; This represents the trend characteristic dimension.

[0096] Step S4.2: Extraction of local fluctuation paths

[0097] Using small kernel convolutional layers to extract short-term fluctuations and detail patterns in sequences:

[0098]

[0099] in, For convolution kernel weights, This is the bias vector. Zero padding is used for boundary time steps.

[0100] Output:

[0101] Step S4.3: Adaptive Fusion

[0102] The outputs of the two paths are passed through learnable weights Adaptive fusion is performed to form the final trend prior:

[0103]

[0104] in, As learnable scalar weights, their range of values ​​is constrained by the Sigmoid function.

[0105] Step S5: Construct a TCN decoder, integrate the fusion features with the long-term propagation trend components, and generate a daily new case prediction sequence for the next preset number of days.

[0106] Specifically, firstly, the fusion features With the aforementioned long-term propagation trend components Concatenate along the feature dimension:

[0107]

[0108] The concatenated features are mapped to the hidden dimension of the decoder using a projection layer:

[0109]

[0110] in, , ; Hiding dimensions for the decoder.

[0111] Decoder via Each time block is processed, and the structure of each time block is the same as that of the time blocks in the encoder. The dilation factor sequence of the decoder is as follows: , .

[0112] The decoder output is:

[0113]

[0114] Take the hidden state of the last time step as the context representation for prediction:

[0115]

[0116] Generate the future by outputting a fully connected layer. Predicted sequence for the day:

[0117]

[0118] in, , ; This is the predicted sequence on a logarithmic scale.

[0119] Finally, the prediction results are subjected to an inverse exponential transform to restore them to the original data scale:

[0120]

[0121] The final output prediction sequence is obtained:

[0122]

[0123] Preferably, the prediction model used in the prediction method is trained using a differential loss function: PeakSensitiveHuberLoss (PSHL) loss function is used for seasonal respiratory infectious disease prediction tasks, and MSELoss loss function is used for non-seasonal prediction tasks.

[0124] Loss function design specifications:

[0125] The complete expression for the PSHL loss function is as follows:

[0126]

[0127] in, The number of samples; For the first The true value of each sample; For the first The predicted value for each sample.

[0128] (1) Huber loss term:

[0129]

[0130] in, This is the Huber loss threshold.

[0131] (2) Exponential peak weighting mechanism:

[0132] The formula for calculating peak weight is:

[0133]

[0134] in, It is the exponential growth coefficient; This is the true value after logarithmic transformation.

[0135] (3) Special handling of the zero value region:

[0136] For those that meet the occlusion condition ( For samples that are not properly weighted, their weights will be forced to be set to lower weights.

[0137]

[0138] in, The weight is zero.

[0139] (4) Temporal continuity regularization:

[0140] The time regularization term is defined as:

[0141]

[0142] in, The coefficient for the time regularization term.

[0143] The complete expression for the MSELoss loss function is as follows:

[0144]

[0145] Preferably, the prediction method further includes an attention weight visualization function: the attention weight matrix output by the gated cross-attention mechanism is visualized to generate a factor contribution heatmap, which is used to explain the key driving role of external environmental factors at different stages of epidemic development.

[0146] Compared with existing technical solutions, the beneficial effects of the present invention are as follows:

[0147] 1. This invention addresses the shortcomings of existing macro-prediction models, which struggle to adapt to the characteristics of small-sample, high-noise data from single-center hospitals and lack the ability to model sparse peaks and long-term time-series dependencies. It proposes a deep learning-based method for predicting daily cases of respiratory infectious diseases in hospitals: Epi-TITANet. This method significantly improves the accuracy of hospital-level respiratory infectious disease prediction and early warning performance, providing a reliable data-driven tool for hospitals to achieve refined and forward-looking resource management.

[0148] 2. Improve generalization ability in small sample scenarios: This invention uses a causal dilated convolutional network to construct a dual-stream encoder. While strictly ensuring causality, it efficiently expands the receptive field through an exponentially growing dilation factor, effectively adapting to the characteristics of high noise and small sample size of local hospital data, and avoiding overfitting or performance degradation.

[0149] 3. Enhance the accuracy of sparse peak prediction: This invention achieves dynamic adaptive fusion between infection history and environmental factors through a gated cross-attention mechanism. At the same time, it designs the PeakSensitiveHuberLoss loss function for influenza prediction tasks, which significantly improves the ability to capture sparse but critical peak events.

[0150] 4. Achieve dynamic deep fusion of multi-source heterogeneous data: Unlike conventional attention mechanisms that operate in the time series dimension, the gated cross-attention module of this invention retains and utilizes the independence of environmental variables in the feature dimension, thus achieving adaptive fusion.

[0151] 5. Enhanced long-term time-series dependency modeling capabilities: This invention uses a lightweight trend detector with extremely low parameter overhead to explicitly and robustly extract the dominant long-term trend components from short sequences as strong priors for prediction.

[0152] 6. Enhance clinical interpretability and decision credibility: This invention transforms the model's decision-making process into a heatmap of factor contribution that clinical experts can understand through an attention weight visualization mechanism, which greatly satisfies the rigid requirements for model interpretability and auditability in clinical decision-making. Attached Figure Description

[0153] Figure 1 This is the overall flowchart of the present invention.

[0154] Figure 2(a) shows the MAE index results of the model performance and comparison chart.

[0155] Figure 2(b) shows the model performance and the RMSE index results of the comparison chart. Detailed Implementation

[0156] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are all within the scope of protection of the present invention.

[0157] A deep learning-based method for predicting daily cases of respiratory infectious diseases in hospitals includes the following steps:

[0158] Step S1: Data Acquisition and Preprocessing

[0159] Obtain the historical daily confirmed case sequence and the concurrent multidimensional environmental covariate sequence of the target hospital.

[0160] Specifically, the input historical daily confirmed case sequence is defined as:

[0161]

[0162] in, In a preferred embodiment, the input sequence length is... The data used is the daily number of newly confirmed cases over the past 30 days. Indicates the first The number of newly confirmed cases per day.

[0163] Define the contemporaneous multidimensional environmental covariate sequence as:

[0164]

[0165] in, The environmental characteristics dimension. In a preferred embodiment, the multidimensional environmental covariates include daily meteorological data and regional monitoring indicators, specifically including: temperature, relative humidity, wind speed, precipitation, atmospheric pressure, air quality index, population mobility index, etc. Indicates the first Multidimensional environmental feature vectors of the day.

[0166] Define the output prediction sequence as:

[0167]

[0168] in, In a preferred embodiment, to predict sequence length, The number of new daily cases is predicted for the next 14 days.

[0169] During the data preprocessing stage, the acquired data undergoes the following transformations:

[0170] (1) Perform a logarithmic transformation on the confirmed case sequence to compress the data range and stabilize the variance:

[0171]

[0172] The transformed sequence is denoted as .

[0173] (2) Z-score standardization is applied to the multidimensional environmental covariate sequence to ensure that each feature has zero mean and unit variance:

[0174]

[0175] in, This is the mean vector of environmental features on the training set. Let be the standard deviation vector, and the division be element-wise. The standardized sequence of environmental covariates is denoted as . .

[0176] (3) For missing values, linear interpolation is used to fill them in; for outliers, the 3σ principle is used to identify and replace them with the mean of adjacent valid values.

[0177] Step S2: Encode confirmed cases and environmental sequences using a dual-stream temporal encoder.

[0178] The historical daily confirmed case sequence and the multidimensional environmental covariate sequence are encoded by a dual-stream time encoder to extract multi-scale time-series representations of infection history and environmental variables.

[0179] Step S2.1: Extract multi-scale temporal representation of infection history using an infection history stream encoder.

[0180] Enter the historical daily confirmed case sequence: ;

[0181] First, the one-dimensional sequence is mapped to a high-dimensional feature space through the input projection layer:

[0182]

[0183] In a preferred embodiment, the hidden layer feature dimension or .

[0184] Then through Encoding is performed by stacking time blocks, the first... The input of each timing block is The output is ,in .

[0185] A single temporal block contains two cascaded causal dilated convolutional layers, with the two layers sharing the same dilation factor. . No. The expansion factor of a time block is defined as:

[0186]

[0187] The operation of the first causal dilated convolutional layer is defined as follows:

[0188]

[0189] in, In a preferred embodiment, the kernel size is [value missing]. ; The kernel weight matrix; It is the bias vector; For time step index, .

[0190] To strictly guarantee causality, convolution uses zero padding with a padding length of [value missing]. And truncate the same number of time steps at the end of the output to ensure that the current output depends only on the history and the current input.

[0191] The convolutional output passes through batch normalization, ReLU activation function, and Dropout layer in sequence:

[0192]

[0193] The second causal dilated convolutional layer processes the problem in the same way:

[0194]

[0195]

[0196] Block outputs are connected to fused inputs via residual connections:

[0197]

[0198] When the number of input and output channels does not match, the residual connection is aligned in dimensions using a 1×1 convolution:

[0199]

[0200] go through After one time-series block, the final output of the infection history stream is:

[0201]

[0202] in, This refers to a multi-scale temporal representation of the infection history. Indicates the first Infection history feature vector at each time step.

[0203] S2.2 Extracting Multi-Scale Time Series Representations of Environmental Variables Using an Environmental Variable Stream Encoder

[0204] Input environment feature sequence:

[0205] First, the environmental features are mapped to a high-dimensional feature space through the input projection layer:

[0206]

[0207] in, In a preferred embodiment, the hidden layer feature dimension for environmental variables is... or .

[0208] Then, using the same encoder as the infection history stream encoder... Encode the first time block, the second... The processing method for each time block is completely consistent with that of the infection history stream encoder described above.

[0209] go through After one time-series block, the final output of the environment variable stream is:

[0210]

[0211] in, This refers to the multi-scale time-series representation of environmental variables. Indicates the first The environmental variable feature vector at each time step.

[0212] Step S3: Implement feature interaction fusion using a gated cross-attention module.

[0213] The multi-scale temporal representation of infection history and the multi-scale temporal representation of environmental variables are dynamically and adaptively fused using a gated cross-attention mechanism to generate fused features and output an interpretable attention weight matrix.

[0214] Specifically, the gated cross-attention mechanism includes the following sub-steps:

[0215] Step S3.1: Multi-head attention calculation

[0216] Multi-scale temporal characterization of the infection history As a query, it represents the multi-scale time series of environmental variables. The transposed value is used as a key-value pair.

[0217] First of all Transpose the matrix to obtain the environmental feature matrix:

[0218]

[0219] Then calculate the linear projection of Query, Key, and Value:

[0220]

[0221]

[0222]

[0223] in, , , The weight matrix is ​​a learnable weight matrix; The dimension of the key vector. In a preferred embodiment, the dimension is the value vector. .

[0224] Attention weights are calculated using scaled dot product attention:

[0225]

[0226] in, Indicates the first Time step for the first The weight of attention for each environmental feature.

[0227] Attention output is:

[0228]

[0229] In a preferred embodiment, a multi-head attention mechanism is employed, with the number of heads being [number missing]. The outputs of multiple heads are concatenated:

[0230]

[0231] in, This is for outputting the projection matrix.

[0232] Step S3.2: Gated Residual Fusion

[0233] To avoid overfitting under small sample sizes and enhance robustness, a gated residual fusion mechanism is introduced to dynamically adjust the interaction intensity.

[0234] First, calculate the global representation of the environmental features:

[0235]

[0236] Will Mapped to via a fully connected layer Same dimensions:

[0237]

[0238] in, , .

[0239] Then, gating coefficients are generated by concatenating infection characteristics with the global environment:

[0240]

[0241] in, This indicates that the elements are concatenated one by one and then compressed using a fully connected layer. For the Sigmoid function, , ; Indicates the first The gating coefficient vector of the time step.

[0242] Step S3.3: Adaptive Fusion Output

[0243] Ultimately, adaptive fusion is achieved through residual connections:

[0244]

[0245] in, This indicates element-wise multiplication.

[0246] Meanwhile, the attention weight matrix output by the module is:

[0247]

[0248] It provides intuitive visualizations to explain which external environmental factors played a key driving role in different stages of the pandemic.

[0249] Step S4: Lightweight Trend Detection

[0250] The historical daily confirmed case sequence was processed using a lightweight trend detector to explicitly model and extract long-term transmission trend components.

[0251] Step S4.1: Global Linear Trend Path

[0252] Capture global linear trends through a lightweight fully connected layer:

[0253]

[0254] in, As a fully connected layer, first... Flattened, then reshaped through a fully connected layer ; In a preferred embodiment, the trend feature dimension is used as the basis for analysis. .

[0255] Step S4.2: Local Fluctuation Path

[0256] Using small kernel convolutional layers to extract short-term fluctuations and detail patterns in sequences:

[0257]

[0258] The kernel size is 3. For convolution kernel weights, This is the bias vector. Zero padding is used for boundary time steps.

[0259] Output:

[0260] Step S4.3: Adaptive Fusion

[0261] The outputs of the two paths are passed through learnable weights Adaptive fusion is performed to form the final trend prior:

[0262]

[0263] in, As learnable scalar weights, their range of values ​​is constrained by the Sigmoid function.

[0264] Step S5: TCN Decoding and Prediction Output

[0265] The TCN decoder integrates the fusion features with the long-term propagation trend components to generate a daily new case prediction sequence for the next preset number of days.

[0266] Specifically, firstly, the fusion features With the aforementioned long-term propagation trend components Concatenate along the feature dimension:

[0267]

[0268] The concatenated features are mapped to the hidden dimension of the decoder using a projection layer:

[0269]

[0270] in, , ; To hide dimensions for the decoder, in a preferred embodiment, .

[0271] Decoder via Processing each time block. The value can be 2, 3 or 4, and the structure of each timing block is the same as that of the timing blocks in the encoder.

[0272] The decoder output is:

[0273]

[0274] Take the hidden state of the last time step as the context representation for prediction:

[0275]

[0276] Generate the future by outputting a fully connected layer. Predicted sequence for the day:

[0277]

[0278] in, , ; This is the predicted sequence on a logarithmic scale.

[0279] Finally, the prediction results are subjected to an inverse exponential transform to restore them to the original data scale:

[0280]

[0281] Final output predicted sequence:

[0282]

[0283] Loss function design specifications:

[0284] Preferably, the method further includes a loss function optimization step: using differentiated loss functions for different disease types.

[0285] For tasks involving the prediction of seasonal respiratory infectious diseases, such as influenza, the PSHL loss function is used, and its complete expression is as follows:

[0286]

[0287] in, The number of samples; For the first The true value of each sample; For the first The predicted value for each sample. In a preferred embodiment, the exponential growth coefficient. Concealment conditions Zero-value weights ;

[0288] Huber loss item Defined as:

[0289]

[0290] In a preferred embodiment, the Huber loss threshold .

[0291] Time regularization term Defined as:

[0292]

[0293] In a preferred embodiment, the time regularization coefficient .

[0294] For tasks involving the prediction of non-seasonal respiratory infectious diseases, such as COVID-19, the MSELoss loss function is used:

[0295]

[0296] Attention weight visualization explanation:

[0297] Preferably, the method further includes an attention weight visualization step: visualizing the attention weight matrix output by the gated cross-attention mechanism. Visualize the data to generate a heatmap of factor contributions.

[0298] Specifically, the attention weight matrix is ​​aggregated along the time dimension to obtain the average contribution of each environmental factor:

[0299]

[0300] The heatmap is used to illustrate which external environmental factors (such as temperature, humidity, and population movement) played a key driving role in different stages of the pandemic.

[0301] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting daily cases of respiratory infectious diseases in hospitals based on deep learning, characterized in that, The steps are as follows: Step S1: Obtain the historical daily confirmed case sequence and the concurrent multidimensional environmental covariate sequence of the target hospital and perform preprocessing. The multidimensional environmental covariate sequence includes daily meteorological data and regional monitoring indicators. Step S2: Construct a dual-stream time-series encoder to encode the historical daily confirmed case sequence and the multidimensional environmental covariate sequence respectively, and extract the multi-scale time-series representation of infection history and the multi-scale time-series representation of environmental variables; The dual-stream temporal encoder is constructed based on a causal dilated convolutional network, including an infection history stream encoder and an environmental variable stream encoder. The two encoders have the same structure and process in parallel. Step S2.1: Construct the infection history stream encoder enter: ; First, the one-dimensional sequence is mapped to a high-dimensional feature space through the input projection layer: ; in, The hidden layer feature dimension; Then through Encoding is performed by stacking time blocks, the first... The input of each timing block is The output is ,in ; A single temporal block contains two cascaded causal dilated convolutional layers, with the two layers sharing the same dilation factor. ;No. The expansion factor of a time block is defined as: ; The operation of the first causal dilated convolutional layer is defined as follows: ; in, The kernel size; The kernel weight matrix; It is the bias vector; For time step index, ; The convolution uses zero padding with a padding length of 1. And truncate the same number of time steps at the end of the output to ensure that the current output depends only on the history and the current input; The convolutional output passes through batch normalization, ReLU activation function, and Dropout layer in sequence: ; The second causal dilated convolutional layer processes the problem in the same way: ; ; Block outputs are connected to fused inputs via residual connections: ; When the number of input and output channels does not match, the residual connection is aligned in dimensions using a 1×1 convolution: ; go through After one time-series block, the final output of the infection history stream is: ; in, This refers to a multi-scale temporal representation of the infection history. Indicates the first Infection history feature vector at each time step; Step S2.2: Construct an environment variable stream encoder enter: First, the environmental features are mapped to a high-dimensional feature space through the input projection layer: ; in, The hidden layer feature dimension for environmental variables; Then, using the same encoder as the infection history stream encoder... The first time block is encoded, and the second... The processing method for each time block is completely consistent with that of the infection history stream encoder; go through After one time-series block, the final output of the environment variable stream is: ; in, This refers to the multi-scale time-series representation of environmental variables. Indicates the first The environmental variable feature vector at each time step; Step S3: Construct a gated cross-attention module to dynamically and adaptively fuse the multi-scale temporal representation of the infection history and the multi-scale temporal representation of the environmental variables, generate fused features, and output an interpretable attention weight matrix; Step S4: Construct a lightweight trend detector to process the historical daily confirmed case sequence, explicitly model it, and extract long-term transmission trend components; Step S5: Construct a TCN decoder, integrate the fusion features with the long-term propagation trend components, and generate a daily new case prediction sequence for the next preset number of days.

2. The method for predicting daily cases of hospital respiratory infectious diseases based on deep learning as described in claim 1, characterized in that, The construction of the gated cross-attention module includes the following sub-steps: Step S3.1: Multi-head attention calculation Multi-scale temporal characterization of the infection history As a query, it represents the multi-scale time series of environmental variables. The transposed value is used as a key-value pair. First of all Transpose the matrix to obtain the environmental feature matrix: ; Then calculate the linear projection of Query, Key, and Value: ; ; ; in, , , The weight matrix is ​​a learnable weight matrix; The dimension of the key vector. The dimension of the value vector; Attention weights are calculated using scaled dot product attention: ; in, Indicates the first Time step for the first The weighting of attention to each environmental characteristic; Attention output is: ; A multi-head attention mechanism is adopted, with a number of heads of attention. The outputs of multiple heads are concatenated: ; in, To output the projection matrix; Step S3.2: Gated Residual Fusion First, calculate the global representation of the environmental features: ; Will Mapped to via a fully connected layer Same dimensions: ; in, , ; Then, gating coefficients are generated by concatenating infection characteristics with the global environment: ; in, This indicates that the elements are concatenated one by one and then compressed using a fully connected layer. For the Sigmoid function, , ; Indicates the first The gating coefficient vector of the time step; Step S3.3: Adaptive Fusion Output Ultimately, adaptive fusion is achieved through residual connections: ; in, This represents element-wise multiplication (Hadamard product). Achieving Adaptive Fusion: Gating Coefficient Dynamically adjust the fusion strength when Time reverts to infection history characteristics Ensure stability, when This allows for the full utilization of the selective enhancement effect of attention mechanisms; Meanwhile, the attention weight matrix output by the module is: 。 3. The method for predicting daily cases of hospital respiratory infectious diseases based on deep learning as described in claim 1, characterized in that, The lightweight trend detector adopts an efficient dual-path architecture design, as detailed below: Step S4.1: Global Linear Trend Path Capture Capture global linear trends through a lightweight fully connected layer: ; in, As a fully connected layer, first... Flattened, then reshaped through a fully connected layer ; For trend characteristics; Step S4.2: Extraction of local fluctuation paths Using small kernel convolutional layers to extract short-term fluctuations and detail patterns in sequences: ; in, For convolution kernel weights, This is the bias vector; zero-padding is used for boundary time steps. Output: Step S4.3: Adaptive Fusion The outputs of the two paths are passed through learnable weights Adaptive fusion is performed to form the final trend prior: ; in, As learnable scalar weights, their range of values ​​is constrained by the Sigmoid function.

4. The method for predicting daily cases of hospital respiratory infectious diseases based on deep learning as described in claim 1, characterized in that, Step S5 is as follows: First, the fusion features are... With the aforementioned long-term propagation trend components Concatenate along the feature dimension: ; The concatenated features are mapped to the hidden dimension of the decoder using a projection layer: ; in, , ; Hiding dimensions for the decoder; Decoder via Each time block is processed in sequence, and the structure of each time block is the same as that of the time blocks in the encoder; the dilation factor sequence of the decoder is... , ; The decoder output is: ; Take the hidden state of the last time step as the context representation for prediction: ; Generate the future by outputting a fully connected layer. Predicted sequence for the day: ; in, , ; The predicted sequence is on a logarithmic scale; Finally, the prediction results are subjected to an inverse exponential transform to restore them to the original data scale: ; The final output prediction sequence is obtained: 。 5. The method for predicting daily cases of hospital respiratory infectious diseases based on deep learning as described in claim 1, characterized in that, Differential loss functions are used for training. The PSHL loss function is used for the seasonal respiratory infectious disease prediction task, and the MSELOss loss function is used for the non-seasonal prediction task. The complete expression for the PSHL loss function is as follows: ; in, The number of samples; For the first The true value of each sample; For the first Predicted values ​​for each sample; Huber loss term: ; in, The Huber loss threshold; Exponential peak weighting mechanism: The formula for calculating peak weight is: ; in, It is the exponential growth coefficient; The true value after logarithmic transformation; Special handling for the zero value region: For those that meet the occlusion condition ( For samples that are not properly weighted, their weights will be forced to be set to lower weights. ; in, Zero-value weights; (4) Temporal continuity regularization: The time regularization term is defined as: ; in, The coefficient of the time regularization term; The complete expression for the MSELoss loss function is as follows: 。 6. The method for predicting daily cases of respiratory infectious diseases in hospitals based on deep learning as described in claim 1, characterized in that, It also includes an attention weight visualization function: the attention weight matrix output by the gating cross-attention mechanism is visualized to generate a factor contribution heatmap, which is used to explain the key driving role of external environmental factors at different stages of the epidemic.