A method, device, equipment, medium and product for predicting the scale of stroke
By constructing a multi-source data set and training a deep neural network model, the problem of low accuracy in predicting stroke incidence scale in the existing technology is solved, and a more accurate and comprehensive prediction of the number of daily hospitalizations for stroke is achieved.
Patent Information
- Application Number
- CN202411010489.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-07-26
AI Technical Summary
When predicting the scale of stroke incidence, the prior art is limited by medical data acquisition and the number of data is small, resulting in low prediction accuracy and failure to effectively consider external factors such as meteorological environment and search engine search index.
By constructing a multi-source data set, including the number of daily hospitalizations for stroke, meteorological data, atmospheric pollutant data and stroke-related search engine search index, performing missing data supplement and derivative processing, screening correlation and importance, and training deep neural network models (such as CNN-LSTM-Attention model) for prediction.
It improves the accuracy of prediction of stroke incidence scale, can consider multiple risk factors more effectively, and improves the performance and interpretability of the prediction model.
Smart Images

Figure CN118942728B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data prediction, and in particular to a method, device, equipment, medium and product for predicting the scale of stroke incidence. Background Art
[0002] Stroke is a cerebrovascular disease caused by acute cerebral circulation disorder, which leads to brain function damage. It is divided into ischemic stroke and hemorrhagic stroke, and is characterized by high morbidity, high disability rate and high mortality rate.
[0003] Regarding stroke risk prediction, previous studies have mostly conducted risk prediction of stroke recurrence or prognosis based on internal data such as clinical characteristics. There are few predictive studies based on external factors such as meteorological environment to predict the incidence of stroke. In addition, due to the limitations of medical data acquisition, the amount of data used is usually small, resulting in low accuracy in predicting the scale of stroke incidence. Summary of the invention
[0004] The purpose of this application is to provide a method, device, equipment, medium and product for predicting the scale of stroke, which can improve the accuracy of predicting the scale of stroke.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a method for predicting the scale of stroke incidence, comprising:
[0007] Obtain a multi-source dataset consisting of historical data related to stroke risk;
[0008] Preprocessing the multi-source data set to obtain a complete data set; the preprocessing includes nick data supplementation processing and derivative processing;
[0009] Screening the data in the complete data set for relevance and importance to obtain an input data set;
[0010] The input data set is used to train a deep neural network to obtain a stroke incidence scale prediction model;
[0011] The stroke incidence scale prediction model is used to predict the number of stroke hospitalizations on a future set day.
[0012] Optionally, each sample in the multi-source data set includes the number of stroke hospitalized patients per day, meteorological data, atmospheric pollutant data, and a stroke-related search engine search index, wherein the meteorological data, the atmospheric pollutant data, and the stroke-related search engine search index are all daily historical data corresponding to the number of stroke hospitalized patients per day; the meteorological data include air pressure, dew point, temperature, relative humidity, precipitation, and wind speed, and the atmospheric pollutant data include PM 10 、PM2.5 , SO2, NO2 and O3, the stroke-related search engine search index includes stroke-related names, symptoms, examination methods, treatment drugs and names of brain specialty hospitals.
[0013] Optionally, the names related to stroke include cerebral infarction, cerebral hemorrhage and apoplexy, the symptoms include hemiplegia and facial paralysis, and the examination method includes magnetic resonance imaging.
[0014] Optionally, preprocessing the multi-source data set to obtain a complete data set specifically includes:
[0015] For each sample in the multi-source data set, the number of stroke hospitalizations on the last two days of each month is deleted, and the number of stroke hospitalizations on the last two days of the month is replaced by the average of the number of stroke hospitalizations on the 5 days before and after the last two days of the month to obtain a first preprocessed data set;
[0016] For each sample in the first preprocessed data set, a sliding average of the search engine search indexes related to stroke from t-7 to t-1 is calculated, and the sliding average is added to the sample to obtain a second preprocessed data set; t represents the date and time of the sample;
[0017] For each sample in the second preprocessed data set, the data with the mark in the meteorological data are removed, the short-time gap data are supplemented by linear averaging, and the long-time gap data are supplemented by ERA5 reanalysis data, so as to obtain the third preprocessed data set; the data with the mark are data generated due to maintenance or failure of equipment for collecting meteorological data, the short-time gap data are data corresponding to the continuous time of the removed data being less than the set value, and the long-time gap data are data corresponding to the continuous time of the removed data being greater than or equal to the set value;
[0018] For each sample in the third preprocessed data set, the daily average value, maximum value, minimum value, change value from t-7 to t-1 and the tth day, and the sliding average value from t-7 to t-1 and the tth day of each meteorological data are used as meteorological derivative data of the sample, and the absolute humidity calculated from the air pressure, relative humidity and temperature is used as the meteorological derivative data of the sample, and the meteorological derivative data are added to the corresponding sample to obtain a fourth preprocessed data set;
[0019] For each sample in the fourth preprocessed data set, taking the sliding average of each air pollutant data from day t-7 to day t-1 and day t as air pollutant derived data, and adding the air pollutant derived data to the corresponding sample to obtain a fifth preprocessed data set;
[0020] Each sample in the fifth preprocessed data set is fused with a time feature to form the complete data set; the time feature includes month, day, week, holiday and twenty-four solar terms.
[0021] Optionally, the data in the complete data set is screened for relevance and importance to obtain an input data set, specifically including:
[0022] Calculate the correlation between each element in the complete data set and the number of stroke hospitalization days;
[0023] Deleting factors in the complete data set whose correlation index is less than or equal to a set value, and retaining factors in the complete data set whose correlation index is greater than the set value, to obtain a filtered data set;
[0024] The Xgboost machine learning method and the SHAP (Shapley Additive Explanations) interpretability algorithm are used to screen the importance of the elements in the filtered data set for the prediction of the number of stroke hospitalization days to obtain an input data set.
[0025] Optionally, the deep neural network is a CNN-LSTM-Attention model, and the CNN-LSTM-Attention model includes an input layer, a CNN layer, an LSTM layer, an attention layer and an output layer connected in sequence.
[0026] In a second aspect, the present application provides a device for predicting the scale of stroke incidence, comprising:
[0027] A multi-source data set acquisition module is used to acquire a multi-source data set consisting of historical data related to the risk of stroke;
[0028] A preprocessing module, used to preprocess the multi-source data set to obtain a complete data set; the preprocessing includes nick data supplementation processing and derivative processing;
[0029] A data screening module, used to screen the data in the complete data set for relevance and importance to obtain an input data set;
[0030] A deep neural network training module, used to train the deep neural network using the input data set to obtain a stroke incidence scale prediction model;
[0031] The stroke incidence scale prediction model application module is used to use the stroke incidence scale prediction model to predict the number of stroke hospitalizations on a future set day.
[0032] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-described methods for predicting the scale of stroke.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for predicting the scale of stroke.
[0034] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for predicting the scale of stroke.
[0035] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0036] The present application provides a method, device, equipment, medium and product for predicting the scale of stroke. By constructing a multi-source data set consisting of historical data related to the risk of stroke, more risk factors for stroke are involved, and then the data set is supplemented and derived, as well as correlation and importance screening is performed, so that the data in the data set for training the deep neural network are more relevant and important factors to the risk of stroke, thereby improving the accuracy of predicting the scale of stroke. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A schematic diagram of a flow chart of a method for predicting the scale of stroke incidence provided in one embodiment of the present application;
[0039] Figure 2 A principle block diagram of a method for predicting the scale of stroke incidence provided in one embodiment of the present application;
[0040] Figure 3 A schematic diagram showing the comparison of the prediction results of the number of hospitalized stroke patients provided in one embodiment of the present application;
[0041] Figure 4 A schematic diagram of functional modules of a stroke incidence scale prediction device provided in one embodiment of the present application;
[0042] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0045] This application provides a method for predicting the scale of stroke incidence, such as Figure 1 and Figure 2 As shown, the method for predicting the scale of stroke incidence includes the following steps.
[0046] Step 101: Obtain a multi-source data set consisting of historical data related to the risk of stroke.
[0047] Step 102: pre-processing the multi-source data set to obtain a complete data set; the pre-processing includes nick data supplementation processing and derivation processing.
[0048] Step 103: Screen the data in the complete data set based on relevance and importance to obtain an input data set.
[0049] Step 104: Use the input data set to train a deep neural network to obtain a stroke incidence scale prediction model.
[0050] Step 105: using the stroke incidence scale prediction model to predict the number of stroke hospitalizations on a future set day.
[0051] This application involves more risk factors for stroke by constructing a multi-source data set consisting of historical data related to the risk of stroke, and then performs missing data supplementation and derivative processing on the data set, as well as correlation and importance screening, so that the data in the data set for training deep neural networks are more relevant and important factors for the risk of stroke, thereby improving the accuracy of predicting the scale of stroke.
[0052] Each sample in the multi-source data set includes the number of stroke hospitalized patients per day, meteorological data, atmospheric pollutant data, and a stroke-related search engine search index. The meteorological data, the atmospheric pollutant data, and the stroke-related search engine search index are all daily historical data corresponding to the number of stroke hospitalized patients per day. The meteorological data are selected from the observation data of the ground automatic weather station. The meteorological data are hourly resolution meteorological data. The meteorological data include air pressure, dew point, temperature, relative humidity, precipitation, and wind speed. The atmospheric pollutant data come from the public data of the China National Environmental Monitoring Center. The atmospheric pollutant data include PM 10 、PM 2.5 , SO2, NO2 and O3, more specifically, O3 includes hourly values and daily maximum 8-hour average values (MDA8 O3), and the stroke-related search engine search index includes stroke-related names, symptoms, examination methods, treatment drugs and names of brain specialty hospitals.
[0053] In an exemplary embodiment, the multi-source dataset is a multi-source dataset related to stroke risk prediction from 2014 to 2019, and the historical data on the number of daily stroke hospitalizations covers all third-level and above hospitals in Tianjin; the historical meteorological data are selected from the observation data of 13 national-level ground automatic weather stations in Tianjin.
[0054] Names related to stroke include cerebral infarction, cerebral hemorrhage and apoplexy. The symptoms include hemiplegia and facial paralysis. The examination methods include magnetic resonance imaging. The treatment drugs include aspirin.
[0055] In order to make the data in the data set more complete, step 102 specifically includes:
[0056] For each sample in the multi-source data set, for the stroke daily hospitalization data, affected by the medical expense settlement, the number of stroke daily hospitalizations on the last two days of each month was deleted, and the mean of the number of stroke daily hospitalizations on the 5 days before and after the last two days of the month was used to replace the number of stroke daily hospitalizations on the last two days of the month to obtain the first preprocessed data set. The weekends on the 5 days before and after the last two days of the month were excluded.
[0057] For each sample in the first preprocessed data set, a sliding average of the search engine search index related to stroke from t-7 to t-1 is calculated, and the sliding average is added to the sample to obtain a second preprocessed data set; t represents the date and time of the sample.
[0058] For each sample in the second preprocessed data set, the marked data in the meteorological data are removed, and then the data at the time of deletion are supplemented. The supplementation of the data at the time of deletion specifically includes: using linear average to supplement the short-time gap data, and using ERA5 reanalysis data to supplement the long-time gap data, so as to obtain the third preprocessed data set; the marked data are data generated due to maintenance or failure of equipment for collecting meteorological data, the short-time gap data are data corresponding to the continuous time of the removed data being less than the set value, and the long-time gap data are data corresponding to the continuous time of the removed data being greater than or equal to the set value.
[0059] Data derivation is performed for each sample in the third preprocessed data set, specifically including: taking the daily average, maximum, minimum, change value from t-7 to t-1 and the tth day, and the sliding average from t-7 to t-1 and the tth day of each meteorological data as the meteorological derivative data of the sample, and taking the air pressure, relative humidity and temperature according to the absolute humidity calculated according to the formula recommended by the World Meteorological Organization as the meteorological derivative data of the sample, and adding the meteorological derivative data to the corresponding sample to obtain the fourth preprocessed data set.
[0060] For each sample in the fourth preprocessed data set, the sliding average of each atmospheric pollutant data from t-7 to t-1 and the tth day is used as the atmospheric pollutant derived data, and the atmospheric pollutant derived data is added to the corresponding sample to obtain the fifth preprocessed data set.
[0061] Each sample in the fifth preprocessed data set is fused with a time feature to form the complete data set; the time feature includes month, day, week, holiday and twenty-four solar terms.
[0062] The 24 solar terms reflect the changes in natural rhythms. The occurrence of diseases is closely related to the 24 solar terms. In this application, they are used to train the model to understand which solar terms are most prone to stroke.
[0063] Among them, step 103 uses correlation test to preliminarily screen the influencing factors with strong correlation with the number of stroke hospitalizations, and further uses Xgboost machine learning method combined with SHAP interpretability algorithm to screen the factors that have an important impact on the number of stroke hospitalizations one by one, forming an input data set, which specifically includes:
[0064] The correlation between each element in the complete data set and the number of stroke hospitalization days was calculated.
[0065] Delete the correlation index R in the complete data set 2 The factors whose correlation index is less than or equal to the set value are retained in the complete data set, and the factors whose correlation index is greater than the set value are obtained to obtain the filtered data set.
[0066] The Xgboost machine learning method and the SHAP (Shapley Additive Explanations) interpretability algorithm are used to screen the importance of the elements in the filtered data set for the prediction of the number of stroke hospitalization days to obtain an input data set.
[0067] The SHAP interpretability algorithm helps understand how the model makes a specific prediction by calculating the contribution of each feature to the model's prediction. These contribution values are called SHAP values, which reflect the degree of influence of the feature on the model's prediction results. The closer the SHAP value is to zero, the smaller the contribution of the feature to the prediction; and the farther the SHAP value is from zero, the greater the contribution of the feature to the prediction. After the Xgboost prediction model is built, it can be connected to the SHAP interpretability algorithm to obtain the SHAP value of each input feature. The above algorithms are all implemented in Python.
[0068] The importance of three types of features, namely, stroke search engine index, meteorological elements, and atmospheric pollutants, was screened one by one. The importance screening principles included: (1) the SHAP value was significantly far from 0; (2) the characteristic value and the SHAP value changed in the same or opposite way, showing a relatively obvious linear influence pattern; (3) there were many types of meteorological elements, and the top 20 features in terms of importance were selected.
[0069] The input data set includes 34 influencing factors, that is, 34 elements that affect the number of stroke hospitalizations per day, including 5 time features, 3 stroke search engine indexes, 20 meteorological parameters and 6 air pollution factors.
[0070] The set value is 0.2.
[0071] The deep neural network is a CNN-LSTM-Attention model, which includes an input layer, a convolutional neural network (CNN) layer, a long short-term memory network (LSTM) layer, an attention layer, and an output layer connected in sequence. This application uses the Pytorch library of the Python language to construct the CNN-LSTM-Attention model.
[0072] The training process of the CNN-LSTM-Attention model includes: dividing the input data set into a training set and a test set in a time series ratio of 8:2 as input items, reading the data of the training set and the test set respectively, and normalizing them in the normalization range of 0-1.
[0073] The normalized data is converted into a format that can be used by the model, and the time series data is converted into an input feature matrix and a target value array with a sliding window. The sliding window step size is determined by the sliding average days of the selected factors (elements) in the input data. The target value in the target value array is the number of stroke hospitalization days to be predicted (in the future) corresponding to the input feature matrix of each sliding window. The CNN-LSTM-Attention model is a single-step output in subsequent practical applications, that is, the predicted data for one day is output at a time.
[0074] The input layer in the CNN-LSTM-Attention model specifies the format of the input data (batch size, number of time steps, feature dimension).
[0075] The CNN layer is used to extract local features and patterns. When sample data enters the CNN layer, it will be sequentially subjected to convolution, pooling, and node expansion (dimensionality reduction) operations. For sequence data, this CNN-LSTM-Attention model adopts one-dimensional convolution. The convolution kernel only performs convolution in a single time domain direction. The number of convolution kernels is 3, and the activation function uses the ReLU function. The pooling layer performs dimensionality reduction operations on the convolution output, retaining strong features and removing weak features, while reducing the number of parameters to prevent overfitting. The processed relatively stable information is passed as a whole to the LSTM network for long sequence prediction.
[0076] The LSTM layer is used to capture long-term dependencies in time series and can extract the temporal change information of the number of stroke hospitalizations. LSTM introduces input gates, forget gates, and output gates, and also adds cell states and hidden states. The cell state stores long-term memory, which can alleviate gradient disappearance, and the hidden state stores short-term memory.
[0077] The output layer is used to reduce the dimension of the weight input flattening layer after the Attention operation, convert it into a one-dimensional vector, and output the prediction sequence result through the output layer. This application stipulates that only the single-step prediction result is output.
[0078] After the CNN-LSTM-Attention model is built, the model is compiled to specify the loss function (MSE) and optimizer (Adam), and finally the model is fitted, the training data and labels are passed to the model for training, and the number of training iterations (epochs) and batch size (batch_size) are specified.
[0079] The prediction results of the CNN-LSTM-Attention model are denormalized, and the output results are denormalized using the denormalization function to obtain normal dimensional results.
[0080] After the CNN-LSTM-Attention model was built, the model parameters were adjusted, and the mean absolute percentage error (MAPE), mean square error (MSE), root mean square error (RMSE) and R square value (R 2 ) Evaluate the prediction results of each model and select the optimal model for subsequent predictions based on the evaluation indicators.
[0081] For parameter adjustment of the CNN-LSTM-Attention model, heuristic search is used to adjust the optimal parameters of the model, and the optimal model is saved for subsequent prediction based on the evaluation index. The optimal parameters in this example are shown in Table 1.
[0082] Table 1 Optimal input parameters of CNN-LSTM-Attention model
[0083]
[0084]
[0085] For the future prediction function of the stroke incidence scale prediction model, the single-step rolling prediction method is used to predict the value of the next N steps (i.e., the forecast for the next N days), and N is 3. Load the trained stroke incidence scale prediction model, predict the last time window in the test set, update the sequence based on the output of the stroke incidence scale prediction model combined with the meteorological environment forecast and the latest historical data of the stroke search engine search index, and add it back to the window for the next time step prediction, and repeat the above steps. For the forecast of the number of stroke hospitalizations on the nth day, the starting time is divided into 20:00 on the n-1th day and 8:00 on the nth day.
[0086] In view of the deviation of the model in predicting the number of hospitalized patients, the present application adopts the stroke incidence scale prediction model, and after predicting the number of hospitalized patients for stroke on a future set day, it also includes converting the prediction of the number of stroke patients into a risk level prediction, and dividing the prediction into five risk levels of 1-5 according to the 25%, 50%, 75% and 90% quantiles of the cumulative probability distribution of the number of hospitalized patients for stroke on the previous year on the prediction day (future set day). The five risk levels are level 1 risk, level 2 risk, level 3 risk, level 4 risk and level 5 risk, and the risk gradually increases from 1-5. The risk level to which the predicted future set day belongs is determined according to the number range corresponding to the five risk levels, so as to realize the conversion of the number prediction into the risk level prediction. Due to the influence of the weekend effect on medical treatment behavior, the risk level is divided into two modes: working days and holidays. Since the number of hospitalized patients for stroke on working days and holidays in the previous year is different, it is first determined whether the predicted future set day is a working day or a holiday, and then the risk level is determined according to the judgment mode.
[0087] For example, during the working days in 2019, the number of daily stroke hospitalizations was 432 to 970, which were divided into five risk levels 1-5 according to the 25%, 50%, 75% and 90% percentiles of the cumulative probability distribution: 0-25% (≤683 people, level 1 risk), 25%-50% (684-716 people, level 2 risk), 50%-75% (717-761 people, level 3 risk), 75%-90% (762-814 people, level 4 risk), and 90%-100% (≥815, level 5 risk).
[0088] During the holidays in 2019, the number of daily hospitalizations for stroke was 223 to 829, which were divided into five risk levels of 1-5 according to the 25%, 50%, 75% and 90% percentiles of the cumulative probability distribution: 0-25% (≤386 people, level 1 risk), 25%-50% (387-420 people, level 2 risk), 50%-75% (421-454 people, level 3 risk), 75%-90% (455-495 people, level 4 risk), and 90%-100% (≥496, level 5 risk).
[0089] Figure 3 Table 2 shows the prediction comparison and model evaluation results of the number of stroke hospitalizations using CNN-LSTM-Attention, LSTM, and the generalized linear additive model (GAM) widely used in the field of epidemiology. Figure 3 (a), (b) and (c) are the comparisons between the true value and the prediction results of CNN-LSTM-Attention, LSTM and GAM respectively. Compared with LSTM and GAM, the prediction effect of CNN-LSTM-Attention on the test set is R 2 , RMSE, MSE, and MAPE are all optimal, which effectively improves the prediction accuracy of stroke risk and has important application value in the prediction of stroke risk.
[0090] Table 2 Comparison of evaluation indicators of model test set prediction results
[0091]
[0092] The present application discloses a method for predicting the scale of stroke incidence, which has the following technical effects: a stroke risk prediction model is established based on external factors such as meteorological environment and network search index, which has a wider application value. The stroke network search index can reflect the incidence of stroke in a certain area during a certain period of time from the side, which has considerable indicative significance for stroke risk prediction. After accessing the meteorological environment forecast data, the meteorological department can timely release the stroke risk forecast, which benefits a wider population and plays an important role in preventing stroke and reducing the economic burden on families and medical insurance.
[0093] This application uses the CNN-LSTM-Attention module to build a stroke risk prediction model. Compared with the generalized linear additive model (GAM) and LSTM single model widely used in the field of epidemiology, the CNN-LSTM-Attention hybrid model effectively improves the prediction accuracy of stroke risk.
[0094] Based on the same inventive concept, the embodiment of the present application also provides a stroke onset scale prediction device for implementing the above-mentioned stroke onset scale prediction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more stroke onset scale prediction device embodiments provided below can refer to the limitations of the stroke onset scale prediction method above, and will not be repeated here.
[0095] In an exemplary embodiment, Figure 4 As shown, a device for predicting the incidence scale of stroke is provided, comprising:
[0096] The multi-source data set acquisition module 201 is used to acquire a multi-source data set consisting of historical data related to the risk of stroke.
[0097] The preprocessing module 202 is used to preprocess the multi-source data set to obtain a complete data set; the preprocessing includes nick data supplementation processing and derivative processing.
[0098] The data screening module 203 is used to screen the data in the complete data set based on relevance and importance to obtain an input data set.
[0099] The deep neural network training module 204 is used to train the deep neural network using the input data set to obtain a stroke incidence scale prediction model.
[0100] The stroke incidence scale prediction model application module 205 is used to use the stroke incidence scale prediction model to predict the number of stroke hospitalizations on a future set day.
[0101] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store stroke incidence scale prediction data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for predicting the scale of stroke incidence is implemented.
[0102] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components. In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0103] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0104] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0105] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0106] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0107] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a data processing logic of a programmable logic device, etc., but is not limited thereto.
[0108] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A method for predicting the incidence of stroke, characterized in that: The method for predicting the scale of stroke incidence comprises: Obtain a multi-source dataset consisting of historical data related to stroke risk; Preprocessing the multi-source data set to obtain a complete data set; the preprocessing includes nick data supplementation processing and derivative processing; Screening the data in the complete data set for relevance and importance to obtain an input data set; The input data set is used to train a deep neural network to obtain a stroke incidence scale prediction model; The stroke incidence scale prediction model is used to predict the number of stroke hospitalizations on a future set day; Each sample in the multi-source data set includes the number of stroke hospitalized patients per day, meteorological data, atmospheric pollutant data, and a stroke-related search engine search index. The meteorological data, the atmospheric pollutant data, and the stroke-related search engine search index are all daily historical data corresponding to the number of stroke hospitalized patients per day; the meteorological data include air pressure, dew point, temperature, relative humidity, precipitation, and wind speed; the atmospheric pollutant data include PM 10 、PM 2.5 , SO2, NO2 and O3, the search engine search index related to stroke includes the names, symptoms, examination methods, treatment drugs and brain specialty hospital names related to stroke; Preprocessing the multi-source data set to obtain a complete data set specifically includes: For each sample in the multi-source data set, the number of stroke hospitalizations on the last two days of each month is deleted, and the number of stroke hospitalizations on the last two days of the month is replaced by the average of the number of stroke hospitalizations on the 5 days before and after the last two days of the month to obtain a first preprocessed data set; For each sample in the first preprocessed data set, a sliding average of the search engine search indexes related to stroke from t-7 to t-1 is calculated, and the sliding average is added to the sample to obtain a second preprocessed data set; t represents the date and time of the sample; For each sample in the second preprocessed data set, the data with the mark in the meteorological data are removed, the short-time gap data are supplemented by linear averaging, and the long-time gap data are supplemented by ERA5 reanalysis data, so as to obtain the third preprocessed data set; the data with the mark are data generated due to maintenance or failure of equipment for collecting meteorological data, the short-time gap data are data corresponding to the continuous time of the removed data being less than the set value, and the long-time gap data are data corresponding to the continuous time of the removed data being greater than or equal to the set value; For each sample in the third preprocessed data set, the daily average value, maximum value, minimum value, change value from t-7 to t-1 and the tth day, and the sliding average value from t-7 to t-1 and the tth day of each meteorological data are used as meteorological derivative data of the sample, and the absolute humidity calculated from the air pressure, relative humidity and temperature is used as the meteorological derivative data of the sample, and the meteorological derivative data are added to the corresponding sample to obtain a fourth preprocessed data set; For each sample in the fourth preprocessed data set, taking the sliding average of each air pollutant data from day t-7 to day t-1 and day t as air pollutant derived data, and adding the air pollutant derived data to the corresponding sample to obtain a fifth preprocessed data set; Each sample in the fifth preprocessed data set is fused with a time feature to form the complete data set; the time feature includes month, day, week, holiday and twenty-four solar terms.
2. The method for predicting the scale of stroke incidence according to claim 1, characterized in that: Names related to stroke include cerebral infarction, cerebral hemorrhage and apoplexy. The symptoms include hemiplegia and facial paralysis. The examination methods include magnetic resonance imaging.
3. The method for predicting the scale of stroke incidence according to claim 1, characterized in that: The data in the complete data set is screened for relevance and importance to obtain an input data set, which specifically includes: Calculate the correlation between each element in the complete data set and the number of stroke hospitalization days; Deleting factors in the complete data set whose correlation index is less than or equal to a set value, and retaining factors in the complete data set whose correlation index is greater than the set value, to obtain a filtered data set; The Xgboost machine learning method and the SHAP interpretability algorithm are used to screen the importance of the elements in the filtered data set for the prediction of the number of stroke hospitalization days to obtain an input data set.
4. The method for predicting the scale of stroke incidence according to claim 1, characterized in that: The deep neural network is a CNN-LSTM-Attention model, which includes an input layer, a CNN layer, an LSTM layer, an attention layer and an output layer connected in sequence.
5. A device for predicting the scale of stroke incidence, characterized in that: The stroke incidence scale prediction device comprises: A multi-source data set acquisition module is used to acquire a multi-source data set consisting of historical data related to the risk of stroke; A preprocessing module, used to preprocess the multi-source data set to obtain a complete data set; the preprocessing includes nick data supplementation processing and derivative processing; A data screening module, used to screen the data in the complete data set for relevance and importance to obtain an input data set; A deep neural network training module, used to train the deep neural network using the input data set to obtain a stroke incidence scale prediction model; A stroke incidence scale prediction model application module is used to use the stroke incidence scale prediction model to predict the number of stroke hospitalizations on a future set day; Each sample in the multi-source data set includes the number of stroke hospitalized patients per day, meteorological data, atmospheric pollutant data, and a stroke-related search engine search index. The meteorological data, the atmospheric pollutant data, and the stroke-related search engine search index are all daily historical data corresponding to the number of stroke hospitalized patients per day; the meteorological data include air pressure, dew point, temperature, relative humidity, precipitation, and wind speed; the atmospheric pollutant data include PM 10 、PM 2.5 , SO2, NO2 and O3, the search engine search index related to stroke includes the names, symptoms, examination methods, treatment drugs and brain specialty hospital names related to stroke; Preprocessing the multi-source data set to obtain a complete data set specifically includes: For each sample in the multi-source data set, the number of stroke hospitalizations on the last two days of each month is deleted, and the number of stroke hospitalizations on the last two days of the month is replaced by the average of the number of stroke hospitalizations on the 5 days before and after the last two days of the month to obtain a first preprocessed data set; For each sample in the first preprocessed data set, a sliding average of the search engine search indexes related to stroke from t-7 to t-1 is calculated, and the sliding average is added to the sample to obtain a second preprocessed data set; t represents the date and time of the sample; For each sample in the second preprocessed data set, the data with the mark in the meteorological data are removed, the short-time gap data are supplemented by linear averaging, and the long-time gap data are supplemented by ERA5 reanalysis data, so as to obtain the third preprocessed data set; the data with the mark are data generated due to maintenance or failure of equipment for collecting meteorological data, the short-time gap data are data corresponding to the continuous time of the removed data being less than the set value, and the long-time gap data are data corresponding to the continuous time of the removed data being greater than or equal to the set value; For each sample in the third preprocessed data set, the daily average value, maximum value, minimum value, change value from t-7 to t-1 and the tth day, and the sliding average value from t-7 to t-1 and the tth day of each meteorological data are used as meteorological derivative data of the sample, and the absolute humidity calculated from the air pressure, relative humidity and temperature is used as the meteorological derivative data of the sample, and the meteorological derivative data are added to the corresponding sample to obtain a fourth preprocessed data set; For each sample in the fourth preprocessed data set, taking the sliding average of each air pollutant data from day t-7 to day t-1 and day t as air pollutant derived data, and adding the air pollutant derived data to the corresponding sample to obtain a fifth preprocessed data set; Each sample in the fifth preprocessed data set is fused with a time feature to form the complete data set; the time feature includes month, day, week, holiday and twenty-four solar terms.
6. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for predicting the scale of stroke according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for predicting the scale of stroke incidence described in any one of claims 1 to 4 is implemented.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for predicting the scale of stroke incidence described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Respiratory system disease patient number prediction method based on lag analysis and LSTM
CN110706823A
Cerebrovascular disease high-risk population risk prediction method based on climatic factors
CN111180073A