A method, system, device, and medium for predicting risk of allergic disease
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING HOSPITAL
- Filing Date
- 2026-04-27
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]因此,本发明解决的技术问题是:现有方法未建立个体基线与后续数据的对比机制,无法量化症状相对于个体健康状态的变化程度,且在特征融合时未针对症状改变量特征建立差异化的权重计算方式;在模型训练中缺少环境特征与症状改变量特征交互关系的挖掘机制,无法反映过敏性疾病由环境诱发、症状动态变化的协同发病特点
[0016] The beneficial effects of the present invention are as follows: By establishing individual baseline data and calculating the characteristics of symptom changes, the present invention transforms prediction from relying on a single test value to a dynamic assessment based on individual health status, which can identify the trend of symptom deterioration and provide timely warnings even when the test indicators are still within the normal range.
Smart Images

Figure CN122531726A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of disease risk prediction technology, specifically to a method, system, device, and medium for predicting the risk of allergic diseases. Background Technology
[0002] The onset of allergic diseases is closely related to environmental factors, individual immune status, and dynamic changes in symptoms. Current predictive techniques often use physiological or environmental data from a single moment to build models, lacking continuous tracking of individual symptom trends. Furthermore, in the feature fusion stage, a uniform weighting strategy is typically applied to features from different sources, failing to consider the specific characteristics of symptom change features in allergic disease prediction. In addition, traditional machine learning models do not explore the interaction between environmental factors and dynamic symptom changes during training, making it difficult to accurately capture the synergistic pathogenesis of allergic diseases—characterized by environmental triggers and progressive symptom worsening—thus limiting further improvements in predictive accuracy. Summary of the Invention
[0003] In view of the above-mentioned problems, the present invention provides a method, system, device and medium for predicting the risk of allergic diseases.
[0004] Therefore, the technical problem solved by this invention is that: existing methods do not establish a comparison mechanism between individual baselines and subsequent data, cannot quantify the degree of change of symptoms relative to individual health status, and do not establish a differentiated weight calculation method for symptom change features during feature fusion; and lack a mining mechanism for the interaction between environmental features and symptom change features during model training, thus failing to reflect the synergistic pathogenesis of allergic diseases caused by environmental factors and dynamic changes in symptoms.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a method for predicting the risk of allergic diseases, comprising, Acquire the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data; The first physiological data at the reference time is compared with the first physiological data at the current time to obtain dynamic change characteristics; A first feature is obtained by performing a first feature extraction on the first physiological data at the current moment, and a second feature is obtained by performing a second feature extraction on the first environmental data; The dynamic change features are differentially weighted based on the amplitude value of the dynamic change features and the first physiological data at the reference time. The weighted dynamic change features are then fused with the first feature and the second feature to obtain a comprehensive feature. Interactive feature extraction is performed on the second feature and the dynamic change feature. Interactive features that meet preset conditions are selected and combined with the comprehensive feature to obtain the predicted input feature. The predicted input features are input into the allergic disease risk prediction model, which outputs the risk level.
[0006] As a preferred embodiment of the allergic disease risk prediction method of the present invention, wherein: the first physiological data at the reference time is the first physiological data collected by the subject for the first time, and is set as the baseline data; The dynamic change feature is the difference between the first physiological data at the current moment and the baseline data.
[0007] As a preferred embodiment of the allergic disease risk prediction method of the present invention, the differential weighting includes: weighting the amplitude value of the dynamic change feature according to a first adjustment coefficient to obtain a first weighting term; The first physiological data at the reference time is weighted according to the second adjustment coefficient to obtain the second weighting term; The first weighted term and the second weighted term are summed to obtain a sum value; the sum value is then subjected to activation function mapping to obtain the fusion weight coefficients. The dynamic change features are weighted according to the fusion weight coefficients to obtain the weighted dynamic change features.
[0008] As a preferred embodiment of the allergic disease risk prediction method described in this invention, the first physiological data includes objective detection data and subjective symptom data; The first feature extraction includes: The covariance matrix is calculated from the objective detection data, and the covariance matrix is decomposed into eigenvalues. The principal components whose cumulative contribution rate reaches a preset threshold are selected to obtain the objective physiological feature vector. The subjective symptom data and the dynamic change features are combined to form a time-series feature sequence. The time-series feature sequence is then subjected to time-series smoothing to obtain a subjective physiological feature vector. The objective physiological feature vector and the subjective physiological feature vector are concatenated to obtain the first feature.
[0009] As a preferred embodiment of the allergic disease risk prediction method described in this invention, the second feature extraction includes: The first environmental data is input into a long short-term memory network, wherein a feature attention layer is provided between the input layer and the long short-term memory layer; The feature attention layer assigns attention coefficients to each environmental feature in the first environmental data to obtain a weighted environmental feature sequence. The temporal dependencies of the weighted environmental feature sequence are processed through the input gate, forget gate, and output gate of the long short-term memory network to output the second feature.
[0010] In a preferred embodiment of the allergic disease risk prediction method described in this invention, the extraction and screening of the interactive features includes: Gradient boosting trees are used to calculate the gain value for each interaction term between the second feature and the dynamically changing feature; Sort the interaction items according to the gain value; The interaction items with the highest gain values, representing a predetermined proportion, are selected as the interaction features.
[0011] In a preferred embodiment of the allergic disease risk prediction method described in this invention, the allergic disease risk prediction model is an ensemble learning model, and the training of the ensemble learning model includes: Multiple decision trees are trained using the predicted input features and disease risk labels; After each decision tree is trained, the weights of the dynamically changing feature and the second feature in the construction of the next decision tree are updated based on the gain value. The next decision tree is constructed with the updated weights, and the process is repeated iteratively until the ensemble learning model is obtained.
[0012] This invention provides a risk prediction system for allergic diseases.
[0013] To solve the above-mentioned technical problems, the present invention provides the following technical solution: an allergic disease risk prediction system, comprising: The data acquisition module is used to acquire the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data. The dynamic feature calculation module is used to compare the first physiological data at the reference time with the first physiological data at the current time to obtain dynamic change features; The feature extraction module is used to extract a first feature from the first physiological data at the current moment to obtain a first feature, and to extract a second feature from the first environmental data to obtain a second feature; The feature fusion module is used to perform differential weighting on the dynamic change features based on the amplitude value of the dynamic change features and the first physiological data at the reference time, and to fuse the weighted dynamic change features with the first feature and the second feature to obtain a comprehensive feature; The interactive feature processing module is used to extract interactive features from the second feature and the dynamic change feature, filter interactive features that meet preset conditions and combine them with the comprehensive feature to obtain the predicted input feature. The risk prediction module is used to input the predicted input features into the allergic disease risk prediction model and output the risk level.
[0014] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the allergic disease risk prediction method.
[0015] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for predicting the risk of allergic diseases.
[0016] The beneficial effects of the present invention are as follows: By establishing individual baseline data and calculating the characteristics of symptom changes, the present invention transforms prediction from relying on a single test value to a dynamic assessment based on individual health status, which can identify the trend of symptom deterioration and provide timely warnings even when the test indicators are still within the normal range.
[0017] In the feature fusion stage, the fusion weight of the feature is calculated based on the magnitude of the symptom change and the baseline data. Compared with traditional methods that use the same weight for all features or determine the weight based only on statistical indicators, this invention can highlight the impact of the degree of symptom deterioration and individual health status on the prediction, making the model more focused on high-risk groups.
[0018] During model training, by calculating the interaction features between environmental features and symptom change features and dynamically adjusting feature weights based on the interaction gain, the model can learn the synergistic pattern of rapid symptom deterioration under high pollen concentrations. In contrast, traditional random forests can only learn the importance of a single feature and cannot capture such complex relationships. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an overall flowchart of a method for predicting the risk of allergic diseases provided in one embodiment of the present invention. Detailed Implementation
[0021] To make the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0022] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a method for predicting the risk of allergic diseases, including: S1: Obtain the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data.
[0023] The primary physiological data includes objective test data and subjective symptom data. Objective test data is obtained through access to the hospital's information system and includes eight categories: complete blood count, total IgE, serum allergen-specific IgE, pulmonary function tests, exhaled nitric oxide (FeNO), peak expiratory flow (PEF), eosinophil count, and complement C3 / C4 levels. Pulmonary function tests include FEV1, FVC, and the FEV1 / FVC ratio. Objective test data is updated every three months, consistent with the clinical follow-up cycle.
[0024] Subjective symptom data were obtained through standardized scoring questionnaires pushed to users' applications, including ACT, VAS, and POEM scores. The ACT score consists of five multiple-choice questions covering five aspects: impact on daily activities, wheezing symptoms, nighttime sleep, use of emergency medications, and confidence in disease control. Each aspect is scored from 1 to 5, for a total score of 5 to 25. The VAS score is a visual analog scale, ranging from 0 to 10, where 0 indicates no symptoms and 10 indicates the most severe symptoms. Users complete the assessment by sliding to select the corresponding score, suitable for evaluating the severity of symptoms in allergic rhinitis and hay fever. The POEM score includes seven assessment items: dry skin, erythema, papules or plaques, exudation or crusting, scratch marks, lichenification, and pruritus. Each item is scored from 0 to 4, for a total score of 0 to 28.
[0025] The frequency of subjective symptom data pushes is dynamically adjusted based on the subjects' historical scoring results: ACT and VAS scores are pushed monthly. If a subject fails to complete the assessment within one month, the system automatically sends an SMS and an application pop-up reminder with a symptom assessment link. The push frequency for POEM scores is dynamically adjusted based on the subjects' historical scoring results. When the score reaches 3 or higher, a reminder and assessment link are pushed weekly. If the score remains between 0 and 2 for two consecutive weeks, the push frequency is adjusted to once a month. Subjective symptom data is updated according to the questionnaire push frequency, and each update triggers the calculation of dynamic change characteristics.
[0026] First Environmental Data acquires macro-environmental data by connecting to the national-level environmental monitoring platform, meteorological data by connecting to regional meteorological stations, and micro-environmental data by connecting to indoor air quality sensors through a user application. Macro-environmental data includes Air Quality Index (AQI), regional pollen concentration, PM2.5 concentration, and PM10 concentration; meteorological data includes temperature, humidity, air pressure, heat waves, tornadoes, and thunderstorm extreme weather records; micro-environmental data includes indoor PM2.5 concentration, mold concentration, and CO2 concentration.
[0027] Before performing the second feature extraction, the first environmental data is preprocessed, specifically including steps S11 to S14: S11: Binary encoding of extreme weather records in the first environmental data.
[0028] Extreme weather records are qualitative descriptive data and need to be converted into quantitative data for subsequent feature extraction. Extreme weather records are binary encoded, with an occurrence of extreme weather recorded as 1 and no occurrence as 0. The duration of the extreme weather is used as a derived feature and associated with the binary code, with the duration unit being hours. For example, a heatwave lasting 24 hours is encoded as "Heatwave Occurrence 1, Duration 24 Hours"; a thunderstorm lasting 2 hours is encoded as "Thunderstorm Occurrence 1, Duration 2 Hours"; and no extreme weather occurs on a day is encoded as "Extreme Weather Occurrence 0, Duration 0 Hours". After extreme weather encoding, outlier detection is performed on other environmental data.
[0029] S12: Use the local anomaly factor algorithm to detect outliers in the first environment data.
[0030] Environmental data may contain outliers due to sudden events (such as a sandstorm causing a sudden increase in PM2.5) or sensor malfunctions. For the environmental data points to be monitored... (e.g., PM2.5 concentration value and temperature value at a certain moment), determine its The set of nearest neighbor data points In this embodiment, the number of nearest neighbors The value is 10. Calculate the data points. Locally achievable density Locally achievable density equal To its The reciprocal of the average reachability distance of the nearest neighbor, where the average reachability distance is... To its Each point in the nearest neighbors The average reachable distance, where reachable distance is defined as the distance between points. To its own Distance to nearest neighbor and arrive The maximum of the two Euclidean distances between them. The formula for calculating the Local Outlier Factor (LOF) is: in, Indicates to of All data points in the nearest neighbor set Perform a summation operation; Indicates neighboring points Locally achievable density; Representing data points Locally achievable density; This represents the number of nearest neighbors. When the calculated LOF value exceeds a preset threshold of 2.0, it is considered an outlier. For example, the PM2.5 concentration at a certain moment is... Calculated using the local anomaly factor algorithm The value is 2.3, which exceeds the threshold of 2.0, so this data point is determined to be an outlier.
[0031] S13: The detected outliers are filled using a weighted filling method based on relevant environmental parameters.
[0032] There are physical or chemical correlations among environmental parameters, such as a significant correlation between AQI and PM2.5, and between humidity and mold concentration. The specific implementation of step S13 includes steps S131 to S134: S131: Filter relevant parameters that are significantly correlated with the target parameters corresponding to the outliers to be filled.
[0033] Identify the abnormal parameters to be filled as target parameters (such as PM2.5), and select other environmental parameters that have a significant linear or nonlinear correlation with the target parameters from the collected multi-dimensional environmental data as candidate parameters.
[0034] By calculating the Pearson correlation, it can be expressed as: in, For target parameters With candidate parameters The correlation coefficient, with a range of values of . The first and second parameters are respectively the target parameter and the candidate parameter. Each sample value; These are the sample means of the target parameter and the candidate parameter, respectively; This represents the sample size. In this embodiment, the correlation coefficient threshold is set to... Candidate parameters that meet this threshold are selected as relevant parameters. For example, when the target parameter is PM2.5, the correlation coefficient of AQI is calculated. Correlation coefficient of humidity Correlation coefficient of air pressure All three parameters have an absolute value greater than 0.6 and are therefore selected as relevant parameters.
[0035] S132: Calculate the normalized weights of the relevant parameters.
[0036] Taking the absolute value of the correlation coefficients of each relevant parameter, we obtain... ,in The number of relevant parameters. Normalized weights. The calculation formula is: in, Indicates the first The weights of the relevant parameters, with values ranging from 1 to 2. ,and Indicates the first The absolute value of the correlation coefficient of each relevant parameter; This represents the sum of the absolute values of the correlation coefficients of all relevant parameters. For example, for PM2.5 outlier filling, the relevant parameters are AQI, humidity, and air pressure, with absolute values of correlation coefficients of 0.85, 0.62, and 0.65 respectively, and a sum of absolute values of 2.12. Therefore, the weight of AQI is... Humidity weight Weight of air pressure .
[0037] S133: Obtain the valid data values of each relevant parameter at the time corresponding to the outlier.
[0038] For the time t corresponding to the outlier, extract the data values of each relevant parameter at that time. The valid data values are the data values of the relevant parameters at that time that are neither abnormal nor missing.
[0039] S134: The fill value is calculated using a weighted summation formula.
[0040] The filler value is obtained by weighted summing the valid data values of each relevant parameter at the time corresponding to the outlier, with the corresponding weights. The calculation formula is as follows: in, Filler values representing outliers of the target parameter; Indicates the first Normalized weights of each relevant parameter; Indicates the first The relevant parameters at time... Valid data values; This refers to the number of relevant parameters. For example, assume time... The PM2.5 anomaly value is The valid data for the relevant parameters during the same period is AQI. ,humidity air pressure Substitute into the formula to calculate: If there are no relevant parameters for the target parameter, a moving average method is used to fill the gap, taking the average of the five valid data points before and after the outlier as the fill value.
[0041] S14: Perform Z-score standardization on the first environmental data.
[0042] Different environmental parameters have different units and numerical ranges, such as temperature (in degrees Celsius) and PM2.5 (in μg / m³). 3 Humidity is expressed as a percentage, and standardization is needed to eliminate dimensional differences. The formula for Z-score standardization is: in, This represents the standardized data value; Represents the raw values of environmental data; This represents the mean of all valid data for this environmental parameter; This represents the standard deviation of the environmental parameter.
[0043] S2: Compare the first physiological data at the reference time with the first physiological data at the current time to obtain dynamic change characteristics.
[0044] The first physiological data at the baseline time is the first physiological data collected from the subject during the initial assessment, and is designated as the baseline data. This includes the initial values of eight objective testing indicators and the first completed ACT score, VAS score, and POEM score. The dynamic change characteristic is the difference between the first physiological data at the current moment and the baseline data, calculated using the following formula: Among them, the current data value is the objective detection indicator value or subjective score value collected at the current moment; This is the baseline data value. A positive value indicates an increase in the degree of abnormality of the indicator. A negative value indicates that the indicator has improved. The calculation of dynamic change characteristics is triggered each time subjective symptom data or objective test data is updated.
[0045] For example, the subject's first total IgE test result was Set as the baseline data for total IgE Three months later, the total IgE level was [value missing]. The dynamic characteristics of total IgE A positive value indicates a more severe degree of immune abnormality. The subject's initial ACT score was 22 points, which was set as the baseline data for the ACT score. One month later, the ACT score was 17. What are the dynamic characteristics of the ACT score change? Based on the ACT scoring system, a score of 17 indicates poor control.
[0046] S3: Extract the first feature from the first physiological data at the current moment to obtain the first feature, and extract the second feature from the first environmental data to obtain the second feature.
[0047] The specific implementation method for the first feature extraction includes steps S31 to S33: S31: Calculate the covariance matrix of the objective detection data, perform eigenvalue decomposition on the covariance matrix, select the principal components whose cumulative contribution rate reaches the preset threshold, and obtain the objective physiological feature vector.
[0048] The objective test data includes eight categories of indicators. Principal component analysis was used to extract principal components to reduce data dimensionality and retain key information. A physiological feature matrix was then constructed. , dimension ,in For the sample size, To ensure the objective number of detection indicators, this embodiment... Covariance matrix The calculation formula is: in, This represents the transpose of the eigenvalue matrix after centering. This represents the mean vector of eight objective detection indicators; The sample size. For the covariance matrix... Perform eigenvalue decomposition to obtain eigenvalues. and corresponding feature vectors The formula for calculating the cumulative contribution rate is: in, Indicates the first One eigenvalue; This indicates the number of principal components selected. In this embodiment, the preset value is... Selecting those with a cumulative contribution rate of 100% The former One principal component, in this embodiment , can be retained The above raw information yields an objective physiological feature vector. , dimension .
[0049] S32: Combine subjective symptom data with dynamic change features to form a time-series feature sequence. Perform time-series smoothing on the time-series feature sequence to obtain the subjective physiological feature vector.
[0050] The time-series feature sequence length is set to 3 months, containing 3 months of score data and 3 corresponding dynamic feature values. Exponential moving average is used for time-series smoothing of the feature sequence; the smoothing formula is as follows: in, This represents the smoothing coefficient, in this embodiment... Indicates the first Monthly ratings or dynamic change characteristics; Indicates the first The results are smoothed over a period of one month. Smoothing reduces the impact of short-term fluctuations on features, yielding a subjective physiological feature vector. , dimension .
[0051] S33: Concatenate the objective physiological feature vector with the subjective physiological feature vector to obtain the first feature. First Feature The calculation formula is: in, This represents a vector concatenation operation; Represents an objective physiological feature vector; This represents the subjective physiological feature vector. The first feature after concatenation... The dimension is In this embodiment, .
[0052] The specific implementation of the second feature extraction includes steps S34 to S35: S34: Input the first environmental data into the Long Short-Term Memory (LSTM) network. The LSM network has a feature attention layer between the input layer and the LSM layer.
[0053] The first environmental data is preprocessed in steps S11 to S14 and then input into the Long Short-Term Memory (LSTM) network. The LSM network includes an input layer, a feature attention layer, a first LSM layer, a second LSM layer, a dropout layer, and a fully connected layer. The connection relationship between the layers is as follows: input layer, feature attention layer, first LSM layer, second LSM layer, dropout layer, and fully connected layer.
[0054] The input layer receives environmental time-series data in a three-dimensional tensor format [batch_size, time_steps, feature_dim]. Here, batch_size is the batch size, which is 32 in this embodiment; time_steps is the time step, set to 7 days, meaning each sample contains environmental data for 7 consecutive days; and feature_dim is the environmental feature dimension, which is 8 in this embodiment, covering AQI, pollen concentration, PM2.5, PM10, temperature, humidity, air pressure, and duration of extreme weather.
[0055] The feature attention layer assigns dynamic attention coefficients to the eight input environmental features. A fully connected layer maps these environmental features to a 64-dimensional map, and the importance score for each feature is calculated using the following formula: in, Indicates the first One environmental characteristic; This represents the weight matrix, with dimension 1. This represents the bias vector, which has a dimension of 64. This represents the sigmoid activation function. The importance scores are normalized to make... The initial weights for extreme weather duration and pollen concentration were set to 0.3, while the initial weights for other features were set to 0.1, and these weights were dynamically adjusted during training. The feature attention layer multiplied the attention coefficients with the original environmental features to obtain a weighted sequence of environmental features.
[0056] The number of hidden units in both the first and second Long Short-Term Memory (LSTM) layers is set to 64, the activation function is tanh, and the recursive dropout rate is set to 0.1. The dropout rate of the dropout layer is 0.2. The fully connected layer maps the temporal features output from the LSM layers into a fixed-dimensional vector with a dimension of 64.
[0057] The training of the Long Short-Term Memory (LSTM) network includes: dividing the preprocessed first environment data into samples according to a time window of 7 days; dividing the data into training, validation, and test sets in a 7:2:1 ratio; initializing the weight parameters using a He normal distribution and setting the bias parameters to 0; using cross-entropy loss as the loss function, selecting Adam as the optimizer, and setting the initial learning rate to 0.001; employing a learning rate decay strategy, reducing the learning rate to 0.9 every 20 rounds for 100 iterations; enabling an early stopping mechanism with a patience of 10, meaning training stops if the validation set loss does not decrease for 10 consecutive rounds; and adjusting the initial weight allocation of the feature attention layer using the validation set after training.
[0058] S35: The temporal dependencies of the weighted environmental feature sequence are processed through the input gate, forget gate, and output gate of the Long Short-Term Memory Network to output the second feature.
[0059] Long Short-Term Memory (LSTM) networks handle the temporal dependencies of environmental data through gating mechanisms, and output the second feature after processing by fully connected layers. The dimension is 64.
[0060] S4: Based on the amplitude value of the dynamic change features and the first physiological data at the reference time, the dynamic change features are differentially weighted, and the weighted dynamic change features are fused with the first feature and the second feature to obtain the comprehensive features.
[0061] The specific implementation of differentiated weighting includes steps S41 to S44: S41: The amplitude values of the dynamic change characteristics are weighted according to the first adjustment coefficient to obtain the first weighted term.
[0062] The amplitude value of the dynamic change feature is the dynamic change feature. absolute value The absolute value reflects the magnitude of symptom changes; features with larger magnitudes of symptom changes receive higher weighting coefficients when calculating the fusion weights. The magnitude value is adjusted using the first adjustment coefficient. After weighting, the first weighting term is obtained, which is the first adjustment coefficient in this embodiment. .
[0063] S42: The first physiological data at the reference time is weighted according to the second adjustment coefficient to obtain the second weighting term. The value of the first physiological data at the reference time is the baseline data. Baseline data reflects an individual's initial health condition. Larger baseline data values indicate poorer initial health, and this characteristic receives a higher weighting coefficient when calculating the fusion weights. The baseline data is adjusted using a second adjustment factor. After weighting, a second weighting term is obtained, which is the second adjustment coefficient in this embodiment. .
[0064] It should be noted that the first adjustment coefficient Second adjustment coefficient The determination was made through a grid search parameter tuning process: the parameter search range was set to... and A total of 64 parameter combinations were generated; the model prediction accuracy and F1 score were used as evaluation metrics in the validation set (which accounted for a significant portion of the total data). The training was repeated 5 times for each set of parameters, and the average performance was calculated; finally, the set with the highest accuracy was selected. F1 score is the best Parameter combination .
[0065] S43: Summate the first weighted term and the second weighted term to obtain the sum. The formula for calculating the sum is: in, This represents the first adjustment coefficient; The amplitude value representing the dynamic change characteristics; This represents the second adjustment coefficient; This represents the baseline data value.
[0066] S44: Apply activation function mapping to the summation value to obtain the fusion weight coefficient. Weight the dynamic change features according to the fusion weight coefficient. Fuse the weighted dynamic change features with the first feature and the second feature to obtain the comprehensive feature.
[0067] Fusion weighting coefficient The calculation formula is: in, This represents the sigmoid activation function, with an output range of 0 to 1. This represents the first adjustment coefficient; The amplitude value representing the dynamic change characteristics; This represents the second adjustment coefficient; This represents the baseline data value. For example, suppose a subject's ACT score shows dynamic changes... Score, absolute value Baseline data Substitute the values into the formula to calculate the sum. After processing by the sigmoid function, This indicates that the dynamic change feature receives a high weight during fusion.
[0068] Weight of the first feature Weights of the second feature The mutual information value is determined by calculating the mutual information value between each feature and the risk label. The formula for calculating the mutual information value is as follows: in, Indicates the first feature Or second feature Indicates a risk label; Represents the joint probability; , These represent marginal probabilities. Risk labels include three levels: low risk, medium risk, and high risk. Low risk corresponds to no illness within the time window, medium risk corresponds to 2 to 3 illnesses within the time window, and high risk corresponds to 4 or more illnesses within the time window. A higher mutual information value indicates a stronger correlation between the feature and the risk label, and a larger weight is assigned accordingly. After weight normalization, the following conditions must be met... .
[0069] Comprehensive features The calculation formula is: in, The weight of the first feature is indicated; Indicates the first characteristic; The weight of the second feature; Indicates the second characteristic; The fusion weight coefficients represent the dynamic changes in characteristics; This represents a dynamically changing feature vector.
[0070] S5: Extract interactive features from the second feature and the dynamically changing feature, select interactive features that meet the preset conditions and combine them with the comprehensive features to obtain the predicted input features.
[0071] The pathogenesis of allergic diseases is characterized by the synergistic effect of environmental factors inducing and dynamic changes in symptoms. By extracting the interaction features between the secondary feature and the dynamic change feature, the association patterns between pollen concentration and the aggravation of rhinitis symptoms, and between extreme weather and asthma attacks, can be captured. The specific implementation method for extracting and screening the interaction features includes steps S51 to S53: S51: Use a gradient boosting tree to calculate the gain value for each interaction term between the second feature and the dynamically changing feature.
[0072] Interaction items are the second feature With dynamic change characteristics Interactive items, namely For example, the interaction terms include those between pollen concentration and the dynamic changes in VAS scores, and those between the duration of extreme weather and the dynamic changes in ACT scores. A gradient boosting tree is used to calculate the gain value of each interaction term; the formula for calculating the gain value is as follows: in, Represents the set of samples for the current node; This represents the interaction term between the second feature and the dynamically changing feature; Represents a node The Gini coefficient; This represents the weighted Gini coefficient of the child nodes after splitting by the interaction term.
[0073] S52: Sort the interaction items by gain value.
[0074] Sort all interactive items in descending order of gain value.
[0075] S53: Select the interaction items with the highest gain values (preset proportion) as interaction features, and combine them with the comprehensive features to obtain the predicted input features.
[0076] In this embodiment, the preset ratio is 20%, and the top 20% of interaction items in terms of gain value are selected as interaction features. In this embodiment, there are a total of 15 interaction features. The interaction features are concatenated with the comprehensive feature vector F to obtain the predicted input features. After concatenation, the feature dimension simultaneously includes both comprehensive features and interaction features. The model can simultaneously learn the influence of a single feature and the synergistic effect of the second feature and dynamically changing features.
[0077] S6: Input the predicted input features into the allergic disease risk prediction model and output the risk level.
[0078] The allergic disease risk prediction model is an ensemble learning model. The training of the ensemble learning model includes steps S61 to S64: S61: Train multiple decision trees using predicted input features and disease risk labels.
[0079] The sample dataset corresponding to the predicted input features is stratified and sampled in a 7:3 ratio, with 70% as the training set and 30% as the test set. The stratification is based on the risk label distribution to ensure that the proportions of low-risk, medium-risk, and high-risk samples are consistent between the training and test sets. 200 CART decision trees are constructed. During the construction of each decision tree, 80% of the features are randomly selected for splitting. The Gini coefficient is used as the splitting evaluation metric. The formula for calculating the Gini coefficient is: in, Indicates the number of risk levels. Represents a node The Middle The proportion of risk-class samples. The maximum depth of the decision tree is set to 15 layers, and the minimum number of samples per leaf node is set to 5.
[0080] S62: After each decision tree has been trained, calculate the importance score of each feature based on the gain value. Feature Importance Score The calculation formula is: in, Represents the set of internal nodes of a decision tree; Representation of features At the node The decrease in the Gini coefficient after splitting; Represents a node The number of samples; This represents the total sample size. The decrease in the Gini coefficient. The calculation formula is: in, This represents the two child nodes after the split; These represent the number of samples in the two child nodes, respectively. Represents a node The number of samples; Represents a node The Gini coefficient; These represent the Gini coefficients of the two child nodes, respectively.
[0081] S63: Update the weights of the dynamic features and the second feature in the next decision tree construction based on the gain value and the third adjustment coefficient.
[0082] The formula for calculating the adjustment amount is: in, This represents the third adjustment coefficient, in this embodiment. Representation of features The interaction gain (interactive feature) or single-feature gain (non-interactive feature). Updated weight values. The calculation formula is: in, Representation of features The initial weights; This represents the third adjustment coefficient; Representation of features The gain value. Through the above update mechanism, features with high gain values receive higher weights in subsequent decision tree construction.
[0083] S64: Construct the next decision tree with the updated weights, iterate until the ensemble learning model is obtained, integrate the prediction results of multiple decision trees, and output the risk level.
[0084] The updated weight values are used for feature selection in the next round of decision tree construction. Features with larger updated weight values have a higher probability of being selected during random feature extraction. Steps S61 to S63 are executed iteratively to train 200 decision trees, resulting in an ensemble learning model.
[0085] The predicted input features are input into the trained ensemble learning model, and a voting mechanism is used for ensemble integration: each decision tree outputs a risk level prediction, and the predictions of 200 decision trees are aggregated, with the risk level receiving the most votes being selected as the final output risk level. Risk levels include low risk, medium risk, and high risk. The prediction confidence level is also output. The calculation formula is: in, This represents the number of votes for the risk level that received the most votes; 200 represents the total number of decision trees. The confidence level ranges from 0.5 to 1.0, with a higher confidence value indicating stronger consistency in the predictions of the 200 decision trees for that risk level.
[0086] After predicting risk levels using an ensemble learning model, intervention recommendations are generated based on these risk levels. Specific implementation methods include: extracting risk levels and prediction confidence levels; obtaining the latest subjective symptom data of subjects, including ACT scores, VAS scores, POEM scores, and corresponding dynamic change characteristics; identifying core influencing features based on the feature importance scores of the ensemble learning model. Core influencing features are those with the highest feature importance scores, including pollen concentration, dynamic changes in VAS scores, dynamic changes in ACT scores, and the duration of extreme weather events; matching intervention recommendation templates from a clinical recommendation knowledge base based on risk level, disease type, and core influencing features to generate personalized intervention recommendations; and generating risk level change curves and key environmental feature change curves for subjects over the past 30 days, allowing subjects and medical personnel to intuitively grasp risk dynamics and influencing factors. The clinical recommendation knowledge base is built upon authoritative literature such as the guidelines for the diagnosis and treatment of allergic rhinitis, the guidelines for the prevention and treatment of bronchial asthma, and the guidelines for the diagnosis and treatment of atopic dermatitis.
[0087] For example, suppose a subject's current ACT score is 18, the baseline ACT score is 22, the dynamic change characteristic ΔS = -4, and the current pollen concentration is 150 grains / m³. 3 Based on the prediction of the ensemble learning model, the risk level is medium risk with a confidence level of 0.85. The core influencing features are pollen concentration (contribution 45%) and dynamic changes in ACT score (contribution 32%). Intervention recommendations were generated by matching from the clinical advice knowledge base: the current asthma is poorly controlled (ACT score 18), the risk level is medium risk, mainly affected by high pollen concentration. It is recommended to reduce outdoor activities and use control medication regularly.
[0088] Example 2 is an embodiment of the present invention, which provides a method for predicting the risk of allergic diseases. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through experiments.
[0089] The study used fully annotated data from 3,000 individuals at high risk of allergic diseases, covering all age groups from 3 to 70 years old, with children, adults, and the elderly accounting for 2:5:3 of the total. It encompassed mainstream allergy types, including allergic rhinitis (42%), bronchial asthma (31%), atopic dermatitis (18%), and allergic conjunctivitis (9%). The data were distributed across different high-incidence allergen regions in the north and south, with 58% occurring in pollen-prone areas in the north and 42% in mold-prone areas in the south. Data collection spanned a complete allergy year, including the two peak allergy seasons (March to May and September to October) and the off-peak season.
[0090] The experimental data includes objective physiological test data from hospitals, subjective symptom score data, and multi-scale environmental data. All data have undergone individual baseline annotation, quantification of dynamic changes in symptoms and signs, and disease risk labeling. The baseline data consists of the physiological symptom data collected from users for the first time, including initial values of 8 types of objective test indicators and initial values of three types of subjective scores: ACT, VAS, and POEM. The dynamic change is the difference ΔS between the current data and the baseline data, which is quantified according to the method in step S12 of this invention. The disease risk label includes three levels: low risk, medium risk, and high risk. Low risk corresponds to no onset or one mild symptom within the time window, medium risk corresponds to 2 to 3 onsets or mild symptoms affecting daily life, and high risk corresponds to 4 or more onsets or severe symptoms requiring medical attention or use of emergency medication. The labeling is based on dual-source verification and annotation of hospital clinical diagnosis records and users' actual reports of onset at home.
[0091] The data was stratified in a 7:2:1 ratio, with 2100 samples in the training set, 600 samples in the validation set, and 300 samples in the test set. The stratification was based on the risk label distribution to ensure that the ratio of low-risk, medium-risk, and high-risk samples in the training set, validation set, and test set was 4:3:3.
[0092] To verify the improved effect of the model in this invention, two control models, Model 1 and Model 2, were set up. Model 1 is a traditional random forest model, which directly concatenates raw physiological data with raw environmental data as input. It does not include a baseline comparison mechanism, dynamic feature weight calculation, interactive feature mining, or a dynamic weight adjustment mechanism. Model 2 is a combination model of conventional LSTM and traditional random forest. It uses traditional LSTM to extract temporal environmental features, which are then directly concatenated with physiological features before being input into the traditional random forest. It does not include a feature attention layer, dynamic feature weight calculation, interactive feature mining, or a dynamic weight adjustment mechanism.
[0093] The performance of each model was evaluated on the test set. The evaluation metrics included accuracy, precision, recall, F1 score, and high-risk sample recall. The experimental results are shown in Table 1.
[0094] Table 1 Comparison of Experimental Data
[0095] Experimental results show that the improved model of this invention outperforms control models 1 and 2 in five metrics: accuracy, precision, recall, F1 score, and recall of high-risk samples. By establishing an individual baseline comparison mechanism, the model can identify the dynamic trend of symptom changes relative to an individual's health status, rather than relying on a single test value compared to a uniform threshold, thus solving the technical problem that traditional methods cannot quantify the degree of symptom change relative to an individual's baseline. By calculating the fusion weights of dynamic change features, the model assigns higher weights to high-risk groups with rapidly deteriorating symptoms (large |ΔS| and poor S_base), while traditional methods use the same weights for all features, failing to highlight the specificity of symptom change features. By mining the interaction features between environmental features and symptom change features and dynamically adjusting feature weights, the model can capture the synergistic pattern of rapid symptom deterioration in environments with high pollen concentrations, while traditional random forests only learn the importance of a single feature and cannot reflect the synergistic pathogenesis mechanism of environmental-induced symptom deterioration.
[0096] Example 3 is an embodiment of the present invention, which provides an allergic disease risk prediction system, including: The data acquisition module is used to acquire the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data. The dynamic feature calculation module is used to compare the first physiological data at the reference time with the first physiological data at the current time to obtain dynamic change features; The feature extraction module is used to extract a first feature from the first physiological data at the current moment to obtain a first feature, and to extract a second feature from the first environmental data to obtain a second feature; The feature fusion module is used to perform differential weighting on the dynamic change features based on the amplitude value of the dynamic change features and the first physiological data at the reference time, and to fuse the weighted dynamic change features with the first feature and the second feature to obtain a comprehensive feature; The interactive feature processing module is used to extract interactive features from the second feature and the dynamic change feature, filter interactive features that meet preset conditions and combine them with the comprehensive feature to obtain the predicted input feature. The risk prediction module is used to input the predicted input features into the allergic disease risk prediction model and output the risk level.
[0097] This embodiment also provides an electronic device applicable to an allergic disease risk prediction method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the allergic disease risk prediction method proposed in the above embodiment.
[0098] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a method for predicting the risk of allergic diseases as proposed in the above embodiments.
[0099] The storage medium proposed in this embodiment and the method for predicting the risk of allergic diseases proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0100] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0101] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for predicting the risk of allergic diseases, characterized in that, include: Acquire the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data; The first physiological data at the reference time is compared with the first physiological data at the current time to obtain dynamic change characteristics; A first feature is obtained by performing a first feature extraction on the first physiological data at the current moment, and a second feature is obtained by performing a second feature extraction on the first environmental data; The dynamic change features are differentially weighted based on the amplitude value of the dynamic change features and the first physiological data at the reference time. The weighted dynamic change features are then fused with the first feature and the second feature to obtain a comprehensive feature. Interactive feature extraction is performed on the second feature and the dynamic change feature. Interactive features that meet preset conditions are selected and combined with the comprehensive feature to obtain the predicted input feature. The predicted input features are input into the allergic disease risk prediction model, which outputs the risk level.
2. The method for predicting the risk of allergic diseases as described in claim 1, characterized in that: The first physiological data at the reference time is the first physiological data collected from the subject for the first time, and is set as the baseline data; The dynamic change feature is the difference between the first physiological data at the current moment and the baseline data.
3. The method for predicting the risk of allergic diseases as described in claim 2, characterized in that: The differential weighting includes: weighting the amplitude values of the dynamic change characteristics according to a first adjustment coefficient to obtain a first weighting term; The first physiological data at the reference time is weighted according to the second adjustment coefficient to obtain the second weighting term; The first weighted term and the second weighted term are summed to obtain a sum value; the sum value is then subjected to activation function mapping to obtain the fusion weight coefficients. The dynamic change features are weighted according to the fusion weight coefficients to obtain the weighted dynamic change features.
4. The method for predicting the risk of allergic diseases as described in claim 3, characterized in that: The first physiological data includes objective test data and subjective symptom data; The first feature extraction includes: The covariance matrix is calculated from the objective detection data, and the covariance matrix is decomposed into eigenvalues. The principal components whose cumulative contribution rate reaches a preset threshold are selected to obtain the objective physiological feature vector. The subjective symptom data and the dynamic change features are combined to form a time-series feature sequence. The time-series feature sequence is then subjected to time-series smoothing to obtain a subjective physiological feature vector. The objective physiological feature vector and the subjective physiological feature vector are concatenated to obtain the first feature.
5. The method for predicting the risk of allergic diseases as described in claim 4, characterized in that: The second feature extraction includes: The first environmental data is input into a long short-term memory network, wherein a feature attention layer is provided between the input layer and the long short-term memory layer; The feature attention layer assigns attention coefficients to each environmental feature in the first environmental data to obtain a weighted environmental feature sequence. The temporal dependencies of the weighted environmental feature sequence are processed through the input gate, forget gate, and output gate of the long short-term memory network to output the second feature.
6. The method for predicting the risk of allergic diseases as described in claim 5, characterized in that: The extraction and filtering of the interaction features include: Gradient boosting trees are used to calculate the gain value for each interaction term between the second feature and the dynamically changing feature; Sort the interaction items according to the gain value; The interaction items with the highest gain values, representing a predetermined proportion, are selected as the interaction features.
7. The method for predicting the risk of allergic diseases as described in claim 6, characterized in that: The allergic disease risk prediction model is an ensemble learning model, and the training of the ensemble learning model includes: Multiple decision trees are trained using the predicted input features and disease risk labels; After each decision tree is trained, the weights of the dynamically changing feature and the second feature in the construction of the next decision tree are updated based on the gain value. The next decision tree is constructed with the updated weights, and the process is repeated iteratively until the ensemble learning model is obtained.
8. An allergic disease risk prediction system, employing the allergic disease risk prediction method as described in any one of claims 1 to 7, characterized in that, include: The data acquisition module is used to acquire the subject's first physiological data at the baseline time, the first physiological data at the current time, and the first environmental data. The dynamic feature calculation module is used to compare the first physiological data at the reference time with the first physiological data at the current time to obtain dynamic change features; The feature extraction module is used to extract a first feature from the first physiological data at the current moment to obtain a first feature, and to extract a second feature from the first environmental data to obtain a second feature; The feature fusion module is used to perform differential weighting on the dynamic change features based on the amplitude value of the dynamic change features and the first physiological data at the reference time, and to fuse the weighted dynamic change features with the first feature and the second feature to obtain a comprehensive feature; The interactive feature processing module is used to extract interactive features from the second feature and the dynamic change feature, filter interactive features that meet preset conditions and combine them with the comprehensive feature to obtain the predicted input feature. The risk prediction module is used to input the predicted input features into the allergic disease risk prediction model and output the risk level.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the allergic disease risk prediction method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for predicting the risk of allergic diseases according to any one of claims 1 to 7.