CNN-LSTM model-based weather-related children allergic disease onset risk prediction method

Through the CNN-LSTM model-based method, integrating meteorological and air pollution data to predict the risk of asthma onset in children, solving the complexity problem of traditional methods that are difficult to capture the interaction of multiple environmental factors, achieving higher prediction accuracy and risk assessment.

CN119740196AInactive Publication Date: 2025-04-01JIANGSU METEOROLOGICAL SERVICE CENT

Patent Information

Application Number
CN202510246662.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional childhood asthma risk prediction methods are difficult to effectively integrate multiple environmental factors and their interactions, and it is difficult to capture complex nonlinear relationships and long-term dependencies.

Method used

Using a CNN-LSTM model, a CNN-LSTM model was constructed to extract spatiotemporal and spatial characteristics and process time series data to predict the risk of asthma attack in children by obtaining conventional meteorological elements, air pollution data and hospital visits.

Benefits of technology

This method can effectively integrate multiple data sources to capture the complex effects of meteorological and air pollution factors on childhood asthma, improve prediction accuracy, and provide a more comprehensive risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740196A_ABST
    Figure CN119740196A_ABST
Patent Text Reader

Abstract

The invention discloses a weather-related children allergic disease attack risk prediction method based on a CNN-LSTM model, and the method comprises the steps: obtaining conventional meteorological elements, air pollution data and the number of patients in a hospital of a research city, and carrying out the quality control; a CNN-LSTM model is constructed, the CNN extracts spatial and temporal features, and the LSTM processes a time sequence and predicts the number of patients who see asthma; proper model parameters are set; training the model; and drawing a training and verification loss curve, and adjusting model parameters. Influences of meteorological and air pollution factors on the children asthma are deeply mined through a deep learning model, data from multiple sources are effectively fused, a complex nonlinear relation and a temporal and spatial change rule are captured, and the prediction precision is remarkably improved. Further optimization comprises model structure adjustment, data volume and quality increase, introduction of more influence factors and enhancement of training constraints, the model precision is further improved, a scientific basis is provided for public health decision making, and the method is excellent in child asthma disease risk prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine learning, and in particular to a method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model. Background Art

[0002] With the acceleration of global climate change and urbanization, the impact of meteorological conditions and air pollution on human health has become increasingly significant, especially for children, a sensitive group. As one of the most common chronic respiratory diseases, the incidence of childhood asthma is on the rise worldwide. Studies have shown that the risk of childhood asthma-related diseases is significantly affected by the environment (weather, pollution). Air pollution factors and meteorological factors are significant factors affecting the human respiratory system. When exposed to an unfavorable environment, the respiratory system will be adversely affected. Different meteorological factors and air pollution factors have different exposure-response relationships on the respiratory system. Meteorological factors have obvious lag effects and cumulative effects, that is, the impact of short-term exposure to an unfavorable meteorological environment will appear after a period of time, while long-term exposure to a dangerous meteorological environment will also have different changes in the degree of danger. The occurrence of extreme weather events also has a certain degree of continuity. The duration of cold waves and high temperature heat waves is often more than 3-5 days.

[0003] However, traditional prediction methods often rely on a single type of environmental factor and lack a comprehensive consideration of multiple environmental factors and their interactions. In addition, these methods are usually based on simple statistical models or empirical formulas, which make it difficult to capture complex nonlinear relationships and long-term dependencies. Therefore, it is particularly urgent to develop a method that can integrate multi-source data and use advanced machine learning algorithms to predict the risk of childhood asthma. Summary of the invention

[0004] The purpose of the present invention is to solve the above technical problems and provide a method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model.

[0005] In order to achieve the above object, the present invention provides a method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model, which adopts the following technical solutions: A method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model includes the following steps: Step S1, obtaining conventional meteorological elements of the study city, air pollution data of the study city, and data on the number of hospital patients, and performing quality control on the data; Step S2: construct a CNN-LSTM model, where CNN is used to extract the spatiotemporal features of the input features, and LSTM is used to process time series data and predict the number of asthma patients. The model structure includes: Input layer: The selected influencing factors are used as input features, with the shape of (number of samples, time steps, number of features); Convolutional layer: Use multiple convolution kernels to extract the spatiotemporal features of the input features; Pooling layer: Perform maximum pooling on the output of the convolutional layer to reduce the data dimension; LSTM layer: The output of the pooling layer is used as the input of the LSTM to extract the long-term dependencies of the sequence data; Fully connected layer: The output of the LSTM layer is fully connected to obtain the predicted value of the number of asthma patients; Step S3, setting appropriate model parameters, including the size and number of convolution kernels and the number of neurons in the LSTM layer; Step S4: training the model, specifically: S41, normalizing the data by using maximum and minimum value normalization; S42, take the selected features including the target column as input data, take the value of the target column (number of patients) in the next day as the label value, take the data of the first two years as the training set, and the data of the last year as the validation set; S43, use the sliding time window to convert the training set and the validation set into a time series. The data window size is 14 days, the length of the historical sequence is 14, and the target window size is adjusted according to the length of the predicted sequence, which is set to 1 here; S44, process the data in batches and convert the data into the tensorflow dataset format so that it can be put into the CNN-LSTM network built by the tensorflow architecture for training; S45, training the model using the training set, and updating the model weights using the back propagation algorithm and the gradient descent optimizer; Step S5: draw training and validation loss curves, observe curve changes, and adjust model parameters.

[0006] As a preferred embodiment of the present invention, the meteorological data in step S1 include: daily average temperature, daily temperature range, daily average relative humidity, daily average wind speed, daily maximum and minimum temperatures; wherein the daily average temperature, daily temperature range, daily average relative humidity, and daily average wind speed are the site average data of automatic meteorological stations in various cities, and the daily maximum and minimum temperatures are the maximum and minimum values ​​in the automatic meteorological stations in various cities.

[0007] As a preferred embodiment of the present invention, the air pollution data in step S1 adopts the daily average and site average data of pollutant concentrations of environmental monitoring stations in various cities, including SO2, CO, O3, NO2, PM10, and PM2.5.

[0008] As a preferred embodiment of the present invention, the method for obtaining data on the number of patients visiting hospitals is: obtaining data on the average daily number of outpatient patients visiting all tertiary hospitals in various cities, and obtaining the medical records of asthma-related diseases in their electronic medical record systems.

[0009] As a preferred embodiment of the present invention, the model structure in step S2 is specifically: Input layer: The input shape is (history_size, feature), where history_size is the length of the history sequence and feature is the number of features contained in the data; The first convolutional layer uses 64 filters, each with a kernel size of 3 and an activation function of ReLU to extract local features from the input sequence. Dropout layer: The dropout rate is 0.1, which is used to prevent overfitting; The second convolutional layer uses 64 filters, a kernel size of 3, and an activation function of ReLU to further extract features from the sequence. Max pooling layer: The pooling window size is 2, which is used to downsample the features; Flattening layer: maps multi-dimensional features into one dimension; Vector repetition layer: Repeat the prediction length of one-dimensional features target_size times to provide the input of the time step to be predicted for the subsequent LSTM layer; Bidirectional LSTM layer: uses 64 units, the activation function is ReLU, and the output of each time point is returned instead of just the output of the last time point; Dropout layer: dropout rate is 0.1; LSTM layer: uses 64 units, the activation function is ReLU, and the output at each time point is returned; Time-distributed fully connected layer: uses 64 units with ReLU activation function. This layer is used to apply the same fully connected layer over the time steps. Output layer: uses 1 unit, no activation function, and the output shape is target_size, 1; Reshape layer: reshapes the output shape to target_size, which is a one-dimensional array; Compile model: loss function is mean absolute error MAE, optimizer is Adam.

[0010] As a preferred embodiment of the present invention, step S45 also includes adding an early stopping strategy and a learning rate decay strategy during the training process, and monitoring the verification loss, i.e., the absolute mean error MAE of the verification set and the evaluation indicator mean square error MSE. As a preferred embodiment of the present invention, the model is optimized by adjusting the following hyper parameters in step S5: batch_size: the number of samples used in each training; dropout_rate: the ratio of random drops in the Dropout layer; num_layers: the number of layers of CNN and LSTM networks; CNN and LSTM parameters: for CNN, adjust the convolution kernel size, step size, padding method and number of convolution kernels in the convolution layer; for LSTM, adjust the number of neurons in the hidden layer, the activation function of the forget gate, input gate and output gate; regularization strength: optimizer: activation function.

[0011] In summary, the present application includes at least one of the following beneficial technical effects: 1. This invention uses a deep learning model to deeply explore the impact of meteorological factors and air pollution factors on childhood asthma. This model can not only effectively integrate data from multiple sources, including conventional meteorological data, atmospheric pollutant data, and hospital records, but also capture the complex nonlinear relationships and spatiotemporal variation patterns between these factors. Specifically, the model can extract the fluctuation characteristics of meteorological factors and air pollution factors, and train the intrinsic connection between environmental factors and the risk of childhood asthma. The overall results show that this method performs well in prediction accuracy.

[0012] The accuracy of the model can be further improved by adjusting the model building plan, increasing the quantity and quality of data, introducing more influencing factors, and artificially increasing model training constraints.

[0013] 2. Based on environmental factors (such as meteorological elements and air pollution), the risk prediction scheme for childhood asthma first uses the CNN-LSTM method for preliminary prediction. This model can predict the risk level of asthma or the number of patients in the future based on historical data. On the basis of the preliminary prediction, a comprehensive analysis is conducted in combination with the relevant pathogenic mechanism and traditional prediction experience. This multi-angle analysis method not only takes into account short-term sudden environmental changes, but also covers the long-term cumulative effects, thereby providing a more comprehensive risk assessment. The final prediction of the risk level based on environmental factors can more accurately reflect the impact of meteorological risks and air pollution risks on childhood asthma.

[0014] This comprehensive approach can not only provide strong support for local health risk assessment of meteorological factors, but also help formulate scientific response measures and population health strategies. In addition, it also provides new ideas and technical support for further research on forecasting technology for weather-related diseases, which will help promote the in-depth development of related fields. This method not only improves the accuracy and practicality of predictions, but also provides a solid scientific basis for public health decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a structural diagram of the CNN-LSTM model of the present invention.

[0016] Figure 2 This is a training flow chart of the model of the present invention. DETAILED DESCRIPTION

[0017] The following is combined with Figure 1 and Figure 2 The present invention is described in further detail.

[0018] This embodiment discloses a method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model, comprising the following steps: Step S1, multi-source data collection: obtain the conventional meteorological elements of the study city, the air pollution data of the study city, the data on the number of hospital patients, and perform quality control on the data.

[0019] This embodiment collects meteorological data, atmospheric pollutant data, and data on the number of patients visiting tertiary hospitals. Among them, the meteorological data daily average temperature (℃), daily temperature range (℃), daily average relative humidity (%), and daily average wind speed (m / s) are the site average data of local automatic meteorological stations (national basic stations), and the daily maximum and minimum temperatures (℃) are the maximum and minimum values ​​of local automatic meteorological stations (national basic stations).

[0020] Air pollution data are the daily average and site average data of pollutant concentrations at environmental monitoring stations in various cities, including SO2, CO, O3, NO2, PM10, and PM2.5 (µg / m3).

[0021] The data on the number of patients visiting tertiary hospitals are the average daily number of outpatient visits in all tertiary hospitals in various cities, and mainly study asthma diseases in children (under 18 years old). Asthma diseases are classified according to the tenth edition of the International Classification of Diseases (ICD-10 code: J45). The data used in this example have all been quality controlled. Based on the data quality and the distinction of the geographical environment of Jiangsu, Nanjing, Suzhou, Wuxi, Changzhou, Xuzhou, and Yangzhou were finally selected as the main research cities.

[0022] Step S2: Model construction Build a base model in which CNN is used to extract the spatiotemporal features of input features, and LSTM is used to process time series data and predict the number of asthma visits.

[0023] The model structure consists of the following parts: (1) Input layer: The selected influencing factors are used as input features, with the shape of (number of samples, time steps, number of features).

[0024] (2) Convolutional layer: Use multiple convolution kernels to extract the spatiotemporal features of the input features. The size and number of convolution kernels are adjusted according to experimental results.

[0025] (3) Pooling layer: Perform maximum pooling on the output of the convolutional layer to reduce the data dimension.

[0026] (4) LSTM layer: The output of the pooling layer is used as the input of the LSTM to extract the long-term dependencies of the sequence data.

[0027] (5) Fully connected layer: The output of the LSTM layer is fully connected to obtain the predicted value of the number of asthma patients.

[0028] The specific structure is as follows: (1) Input layer: The input shape is (history_size, feature), where history_size is the length of the historical sequence and feature is the number of features contained in the data. (The number of samples mentioned above is obtained by automatically splitting the data by batch_size of the data organization); (2) The first convolutional layer (Conv1D): uses 64 filters, each with a kernel size of 3 and an activation function of ReLU. The function of this layer is to extract local features from the input sequence; (3) Dropout layer: The dropout rate is 0.1 to prevent overfitting; (4) The second convolutional layer (Conv1D): also uses 64 filters, a kernel size of 3, and an activation function of ReLU. It further extracts features from the sequence; (5) Maximum pooling layer (MaxPooling1D): The pooling window size is 2, which is used to downsample the features; (6) Flatten layer: maps multi-dimensional features into one-dimensional ones; (7) RepeatVector: Repeat the one-dimensional feature by the target_size times to provide the input of the time step to be predicted for the subsequent LSTM layer. (8) Bidirectional LSTM layer: uses 64 units and the activation function is ReLU. The output of each time point is returned instead of just the output of the last time point. (9) Dropout layer: dropout rate is 0.1; (10) LSTM layer: uses 64 units and the activation function is ReLU. The output at each time point is also returned; (11) TimeDistributed Dense: uses 64 units and the activation function is ReLU. The purpose of this layer is to apply the same fully connected layer on the time step.

[0029] (12) Output layer (TimeDistributed Dense): uses 1 unit, no activation function, and the output shape is (target_size, 1).

[0030] (13) Reshape layer: reshapes the output shape to (target_size,), which is a one-dimensional array.

[0031] (14) Compile the model: the loss function is the mean absolute error (MAE). The optimizer is Adam.

[0032] Step S3: Model parameter setting According to the experimental results and experience, appropriate model parameters are set, including the size and number of convolution kernels, the number of neurons in the LSTM layer, etc. The above parameters are specifically explained in the specific structure of the model construction and will not be repeated here. In addition to the above parameters, the model also has learning rate, batch size, number of iterations, input sequence length, output sequence length, and number of features (number of influencing factors). The specific settings are shown in Table 1.

[0033] Table 1 Model parameter setting table Step S4: training the model. Step S41, data normalization: normalize the data using maximum and minimum value normalization.

[0034] Step S42, data set division: Then take the screened features including the target column as input data, the value of the target column (number of patients) in the next day as the label value, the data from January 1, 2018 to March 31, 2020 in the previous two years as the training set, and the data from February 1, 2020 to January 31, 2021 in the last year as the validation set.

[0035] Step S43, data organization: Use a sliding time window to convert the training set and validation set into a time series that is convenient for training. The data window size is 14 days, and the length of the historical sequence is 14. The target window size is adjusted according to the length of the predicted sequence, which is set to 1 here.

[0036] Step S44, data conversion: the data is processed in batches and converted into a tensorflow data set format so that it can be subsequently put into a CNN-LSTM network built with a tensorflow architecture for training.

[0037] Step S45: Use the training set to train the model, and use the back propagation algorithm and gradient descent optimizer to update the model weights. During the training process, add early stopping strategy and learning rate decay strategy, monitor the validation loss, i.e., the absolute mean error MAE of the validation set and the evaluation indicator mean square error MSE.

[0038] Step S5: Model tuning Draw the training and validation loss curves, observe the curve changes, and adjust the model parameters. For the time series prediction algorithm CNN_LSTM, we can optimize the model by adjusting the following hyperparameters: 1) batch_size: The number of samples used in each training. A smaller batch_size can speed up training but may cause overfitting; a larger batch_size can reduce the risk of overfitting but increase the amount of computation.

[0039] 2) dropout_rate: The ratio of random drops in the Dropout layer. A smaller dropout_rate can retain more information but is prone to overfitting; a larger dropout_rate can reduce the risk of overfitting but will lose some information.

[0040] 3) num_layers: The number of layers of CNN and LSTM networks. More layers can capture more information, but are prone to overfitting; fewer layers can reduce the amount of calculation and the risk of overfitting.

[0041] 4) Parameters of CNN and LSTM: For CNN, you need to adjust the kernel size, step size, padding method, and number of kernels in the convolution layer; for LSTM, you need to adjust the number of neurons in the hidden layer, the activation function of the forget gate, input gate, and output gate.

[0042] 5) Regularization: Similar to dropout, regularization is also used to prevent overfitting, such as L1 regularization and L2 regularization (weight decay). The strength of regularization is also a hyperparameter that needs to be adjusted.

[0043] 6) Optimizer: Different optimizers (such as SGD, Adam, RMSprop, etc.) have a significant impact on the training effect of the model. Selecting a suitable optimizer and adjusting its parameters (such as momentum, decay coefficient, etc.) is part of parameter tuning.

[0044] 7) Activation function: Choosing a suitable activation function (such as ReLU, sigmoid, tanh, etc.) is also important for improving model performance.

[0045] Since the early stopping strategy and learning rate decay strategy are set, there is no need to adjust the two parameters of training rounds and learning rate too much.

[0046] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for predicting the risk of weather-related allergic diseases in children based on a CNN-LSTM model, characterized in that: The following steps are involved: Step S1, obtaining conventional meteorological elements of the study city, air pollution data of the study city, and data on the number of hospital patients, and performing quality control on the data; Step S2: construct a CNN-LSTM model, where CNN is used to extract the spatiotemporal features of the input features, and LSTM is used to process time series data and predict the number of asthma patients. The model structure includes: Input layer: The selected influencing factors are used as input features, with the shape of number of samples, time steps, and number of features; Convolutional layer: Use multiple convolution kernels to extract the spatiotemporal features of the input features; Pooling layer: Perform maximum pooling on the output of the convolutional layer to reduce the data dimension; LSTM layer: The output of the pooling layer is used as the input of the LSTM to extract the long-term dependencies of the sequence data; Fully connected layer: The output of the LSTM layer is fully connected to obtain the predicted value of the number of asthma patients; Step S3, setting appropriate model parameters, including the size and number of convolution kernels and the number of neurons in the LSTM layer; Step S4: training the model, specifically: S41, normalizing the data by using maximum and minimum value normalization; S42, take the selected features including the target column as input data, take the value of the target column in the next day as the label value, take the data of the first two years as the training set, and the data of the last year as the validation set; S43, use the sliding time window to convert the training set and the validation set into a time series. The data window size is 14 days, the length of the historical sequence is 14, and the target window size is adjusted according to the length of the predicted sequence, which is set to 1 here; S44, process the data in batches and convert the data into the tensorflow dataset format so that it can be put into the CNN-LSTM network built by the tensorflow architecture for training; S45, training the model using the training set, and updating the model weights using the back propagation algorithm and the gradient descent optimizer; Step S5: draw training and validation loss curves, observe curve changes, and adjust model parameters.

2. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: The meteorological data in step S1 include: daily average temperature, daily temperature range, daily average relative humidity, daily average wind speed, daily maximum and minimum temperatures; wherein the daily average temperature, daily temperature range, daily average relative humidity, and daily average wind speed are the site average data of automatic meteorological stations in various cities, and the daily maximum and minimum temperatures are the maximum and minimum values ​​in the automatic meteorological stations in various cities.

3. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: The air pollution data in step S1 adopts the daily average and site average data of pollutant concentrations of environmental monitoring stations in various cities, including SO2, CO, O3, NO2, PM10, and PM2.

5.

4. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: The method for obtaining the data on the number of patients visiting hospitals is as follows: obtain the data on the average daily number of outpatient patients visiting all tertiary hospitals in various cities, and obtain the medical records of asthma-related diseases in their electronic medical record systems.

5. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: The model structure in step S2 is specifically: Input layer: The input shape is (history_size, feature), where history_size is the length of the history sequence and feature is the number of features contained in the data; The first convolutional layer uses 64 filters, each with a kernel size of 3 and an activation function of ReLU to extract local features from the input sequence. Dropout layer: The dropout rate is 0.1, which is used to prevent overfitting; The second convolutional layer uses 64 filters, a kernel size of 3, and an activation function of ReLU to further extract features from the sequence. Max pooling layer: The pooling window size is 2, which is used to downsample the features; Flattening layer: maps multi-dimensional features into one dimension; Vector repetition layer: Repeat the prediction length of one-dimensional features target_size times to provide the input of the time step to be predicted for the subsequent LSTM layer; Bidirectional LSTM layer: uses 64 units, the activation function is ReLU, and the output of each time point is returned instead of just the output of the last time point; Dropout layer: dropout rate is 0.1; LSTM layer: uses 64 units, the activation function is ReLU, and the output at each time point is returned; Time-distributed fully connected layer: uses 64 units with ReLU activation function. This layer is used to apply the same fully connected layer over the time steps. Output layer: uses 1 unit, no activation function, and the output shape is target_size, 1; Reshape layer: reshapes the output shape to target_size, which is a one-dimensional array; Compile model: loss function is mean absolute error MAE, optimizer is Adam.

6. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: The step S45 also includes adding an early stopping strategy and a learning rate decay strategy during the training process, and monitoring the validation loss, i.e., the absolute mean error MAE of the validation set and the evaluation indicator mean square error MSE.

7. The method for predicting the risk of onset of weather-related allergic diseases in children based on the CNN-LSTM model according to claim 1, characterized in that: In step S5, the model is optimized by adjusting the following hyperparameters: batch_size: the number of samples used in each training; dropout_rate: the ratio of random drops in the Dropout layer; num_layers: the number of layers of CNN and LSTM networks; CNN and LSTM parameters: for CNN, adjust the convolution kernel size, step size, padding method and number of convolution kernels in the convolution layer; for LSTM, adjust the number of neurons in the hidden layer, the activation function of the forget gate, input gate and output gate; regularization strength: optimizer: activation function.

Citation Information

Patent Citations

  • Analysis method for predicting number of pediatric asthma patients based on LSTM (Long Short Term Memory) model

    CN118588301A

  • Pre-emptive asthma risk notifications based on medicament device monitoring

    WO2021021566A1

Cited By

  • Acute attack early warning system and method for mild and moderate asthma based on multi-source dynamic data fusion

    CN121260515A