Infectious disease trend prediction method based on mixed decomposition and Time2Vec-BiLSTM-SA model

By using the hybrid decomposition and Time2Vec-BiLSTM-SA model in the COVID-19 epidemic trend prediction method, the problem of insufficient multi-scale feature extraction capability in the prior art is solved, and higher prediction accuracy and reliability are achieved.

CN119560176AActive Publication Date: 2025-03-04KUNMING UNIV OF SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411763506.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-04
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

The existing COVID-19 epidemic trend prediction method based on time series combined with hybrid deep learning model is difficult to unearth the multi-scale characteristics of the signal, and the hybrid deep learning model structure fails to achieve complementary advantages of different modules, resulting in insufficient extraction ability of multi-scale characteristics.

Method used

The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model is adopted, and the hybrid decomposition algorithm is constructed by introducing VMD+SSD, extracting the intrinsic modal features of the signal and the detailed information of multi-scale changes, and combining the Time2Vec-BiLSTM-SA combination model to capture complex dynamic changes and improve prediction accuracy.

Benefits of technology

It significantly improved the ability to capture multi-level feature of COVID-19 daily new confirmed cases data, improved the accuracy and reliability of epidemic trend prediction, and showed good universality and generalization capabilities in experimental verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119560176A_ABST
    Figure CN119560176A_ABST
Patent Text Reader

Abstract

The invention discloses an infectious disease trend prediction method based on hybrid decomposition and a Time2Vec-BiLSTM-SA model. The method comprises the following steps: directly constructing a first feature matrix according to a sample sliding window width by using daily newly-added definite case number data after smoothing processing; performing L types of decomposition on the smoothed daily newly-added definite diagnosis case number data by adopting a hybrid decomposition algorithm to obtain L types of decomposed daily newly-added definite diagnosis case number component data; constructing a second feature matrix for the L types of daily newly-added definite case number component data according to the width of a sample sliding window; constructing a multi-branch input network prediction model; and taking the first feature matrix and the L types of second feature matrixes as input of a multi-branch input network prediction model, and outputting a daily newly-added definite case number prediction value of single-step prediction by using the multi-branch input network prediction model. According to the method, the hybrid decomposition algorithm is ingeniously introduced, so that richer feature information is provided for the prediction model; the prediction model can greatly improve the precision and reliability of epidemic situation trend prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an infectious disease trend prediction method based on hybrid decomposition and a Time2Vec-BiLSTM-SA model, and belongs to the field of infectious disease trend prediction of artificial intelligence. Background Art

[0002] Studying the development trend of the epidemic, reflecting the changing trend and future direction of the epidemic, and providing an objective basis for the epidemic prevention and control measures of government departments are of great significance for future epidemic prevention and control. Most of the research on the prediction of the development trend of infectious disease epidemics is based on the data of confirmed cases, and researchers use time series models to predict the future changing trends of confirmed cases. In recent years, machine learning methods have been widely used in the COVID-19 epidemic prediction task. However, the combination of traditional machine learning models may be difficult to fully mine the data features. Deep learning uses the powerful automatic learning and feature mining capabilities of neural networks for feature extraction. It has good versatility and strong prediction ability when combined with time series. It combines time series with different deep learning hybrid models, but because only a single time series is input, the model is insufficient to extract the periodic and non-periodic features of the time series, and fails to fully mine the multi-scale features of the data. The prediction accuracy needs to be improved.

[0003] The current COVID-19 epidemic trend prediction method based on time series combined with hybrid deep learning models still has the following problems: (1) It is difficult to mine the multi-scale features of the signal by only inputting a single time series; (2) The hybrid deep learning model structure fails to achieve the complementary advantages of different modules and is insufficient in its ability to extract multi-scale features. Summary of the invention

[0004] The present invention provides an infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model. The method constructs a hybrid decomposition algorithm by cleverly introducing VMD+SSD. VMD focuses on extracting the intrinsic modal features of the signal, while SSD supplements the detailed information of multi-scale changes. The synergy can improve the multi-level feature capture capability of the daily newly confirmed cases of COVID-19, thereby providing richer feature information for the prediction model. Furthermore, the Time2Vec-BiLSTM-SA combined model can more accurately capture the complex dynamic changes of the daily newly confirmed cases of COVID-19 with its flexible time encoding, multi-level feature extraction, bidirectional time series modeling and adaptive feature focusing, thereby greatly improving the accuracy and reliability of epidemic trend prediction.

[0005] The technical solution of the present invention is:

[0006] According to a first aspect of the present invention, a method for predicting infectious disease trends based on hybrid decomposition and a Time2Vec-BiLSTM-SA model is provided, comprising the following steps: S1, obtaining data on the number of newly confirmed cases of a target infectious disease per day; smoothing the data on the number of newly confirmed cases per day to obtain smoothed data on the number of newly confirmed cases per day; S2, constructing a first feature matrix directly based on the width of a sample sliding window for the smoothed data on the number of newly confirmed cases per day; performing L types of decomposition on the smoothed data on the number of newly confirmed cases per day using a hybrid decomposition algorithm to obtain L types of decomposed component data on the number of newly confirmed cases per day; constructing a second feature matrix for the L types of component data on the number of newly confirmed cases per day based on the width of a sample sliding window; S3, constructing a multi-branch input network prediction model; S4, using the first feature matrix and the L types of second feature matrices as inputs to the multi-branch input network prediction model, and using the multi-branch input network prediction model to output a single-step predicted value of the number of newly confirmed cases per day.

[0007] Furthermore, the smoothing process is a 7-day average smoothing process.

[0008] Furthermore, the hybrid decomposition algorithm is specifically as follows: the VMD and SSD decomposition algorithms are used simultaneously to decompose the smoothed daily newly confirmed case number data respectively to obtain two decomposed daily newly confirmed case number component data; for the daily newly confirmed case number component data under the VMD branch, a second feature matrix 1 is constructed according to the sample sliding window width, and for the daily newly confirmed case number component data under the SSD branch, a second feature matrix 2 is constructed according to the sample sliding window width.

[0009] Furthermore, the method for determining the optimal number of decomposition components of VMD used when decomposing the smoothed daily number of newly confirmed cases data using the VMD decomposition algorithm is specifically as follows: setting an initial value of the optimal number of decomposition components of VMD, taking the initial value of the optimal number of decomposition components of VMD as the starting point, and sequentially increasing the value of the optimal number of decomposition components of the VMD, performing VMD decomposition on the smoothed daily number of newly confirmed cases data when the optimal number of decomposition components of the VMD takes different values, performing correlation analysis between the decomposed components and the smoothed daily number of newly confirmed cases data to obtain a correlation coefficient, comparing the correlation coefficient with a preset threshold until the correlation coefficient is less than the preset threshold, and stopping increasing the value of the optimal number of decomposition components of the VMD; taking the maximum value of the optimal number of decomposition components of the VMD corresponding to the condition that the correlation coefficient is greater than the preset threshold as the final optimal number of decomposition components of the VMD.

[0010] Furthermore, the number of SSD decomposition components is adaptive.

[0011] Furthermore, the multi-branch input network prediction model: there are a total of 1+L branches, each branch contains a series-connected Time2Vec module and a BiLSTM module, the size of the feature matrix of each branch input is j×N, and the feature matrix is ​​input into each branch to extract the time series features of the number of newly confirmed cases per day; the extracted time series features are fused through the Adding layer to obtain the spatiotemporal features of the daily newly confirmed cases data; the spatiotemporal features are then output through the SA module and the Dropout layer in sequence, and the output of the Dropout layer is then passed through the fully connected layer to obtain a single-step predicted value of the number of newly confirmed cases per day; wherein j is the width of the sample sliding window, and N is the dimension of the data samples obtained by 1+L processing methods.

[0012] Furthermore, the infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model is used to predict the number of newly confirmed cases of COVID-19 every day.

[0013] According to the second aspect of the present invention, a device for predicting infectious disease trends based on hybrid decomposition and Time2Vec-BiLSTM-SA model is provided, comprising a module of any one of the above-mentioned methods for predicting infectious disease trends based on hybrid decomposition and Time2Vec-BiLSTM-SA model.

[0014] According to a third aspect of the present invention, a terminal is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute any one of the above-mentioned infectious disease trend prediction methods based on hybrid decomposition and Time2Vec-BiLSTM-SA models.

[0015] The beneficial effects of the present invention are as follows: the present invention uses the data of the number of newly confirmed cases per day to perform a 7-day moving average smoothing process, which can not only reduce data fluctuations and eliminate the influence of outliers, but also improve the robustness of the model and enhance the prediction accuracy; at the same time, the VMD and SSD decomposition algorithms are used to decompose the number of newly confirmed cases per day after smoothing, and different decomposition methods generate multi-scale components with different modes, low complexity and strong regularity for complex new case sequences, and the two different modal sub-components are combined into a mixed component to achieve feature complementarity of multi-scale components of different modes, enrich the input feature information, and extract feature information from different aspects of complex nonlinear sequences. Information provides a basis; on this basis, the undecomposed matrix features are introduced as the input of the time vector embedding and bidirectional long short-term memory and self-attention mechanism network (Time2Vec-BiLSTM-SA) of the three branches built, so as to use the time vector embedding module to flexibly encode time information, automatically learn the periodic and non-periodic change characteristics contained in the data, and use the bidirectional long short-term memory network to extract the characteristics of the bidirectional long-term dependency relationship of the time series signal. The SA module is used to highlight the key time points through the weighting mechanism to improve the accuracy of feature representation. The entire model can effectively improve the prediction accuracy of the model through the complementary information of different features. Finally, the present invention was experimentally verified on the county-level data of 8 counties in California, USA, and the national-level data of India and Italy, and compared with a variety of data processing methods and model structures. The results show that the method proposed in the present invention is significantly better than the existing methods in various prediction error indicators, proving its effectiveness in improving the prediction accuracy of the COVID-19 epidemic trend, and has good universality and generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a flow chart of the present invention;

[0017] Figure 2 The decomposition component diagram of VMD and SSD decomposition of the daily newly confirmed cases data in Los Angeles and San Francisco, USA provided by the example of the present invention;

[0018] Figure 3 The prediction effect diagram of three changing trends of daily newly confirmed cases in Los Angeles, USA provided by the example of the present invention;

[0019] Figure 4 The Time2Vec-BiLSTM-SA network structure diagram provided for the example of the present invention;

[0020] Figure 5 This is a diagram showing the prediction effect of the method provided in the example of the present invention on the changing trend of the daily newly confirmed cases in eight states of California, USA under different combination models;

[0021] Figure 6 This is a graph showing the prediction effect of the method provided in the example of the present invention on the changing trend of the daily newly confirmed cases in India under different data preprocessing methods;

[0022] Figure 7 This is a graph showing the prediction effect of the method provided in the example of the present invention on the changing trend of the 200-day test set length of the daily newly confirmed cases in Italy. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily without conflict.

[0024] Example 1: Figure 1-7 As shown, according to one aspect of an embodiment of the present invention, a method for predicting infectious disease trends based on a hybrid decomposition and a Time2Vec-BiLSTM-SA model is provided, including: S1, obtaining daily newly confirmed case data; smoothing the daily newly confirmed case data to obtain smoothed daily newly confirmed case data; S2, directly constructing a first feature matrix based on the sample sliding window width for the smoothed daily newly confirmed case data; performing L types of decomposition on the smoothed daily newly confirmed case data using a hybrid decomposition algorithm to obtain L types of decomposed daily newly confirmed case component data; constructing a second feature matrix for the L types of daily newly confirmed case component data based on the sample sliding window width respectively; S3, constructing a multi-branch input network prediction model; S4, using the first feature matrix and L types of second feature matrices as inputs to the multi-branch input network prediction model, and using the multi-branch input network prediction model to output a single-step predicted daily newly confirmed case prediction value.

[0025] Furthermore, the smoothing process is a 7-day average smoothing process.

[0026] Considering that COVID-19 is usually affected by social behavior and the operating cycle of the medical system, for example, if the number of confirmed cases may decrease due to reduced testing on weekends, and the number of confirmed cases may increase due to increased testing on weekdays, epidemiological analysis usually uses 7 days as the basic unit of analysis. The World Health Organization (WHO) and epidemic reports of various countries usually provide a 7-day moving average to reduce volatility and reflect trends. Using a window width consistent with public health analysis can ensure the consistency of the model and real data analysis results, so the sample sliding window width is set to 7. Choosing 7 days as the input window width can provide the model with sufficient historical information to help predict the trend of the next day. If the input window width is too small (such as 3 days), the model may have difficulty learning complex patterns due to lack of contextual information; if the window width is too large (such as 14 days), the input feature dimension may be too high, resulting in increased model complexity and increased computational cost, while not necessarily improving prediction accuracy.

[0027] Furthermore, the hybrid decomposition algorithm is specifically as follows: the VMD and SSD decomposition algorithms are used simultaneously to decompose the smoothed daily newly confirmed case number data respectively to obtain two decomposed daily newly confirmed case number component data; for the daily newly confirmed case number component data under the VMD branch, a second feature matrix 1 is constructed according to the sample sliding window width, and for the daily newly confirmed case number component data under the SSD branch, a second feature matrix 2 is constructed according to the sample sliding window width.

[0028] Furthermore, the method for determining the optimal number of decomposition components n of VMD used when decomposing the daily newly confirmed cases data after smoothing by using the VMD decomposition algorithm is as follows: setting the initial value of the optimal number of decomposition components of VMD, taking the initial value of the optimal number of decomposition components of VMD as the starting point, by successively increasing the value of the optimal number of decomposition components of VMD, and performing VMD decomposition on the daily newly confirmed cases data after smoothing when the optimal number of decomposition components of VMD takes different values, performing correlation analysis on the decomposed components and the daily newly confirmed cases data after smoothing to obtain the correlation coefficient, comparing the correlation coefficient with the preset threshold value, until the correlation coefficient is less than the preset threshold value, stopping increasing the value of the optimal number of decomposition components of VMD; taking the maximum value of the optimal number of decomposition components of VMD corresponding to the condition that the correlation coefficient is greater than the preset threshold value. The number of SSD decomposition components z is adaptive.

[0029] Exemplarily, the initial value of the optimal number of decomposition components of VMD is set to 3, and by successively increasing the value of the optimal number of decomposition components of VMD, VMD decomposition is performed on the daily number of newly confirmed cases data after smoothing when the optimal number of decomposition components of VMD takes different values; in an embodiment of the present invention, when the optimal number of decomposition components of VMD is 6, the obtained correlation coefficient is less than the preset threshold value of 0.1, and therefore the value of the optimal number of decomposition components of VMD does not continue to increase; thus, VMD decomposition is performed when the optimal number of decomposition components of VMD is 3, 4, 5, and 6, and when the optimal number of decomposition components of VMD is 3, 4, and 5, the correlation coefficient is greater than the preset threshold value, and therefore the maximum value of 5 of the optimal number of decomposition components of VMD corresponding to the condition that the correlation coefficient is greater than the preset threshold value is taken as the final optimal number of decomposition components of VMD.

[0030] The Pearson correlation coefficient r p For correlation analysis, the calculation formula is as follows:

[0031]

[0032] Where N is the total number of daily newly confirmed cases data samples obtained in the current region after smoothing; x i ,y i are some decomposition components x=(x1,x2,…,x N ) and the original smoothed daily number of newly confirmed cases y=(y1,y2,…,y N ), is the average value of x and y.

[0033] The variational mode decomposition (VMD) is an adaptive, completely non-recursive signal processing method that overcomes the problems of endpoint effect and modal component aliasing in empirical mode decomposition (EMD), and can better reduce the non-stationarity and complexity of time series. The VMD algorithm constructs the signal f(t) as a variational problem with constraints, and finds the optimal solution of the variational model through multiple iterations to determine the center frequency and bandwidth in the signal decomposition algorithm. The specific process of the VMD algorithm is as follows:

[0034]

[0035] Where: u p is the pth modal component decomposed from the signal; ω p is the central frequency corresponding to the pth modal component; δ(t) is the pulse signal; n is the total number of pre-decomposed components; f(t) is the time series of the number of newly confirmed cases per day after the original smoothing process.

[0036] For example, the daily newly confirmed cases data in Los Angeles, USA, is decomposed into five decomposition components after VMD, such as Figure 2 As shown in (a), the daily newly confirmed cases data in San Francisco, USA, is decomposed into five components after VMD decomposition, as follows: Figure 2 (c) as shown.

[0037] The singular spectrum decomposition (SSD) is an adaptive time-frequency analysis method that can adaptively decompose non-stationary signals into several singular spectrum components (SSC) in the order of high frequency to low frequency, overcoming the problem of the traditional singular spectrum analysis (SSA) method manually selecting the embedding dimension M based on experience, and can better suppress modal aliasing and eliminate false components. The basic steps of SSD are as follows:

[0038] 1) Construct the trajectory matrix. For a time series x(n) with a data length and embedding dimension of M and N respectively, we can construct a matrix X with M rows and N columns, where the i-th column of the matrix is ​​x i =[x1,x2,...,x M ], i = 1, ..., N, then the matrix X = [x1, x2, ..., x M ];

[0039] 2) Adaptive selection of embedding dimension N. SSA selects the embedding dimension N empirically, and the embedding dimension N has a great influence on the analysis results of SSA. To avoid the error caused by empirical selection, SSD selects the embedding dimension N used in the lth iteration through an adaptive rule.

[0040] First, calculate the residual signal v at the lth iteration l (n) power spectral density (PSD), where the residual signal v l The calculation formula of (n) is as follows:

[0041]

[0042] Then, estimate the frequency f corresponding to the maximum peak in the PSD max , when j = 1, if the normalized frequency f max / f s <ε(where f s is the sampling frequency, ε is a given threshold, generally set to 10 -3 ), the residual signal is considered to be a macrotrend term, and the embedding dimension M is set to N / 3. If the above conditions are not met and l>1, the embedding dimension M is set to 1.2(f s / f max ).

[0043] 3) Singular value decomposition. Perform singular value decomposition on the constructed trajectory matrix X:

[0044] X=UDV T

[0045] Where: U = M × M, V = K × K are both orthogonal matrices, containing left and right singular vectors respectively; the diagonal matrix D = M × K is a singular value matrix, and all elements are matrix singular values ​​σ i , K = N-M + 1. Then, the trajectory matrix X can be used as X i The collection of X i It is expressed as:

[0046] X i =σ i u i v i T

[0047] Where: i is the i-th singular value of the matrix, u i is the i-th row of matrix U, v i is the i-th row of matrix V.

[0048] 4) Reconstruct the singular spectral components. When l = 1, if a large trend term is detected, the first left and right eigenvectors are used to calculate the estimated trajectory matrix And perform angular averaging to obtain the first signal component g (1) (n). Otherwise, when l>1, the signal component g (l) (n) The frequency components are mainly concentrated in the frequency band [f max -Δf,f max +Δf], Δf is the residual signal v l (n) The half bandwidth of the main peak in the PSD of the left eigenvector. At this time, the principal component of the left eigenvector is analyzed to have all the feature groups with prominent spectral peaks in this frequency band and the feature group with the greatest contribution to the main peak energy, and these principal components are constructed into a subset I l (I l ={i1,...,i p}), corresponding to the reconstructed estimated trajectory matrix X Il =X i1 +X i2 +…+X ip , for X Il The diagonal average method is used to obtain g (l) (n).

[0049] 5) Set the termination condition. Each iteration will generate new signal components. Separate it from the original signal to get a new residual signal v (l+1) (n) = v (l) (n)-g (l)(n). Calculate the normalized mean square error (NMSE) between the residual signal and the original signal after l iterations, that is:

[0050]

[0051] When the normalized mean square error is less than a given threshold (generally th = 0.01), the iteration is terminated. Otherwise, the residual signal is used as the new original signal and the above decomposition process is repeated until the termination condition is met. If z singular spectral components are finally obtained, the decomposition result is:

[0052]

[0053] For example, the daily newly confirmed cases data in Los Angeles, USA is decomposed into two decomposition components after SSD decomposition, such as Figure 2 As shown in (b), the daily newly confirmed cases data in San Francisco, USA, is decomposed into five components after SSD decomposition, such as Figure 2 (d) as shown.

[0054] Furthermore, the multi-branch input network prediction model, namely the Time2Vec-BiLSTM-SA model, has a total of 3 branches, each of which contains a Time2Vec module and a BiLSTM module connected in series. After the 3 branches extract features through the two modules respectively, they are output through the Adding layer, the SA module, and the Dropout layer. The output of the Dropout layer is then passed through the fully connected layer to obtain the predicted value of the number of newly confirmed cases per day. The feature extraction method of each module in the 3 branches is as follows:

[0055] For the Time2Vec module, the sample sliding window width of the present invention is 7, the sliding step s is 1, the size of each branch input matrix is ​​7×N, N is the dimension of the data samples obtained by the three processing methods (the dimension is 1 for the undecomposed method; the dimension under the VMD decomposition method is the optimal number of decomposition components, that is, 5; the dimension under the SSD decomposition method is the number of decomposition components, which varies according to the region). The model uses the 7×N matrix before the i-th point as input to predict the daily number of newly confirmed cases from the i-th to i+s-1 points, and uses the 7×N matrix before the i+s point as input to predict the daily number of newly confirmed cases from the i+s to i+2s-1 points. The 7×N matrix before the i+2s point is used as input to predict the daily number of newly confirmed cases from the i+2s to i+3s-1 points, and so on, and the prediction is continuously made.

[0056] The Time2Vec module can be used to extract periodic and non-periodic features in the sample. By setting the embedding dimension k = 32, the output is a high-dimensional vector of dimension 32 containing these features, so as to obtain multi-scale daily newly confirmed case data component features with richer feature information, thereby enhancing the feature extraction ability of the model. The calculation process of the three input branches in the Time2Vec module is as follows:

[0057]

[0058] Where: x i (i=1, 2, 3) are the samples of the number of newly confirmed cases per day input by the three branches, which is a j×N N-dimensional vector, where j is the number of time steps in each sample window, and N is the number of decomposed components of each sample (the number of undecomposed components N is 1; the number of VMD decomposed components N is n=5; the number of SSD decomposed components N is z); represents a j×N matrix; ω m and is a learnable parameter; is the feature of each time step in the sample window of different branch inputs. Each N-dimensional feature is embedded into k (k = 32) dimensions, and the output is That is, a j×k matrix.

[0059] The batch size of the training parameters is h, then the outputs of the three branch Time2Vec modules are all h×j×k, which serve as the input of the BiLSTM module.

[0060] For the BiLSTM module, the h×j×k feature matrix is ​​input into the BiLSTM module. The connection between historical data and future data is strengthened through the forward and backward propagation rules, and the time series characteristics of the number of newly confirmed cases per day are extracted. The calculation process is as follows:

[0061]

[0062] Where: i = 1, 2, 3; and The three branch input variables are the outputs of the forward hidden layer and the backward hidden layer at time t respectively; and are the weight matrices that map the input layer to the forward hidden layer and the backward hidden layer respectively; and They are the weight matrices that map the output of the forward hidden layer and the backward hidden layer at the previous moment to the current moment; and are the biases of the forward hidden layer and the backward hidden layer respectively; and are the weight matrices that map the output of the forward hidden layer and the backward hidden layer to the output layer; δt i is the Tanh activation function; is the output of the Time2Vec module; It represents the output of the output layer. The input of the three branches h×j×k is outputted by the BiLSTM module as h×j×2k. Then, the output features of each module are sliced ​​into tensors to extract all the features of the last time step of each sample, thus obtaining a feature matrix of h×2k.

[0063] The time series features extracted by the BiLSTM module Perform feature fusion to obtain the spatiotemporal features F of the daily newly confirmed cases C (h×6k), and then the self-attention mechanism is used to associate and interact with each other at different positions in the sequence, so as to learn the dependencies in the sequence more comprehensively and focus on the important information in the sequence. The calculation process is as follows.

[0064] F C =f c1 ⊕f c2 ⊕f c3

[0065]

[0066] Randomly initialize the weight matrix W q , W k , W v , the spatiotemporal characteristics F of the daily newly confirmed cases C Multiply it with the weight matrix to get Q, K, and V; normalize the inner product of matrix Q and K through the softmax function to get the correlation weight matrix, and then perform weighted summation with matrix V to get the weight coefficient Z; finally, multiply Z with the initialization matrix W to get the spatiotemporal feature information F containing the attention mechanism CSA .

[0067] The spatiotemporal feature information F of the attention mechanism CSA After the regularization process of the Dropout layer, neurons are discarded to prevent overfitting, which significantly improves the generalization ability of the model. Finally, after the full connection layer, the predicted value y of the number of newly confirmed cases per day is output. i .

[0068] The evaluation indicators adopted in the present invention are: mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and determination coefficient (R 2 ), the calculation formula is as follows:

[0069]

[0070] in, is the actual number of newly confirmed cases per day, y i The predicted value of newly confirmed cases per day is It is the average of the actual number of newly confirmed cases per day.

[0071] According to a second aspect of an embodiment of the present invention, a device for predicting infectious disease trends based on hybrid decomposition and a Time2Vec-BiLSTM-SA model is provided, comprising a module of any one of the above-mentioned methods for predicting infectious disease trends based on hybrid decomposition and a Time2Vec-BiLSTM-SA model; specifically comprising: a first module for executing S1: obtaining daily newly confirmed cases of a target infectious disease; smoothing the daily newly confirmed cases to obtain smoothed daily newly confirmed cases; a second module for executing S2: directly constructing a first feature matrix based on the smoothed daily newly confirmed cases according to the width of a sample sliding window; performing L types of decomposition on the smoothed daily newly confirmed cases using a hybrid decomposition algorithm to obtain L types of decomposed daily newly confirmed cases component data; constructing a second feature matrix for the L types of daily newly confirmed cases component data respectively based on the width of a sample sliding window; a third module for executing S3: constructing a multi-branch input network prediction model; a fourth module for executing S4: using the first feature matrix and L types of second feature matrices as inputs to the multi-branch input network prediction model, and using the multi-branch input network prediction model to output a single-step predicted daily newly confirmed cases prediction value.

[0072] As used above, the term "module" can implement a combination of software and / or hardware that implements a predetermined function. Although the system described in the above embodiment is preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and conceived. For parts that are not described in detail in each module, please refer to the relevant description of this embodiment.

[0073] According to a third aspect of an embodiment of the present invention, a terminal is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute any one of the above-mentioned infectious disease trend prediction methods based on hybrid decomposition and Time2Vec-BiLSTM-SA models.

[0074] In an exemplary embodiment, the terminal may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0075] Embodiment 2: Below, in combination with data, the optional specific embodiment of the present invention is described as follows:

[0076] A method for predicting infectious disease trends based on hybrid decomposition and Time2Vec-BiLSTM-SA model, specifically comprising the following steps:

[0077] 1) Obtain data on the number of daily newly confirmed cases in different regions, including: ① Daily newly confirmed case data in eight counties in California, the United States, the data set collects measured data from February 1, 2020 to September 5, 2022; ② Daily newly confirmed case data in India, the data set collects measured data from February 19, 2020 to December 14, 2020; ③ Daily newly confirmed case data in Italy, the data set collects measured data from February 21, 2020 to October 12, 2021.

[0078] The smoothed daily number of newly confirmed cases obtained in each region was divided into training and test sets, as follows: ① The daily newly confirmed cases data in eight regions of California, USA, from February 1, 2020 to July 11, 2022 is training set I, and from July 12 to September 5, 2022 is test set I; the downward trend forecast of Los Angeles, California, USA, from February 1, 2020 to July 11, 2022 is training set II, and from July 12, 2022 to September 5, 2022 is test set II; the upward + downward trend forecast of Los Angeles, from February 1, 2020 to June 11, 2022 is training set Ⅲ, June 12, 2022 to August 5, 2022 is the test set Ⅲ; Los Angeles rising trend forecast, February 1, 2020 to May 22, 2022 is the training set Ⅳ, May 23, 2022 to July 17, 2022 is the test set Ⅳ; ② India's daily newly confirmed cases data, February 19, 2020 to October 15, 2020 is the training set Ⅴ, October 16 to December 14 is the test set Ⅴ; ③ Italy's daily newly confirmed cases data, February 21, 2020 to March 26, 2021 is the training set Ⅵ, March 27 to October 12 is the test set Ⅵ;

[0079] 2) The above data are smoothed using the 7-day average to obtain the daily number of newly confirmed cases after smoothing;

[0080] 3) The smoothed daily newly confirmed cases data is directly used to construct the first feature matrix according to the sample sliding window width; the smoothed daily newly confirmed cases data is decomposed using VMD and SSD algorithms respectively to obtain the daily newly confirmed cases component data after VMD decomposition and the daily newly confirmed cases component data after SSD decomposition; the second feature matrix is ​​constructed for each daily newly confirmed cases component data according to the sample sliding window width;

[0081] In the embodiment of the present invention, the number of decomposition components with a correlation coefficient of VMD decomposition components greater than 0.1 is 5, so the optimal number of decomposition components of VMD is 5; the number of decomposition components corresponding to the daily newly confirmed cases component data after SSD decomposition in each region is inconsistent, and the results obtained by decomposing data in different regions shall prevail. Taking Los Angeles and San Francisco as examples, the decomposition components after VMD and SSD decomposition are as follows: Figure 2 As shown, the number of VMD components is 5, and the number of SSD decomposition components corresponding to Los Angeles and San Francisco are 2 and 5 respectively.

[0082] The first feature matrix obtained without decomposition is input into branch 1 of the multi-branch input network prediction model, and the second feature matrix after VMD and SSD decomposition and the second feature matrix are input into branches 2 and 3 of the multi-branch input network prediction model.

[0083] Further, the optional implementation process of the present invention is explained and verified as follows in combination with experimental data:

[0084] ① Verification of different decomposition methods: In order to prove the prediction performance of the hybrid decomposition and combination prediction method of the present invention compared with the single-mode decomposition prediction method combined with the Time2Vec-BiLSTM-SA model. In addition, in order to verify the adaptability and generalization ability of the present invention to different data trends, different prediction methods were used for training set II, training set III, training set IV and test set II, test set III, test set IV, and experiments were carried out on undecomposed prediction, single-mode decomposition prediction, dual-mode decomposition prediction and hybrid decomposition and combination prediction of the present invention (undecomposed prediction and single-mode decomposition prediction are input into a single-branch Time2Vec-BiLSTM and then sequentially passed through the SA module, Dropout layer, and fully connected layer; dual-mode decomposition prediction is to input each decomposition into a single-branch Time2Vec-BiLSTM and then sequentially passed through the Adding layer, SA module, Dropout layer, and fully connected layer), covering the downward, downward + upward and upward trends. The prediction error comparison results are as follows: Figure 3 By comparing the prediction results of different decomposition methods for different change trends of Los Angeles data in Table 1, it can be seen that the prediction accuracy of the single decomposition model is ranked from high to low as VMD, SSD and original input. Further, by constructing a 2-decomposition combination of VMD+SSD, the method of the present invention is combined as VMD+SSD+original input.

[0085] Table 1 Error evaluation indicators of different decomposition methods

[0086]

[0087] Through analysis, it can be seen that when the decomposition method is not used and only the smoothed data is input for prediction, the MAPE of the decline, rise + decline and decline trend are 3.971%, 3.985% and 3.286% respectively; in contrast, the MAPE of the present invention is reduced by 44.57%, 44.768% and 33.019% respectively. When the VMD decomposition method is used for prediction, the MAPE of the decline, rise + decline and decline trend is 4.848%, 2.941% and 3.107%, in contrast, the MAPE of the present invention is reduced by 54.60%, 24.311% and 16.479% respectively. For the SSD decomposition method, the MAPE of the decline, rise + decline and rise trend is 5.963%, 3.836% and 5.145%, in contrast, the MAPE of the present invention is reduced by 63.089%, 42.623% and 49.563% respectively. When using the VMD+SSD dual-branch input method for prediction, the MAPEs of decline, rise+decline, and rise were 3.952%, 2.632%, and 4.217%, respectively. In comparison, the MAPE of the present invention was reduced by 44.307%, 15.425%, and 38.463%. These results show that the prediction method of the present invention can achieve smaller overall error and higher prediction accuracy under different trends of newly confirmed cases, indicating that the present invention has a better effect on the prediction of COVID-19 with complex dynamic data characteristics, verifying its strong generalization ability and superior prediction performance.

[0088] ② Verification of different models: The data of newly confirmed cases per day in 8 counties in California, the United States, i.e., the first feature matrix obtained without decomposition of training set I and test set I, is input into branch 1 of the multi-branch input network prediction model, and the second feature matrix and the second feature matrix obtained by VMD and SSD decomposition are input into branches 2 and 3 of the multi-branch input network prediction model; using the prediction model, the prediction result of the number of newly confirmed cases of COVID-19 epidemic per day in a single step is output. Secondly, in order to verify the superiority of the present invention in predicting the number of newly confirmed cases of COVID-19 per day, the data is input into each split model of the multi-branch input network prediction model for prediction (in Table 2, the model of the present invention / article is Time2Vec-BiLSTM-SA model; the difference between "BiLSTM" and the model of the present invention is that the Time2Vec module + BiLSTM module + SA module of the present invention is replaced by the BiLSTM module alone to construct model; “Time2Vec” differs from the present invention in that the Time2Vec module + BiLSTM module + SA module of the present invention is replaced by a model constructed by only the Time2Vec module; “BiLSTM+SA” differs from the present invention in that the Time2Vec module + BiLSTM module + SA module of the present invention is replaced by a model constructed by the BiLSTM module + SA module; “Time2Vec+SA” differs from the present invention in that the Time2Vec module + BiLSTM module + SA module of the present invention is replaced by a model constructed by the Time2Vec module + SA module; “Time2Vec+BiLSTM” differs from the present invention in that the Time2Vec module + BiLSTM module + SA module of the present invention is replaced by a model constructed by the Time2Vec module + BiLSTM module), the prediction effect diagram is as follows Figure 5 As shown, in order to see the prediction results more accurately, the error between the predicted data and the actual data of daily newly confirmed cases in eight counties in California, USA is given as shown in Table 2.

[0089] Table 2 Forecast error evaluation indicators of eight regions in different models

[0090]

[0091] It can be seen from Table 2 that the prediction effect of the method proposed in the present invention is better than other combination models in various regions. For example: the determination coefficient R 2 The coefficient of determination of Riverside is 99.468%, which is higher than 99.236% of BiLSTM and 90.459% of Time2Vec. 2 Reaching 99.563%, the highest among all models, higher than BiLSTM (99.460%) and Time2Vec (98.465%); Sacramento’s coefficient of determination R2 It is 99.325%, which is significantly better than BiLSTM+SA (98.978%) and Time2Vec (97.296%). This further shows that the combination of self-attention mechanism significantly enhances the prediction accuracy of the model. In summary, the experimental results show that the combination of Time2Vec, BiLSTM and SA is not a simple superposition, but by giving full play to their respective advantages, it achieves the optimal balance of performance in time series prediction, verifying the superiority of the method proposed in this invention.

[0092] ③Verification of different data preprocessing methods: The first feature matrix obtained without decomposition of the daily newly confirmed cases data of India, i.e., training set V and test set V, is input into branch 1 of the multi-branch input network prediction model, and the second feature matrix and the second feature matrix obtained by VMD and SSD decomposition are input into branches 2 and 3 of the multi-branch input network prediction model; using the prediction model, the single-step prediction result of the daily newly confirmed cases of the COVID-19 epidemic is output. Secondly, in order to verify the influence of different data preprocessing methods on the prediction result performance of the present invention in predicting the daily newly confirmed cases of COVID-19, the data is subjected to different smoothing preprocessing and then input into the Time2Vec-BiLSTM-SA model proposed in the present invention for prediction. The prediction effect diagram is shown in the figure. Figure 6 As shown, in order to see the prediction results more accurately, the error between the predicted data and the actual data of daily newly confirmed cases under different preprocessing methods of Indian data is given as shown in Table 3.

[0093] Table 3 Forecast error evaluation indicators of different data preprocessing methods in India

[0094] Data preprocessing method MSE RMSE MAE MAPE / % <![CDATA[R 2 / % <!-- 12 -->]]> No smoothing 2566425.119 1601.382 1319.888 3.144 96.581 3-day average smoothing 1706332.640 1306.266 964.487 2.292 97.492 7-day average smoothing 1008575.838 1004.278 737.787 1.803 98.462

[0095] It can be seen from Table 3 that the prediction accuracy of the unsmoothed data is low, especially the MSE is 2566425.119 and the root mean square error RMSE is 1601.382, which are much higher than the values ​​after smoothing. This shows that the unsmoothed data has large volatility and errors. In contrast, after smoothing with the 3-day mean, the indicators are significantly improved, and the MSE is reduced to 1706332.640, a decrease of 33.513%, indicating that the smoothing process effectively reduces the volatility of the data, thereby reducing the prediction error of the model. After 7-day mean smoothing, the indicators are further optimized, the MSE is reduced to 1008575.838, a decrease of 40.892%, and the MAPE is reduced to 1.803%, the error is significantly reduced, and R 2It was increased to 98.462%. This shows that this method not only effectively reduces the prediction error, but also improves the prediction accuracy. Therefore, for the time series prediction of daily newly confirmed cases of COVID-19, 7-day mean smoothing performs best in reducing noise, improving model stability and accuracy; in addition, if the number of days of the mean is greater than 7, after simulation, it will reduce the randomness and complexity in the data, which may cause the model to fail to capture enough features for effective prediction. Larger smoothing windows will also introduce significant lag effects, that is, the smoothed values ​​will delay reflecting changes in real data.

[0096] ④ Verification with a longer test set: To verify the effectiveness of the present invention in predicting the number of newly confirmed cases of COVID-19 with a longer test set length, the first feature matrix obtained without decomposition of the daily newly confirmed cases data of Italy, i.e., the training set VI and the test set VI, is input into branch 1 of the multi-branch input network prediction model, and the second feature matrix and the second feature matrix obtained by VMD and SSD decomposition are input into branches 2 and 3 of the multi-branch input network prediction model; the Time2Vec-BiLSTM-SA model proposed in the present invention is used for prediction, and the prediction effect diagram is shown in the figure. Figure 7 As shown, in order to see the prediction results more accurately, the error between the predicted data of daily newly confirmed cases in Italy with a test set length of 200 days and the actual data is given in Table 4.

[0097] Table 4 Italy 200-day forecast error evaluation indicators

[0098] Dataset Data preprocessing method Test set length MSE RMSE MAE MAPE / % <![CDATA[R 2 / %]]> Italy 7-day average smoothing 200 days 323404 568.686 458.152 11.336 98.982

[0099] It can be seen from Table 4 that on the 200-day test set, the model of the present invention combined with the 7-day sliding window achieved the best overall performance, with error indicators of MAE=1319.888, RMSE=1601.382, and MAPE=3.144%, which verifies that the model proposed in the present invention is also suitable for long-term series prediction, and can effectively capture short-term fluctuations while maintaining the accuracy of long-term trends, showing strong robustness and generalization ability.

[0100] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A method for predicting infectious disease trends based on hybrid decomposition and Time2Vec-BiLSTM-SA model, characterized in that: The following steps are involved: S1. Obtain the daily number of newly confirmed cases of the target infectious disease; smooth the daily number of newly confirmed cases to obtain the smoothed daily number of newly confirmed cases; S2. The smoothed daily newly confirmed cases data is directly used to construct the first characteristic matrix according to the width of the sample sliding window; the smoothed daily newly confirmed cases data is decomposed into L types using a hybrid decomposition algorithm to obtain L types of decomposed daily newly confirmed cases component data; the L types of daily newly confirmed cases component data are respectively constructed into the second characteristic matrix according to the width of the sample sliding window; S3, construct a multi-branch input network prediction model; S4. Use the first feature matrix and L types of second feature matrices as inputs to the multi-branch input network prediction model, and use the multi-branch input network prediction model to output a single-step predicted value of the number of newly confirmed cases per day.

2. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 1 is characterized in that: The smoothing process is a 7-day average smoothing process.

3. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 1 is characterized in that: The hybrid decomposition algorithm is specifically as follows: the VMD and SSD decomposition algorithms are used simultaneously to decompose the smoothed daily newly confirmed case data respectively to obtain two decomposed daily newly confirmed case component data; a second feature matrix 1 is constructed for the daily newly confirmed case component data under the VMD branch according to the sample sliding window width, and a second feature matrix 2 is constructed for the daily newly confirmed case component data under the SSD branch according to the sample sliding window width.

4. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 3 is characterized in that: The optimal number of decomposition components of VMD used to decompose the smoothed daily number of newly confirmed cases using the VMD decomposition algorithm is determined as follows: Setting an initial value of the optimal number of decomposition components of VMD, taking the initial value of the optimal number of decomposition components of VMD as a starting point, sequentially increasing the value of the optimal number of decomposition components of VMD, and performing VMD decomposition on the smoothed daily number of newly confirmed cases data when the optimal number of decomposition components of VMD takes different values, performing correlation analysis on the decomposed components and the smoothed daily number of newly confirmed cases data to obtain a correlation coefficient, and comparing the correlation coefficient with a preset threshold value until the correlation coefficient is less than the preset threshold value, then stopping increasing the value of the optimal number of decomposition components of VMD; The maximum value of the optimal number of decomposition components of the VMD corresponding to the condition that the correlation coefficient is greater than a preset threshold is taken as the final optimal number of decomposition components of the VMD.

5. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 3 is characterized in that: The number of SSD decomposition components is adaptive.

6. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 1, characterized in that: The multi-branch input network prediction model has a total of 1+L branches, each of which includes a serially connected Time2Vec module and a BiLSTM module. The size of the feature matrix input to each branch is j×N, and the feature matrix is ​​input to each branch to extract the time series features of the number of newly confirmed cases per day; the extracted time series features are fused through the Adding layer to obtain the spatiotemporal features of the data of newly confirmed cases per day; The spatiotemporal features are then outputted in sequence through the SA module and the Dropout layer. The output of the Dropout layer is then passed through the fully connected layer to obtain the single-step predicted value of the number of newly confirmed cases per day; where j is the width of the sample sliding window, and N is the dimension of the data samples obtained by each of the 1+L processing methods.

7. The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model according to claim 1, characterized in that: The infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model is used to predict the number of newly confirmed cases of COVID-19 per day.

8. An infectious disease trend prediction device based on hybrid decomposition and Time2Vec-BiLSTM-SA model, characterized in that: A module comprising the infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model as described in any one of claims 1-7.

9. A terminal, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to execute the infectious disease trend prediction method based on hybrid decomposition and Time2Vec-BiLSTM-SA model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for predicting number of inpatients with respiratory system

    CN115204509A

  • Infectious disease case number prediction method, system and device and storage medium

    CN115440390A

  • Photovoltaic power ultra-short-term prediction method based on multi-mode decomposition and multi-branch input

    CN116995670A

  • Early warning method for novel coronavirus epidemic based on improved triple exponential smoothing model and LSTM model

    WO2022160370A1