School infectious disease identification and early warning method based on big data and AI technology

By applying big data and AI technology on campus, we build random forests and autoregressive models to identify the causes of infectious diseases and predict the number of infections, solving the problems of lagging prevention and control measures and lack of effective risk assessment in traditional methods, and achieving rapid and accurate Infectious disease prevention and control and risk management.

CN119361176APending Publication Date: 2025-01-24广州市疾病预防控制中心(广州市卫生监督所) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411298310.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Traditional campus infectious disease identification and prevention and control methods cannot quickly and accurately identify and predict the potential risks and trends of infectious diseases, resulting in lagging prevention and control measures and lack of effective risk assessment and early warning mechanisms.

Method used

Using school -based and AI technology infectious disease identification and early warning methods, pre -processing case data is obtained, and random forest models and self -regression models are constructed to generate characteristic identification models and self -regression prediction models for identifying the cause and predictive infection infection Change the number of people and establish a risk assessment and early warning mechanism.

Benefits of technology

It has achieved rapid identification and effective prevention and control of infectious diseases, improved the timeliness and accuracy of prevention and control measures, established an effective risk assessment and early warning mechanism, and ensured the health and safety of teachers and students on campus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119361176A_ABST
    Figure CN119361176A_ABST
Patent Text Reader

Abstract

The invention discloses a school infectious disease identification and early warning method based on big data and an AI technology, and belongs to the technical field of intelligent prediction, and the method comprises the steps: obtaining case data, carrying out the preprocessing of the case data, and obtaining a preprocessing data set; constructing a random forest model, and training the random forest model through the preprocessed data set to obtain a feature recognition model; constructing an autoregression model, training the autoregression model through the time sequence data, and generating an autoregression prediction model; and performing early warning and prevention and control on sensing disease transmission based on results generated by the feature recognition model and the autoregression prediction model. According to the invention, the trained optimal random forest model is used to identify the cause of new data. Secondly, on the basis of the above model, an autoregression prediction model is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of intelligent prediction technology, and in particular relates to a school infectious disease identification and early warning method based on big data and AI technology. Background Art

[0002] Infectious diseases are a type of disease caused by various pathogens. They can spread between people, between people and animals, or between animals, and have a significant impact on society and the economy. Schools, as places of learning where people gather in large numbers, are more prone to large-scale outbreaks and rapid spread than other places. With the rapid advancement of science and technology, significant breakthroughs have been made in the fields of artificial intelligence and big data analysis, bringing new opportunities for campus infectious disease management. Intelligent identification and prevention and control technology can achieve rapid identification and effective prevention and control of infectious diseases through accurate data analysis and model prediction.

[0003] However, the traditional identification and prevention of infectious diseases on campus is limited to traditional manual records and empirical judgments, which cannot quickly and accurately identify and predict the potential risks and trends of infectious diseases and formulate corresponding prevention and control measures. This has led to a series of problems, such as the delayed implementation of prevention and control measures, the lack of effective risk assessment and early warning mechanisms, etc. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a school infectious disease identification and early warning method based on big data and AI technology to solve the problems existing in the above-mentioned prior art.

[0005] To achieve the above objectives, the present invention provides a school infectious disease identification and early warning method based on big data and AI technology, comprising:

[0006] Acquiring case data, and preprocessing the case data to obtain a preprocessed data set;

[0007] Constructing a random forest model, and training the random forest model using the preprocessed data set to obtain a feature recognition model;

[0008] Constructing an autoregressive model, training the autoregressive model through time series data, and generating an autoregressive prediction model;

[0009] Early warning and prevention and control of the spread of sensory diseases are carried out based on the results generated by the feature recognition model and the autoregressive prediction model.

[0010] Preferably, the process of acquiring case data, preprocessing the case data, and obtaining a preprocessed data set includes:

[0011] Acquire the case data, process missing values, process abnormal values, and remove duplicates in the case data in sequence to obtain processed data;

[0012] Performing data type conversion on the processed data to generate converted data;

[0013] Perform feature engineering processing on the converted data to obtain the preprocessed data set.

[0014] Preferably, the process of performing feature engineering processing on the conversion data to obtain the preprocessed data set includes:

[0015] Performing feature selection on the converted data to generate feature extraction data;

[0016] Based on the LabelEncoder pair, each classification label in the feature extraction data is mapped to a unique integer, and then the classification label features are converted into a binary vector through the one-hot encoding method to generate the preprocessed data.

[0017] Preferably, the classification labels of the feature extraction data include but are not limited to symptoms, other causes, whether there is sore throat, district, school category, grade, symptom date, and whether to seek medical treatment.

[0018] Preferably, the process of obtaining the feature recognition model includes:

[0019] Build a random forest model and initialize the random forest classifier;

[0020] The random forest model is trained by using the preprocessed data set until the model learns the mapping relationship from the input features to the target variables and then outputs the mapping relationship to obtain a training model;

[0021] Inputting the test set into the training model to generate prediction results for the test data;

[0022] The feature recognition model is generated by comparing the true label and the predicted label to calculate the prediction accuracy of the model and returning the model accuracy.

[0023] Preferably, the process of generating the feature recognition model further includes:

[0024] Define a random forest classifier and specify a random seed of 42;

[0025] defining a parameter grid comprising different parameter combinations of a random forest model;

[0026] Use grid search to construct a cross validation object;

[0027] Perform parameter search and cross-validation on the training data to obtain the best parameters and optimal model;

[0028] Construct a new Random Forest Classifier object using the best parameter combination and fit it to the training data;

[0029] The test set is predicted, the accuracy of the optimal model on the test set is calculated, and the feature recognition model is generated.

[0030] Preferably, the process of training the random forest model using the preprocessed data set further includes: dividing the preprocessed data set into a training set and a test set using a train_test_split function.

[0031] Preferably, the optimal parameters are: the number of decision trees is set to 300, the minimum number of samples for leaf nodes is set to 1, the minimum number of samples required for internal node re-division is set to 2, and the maximum depth of the tree is not limited.

[0032] Preferably, the process of constructing the autoregressive model and training the autoregressive model through time series data to generate the autoregressive prediction model includes:

[0033] Collect and organize time data, and verify the completeness and accuracy of the time data to generate a time data set;

[0034] Constructing an autoregressive model, and selecting a p-value of the autoregressive model by observing plots of the autocorrelation function and the partial autocorrelation function;

[0035] The parameters and constant term of the autoregressive model are estimated based on the maximum likelihood estimation method, and the autoregressive order is determined by the lags parameter;

[0036] An optimization model is constructed based on the parameters of the autoregressive model, the constant term and the autoregressive model, and the optimization model is trained using the time data set to obtain the autoregressive prediction model.

[0037] Preferably, the process of collecting and collating time data also includes: encoding the cause categories, mapping each unique cause to a unique number; aggregating the data by year, and calculating the total cause number for each year.

[0038] Compared with the prior art, the present invention has the following advantages and technical effects:

[0039] The present invention uses the trained optimal random forest model to identify the cause of new data. Secondly, based on the above model, the present invention constructs an autoregressive prediction model to predict the change in the number of infected people in the future. Then, based on the predicted number of infected people, a risk assessment and early warning mechanism is established, and a series of corresponding prevention and control measures are formulated for schools and individuals. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 A schematic diagram of a random forest model according to an embodiment of the present invention;

[0042] Figure 2 Schematic diagram of an autoregressive model according to an embodiment of the present invention;

[0043] Figure 3 This is a forecast chart of the number of people with upper respiratory tract infections in 2024 according to an embodiment of the present invention;

[0044] Figure 4 4 is an autocorrelation diagram of an embodiment of the present invention. DETAILED DESCRIPTION

[0045] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0046] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0047] Embodiment 1

[0048] This embodiment provides a school infectious disease identification and early warning method based on big data and AI technology, including:

[0049] Acquiring case data, and preprocessing the case data to obtain a preprocessed data set;

[0050] Constructing a random forest model, and training the random forest model using the preprocessed data set to obtain a feature recognition model;

[0051] Constructing an autoregressive model, training the autoregressive model through time series data, and generating an autoregressive prediction model;

[0052] Early warning and prevention and control of the spread of sensory diseases are carried out based on the results generated by the feature recognition model and the autoregressive prediction model.

[0053] Furthermore, the process of obtaining case data, preprocessing the case data, and obtaining a preprocessed data set includes:

[0054] Acquire the case data, process missing values, process abnormal values, and remove duplicates in the case data in sequence to obtain processed data;

[0055] Performing data type conversion on the processed data to generate converted data;

[0056] Perform feature engineering processing on the converted data to obtain the preprocessed data set.

[0057] Before conducting actual model research, data processing is an indispensable part. It helps to ensure the accuracy and completeness of the data and provide high-quality data support for subsequent model training. In view of the actual needs of this embodiment, the processing steps in the data preparation stage are listed as follows: Read data: Traverse the campus case data of a certain city from 2018 to 2023 and merge them into a new Excel file. Data cleaning and preprocessing: Check the data type of each column and process the data that does not meet the conditions, including processing missing values, processing outliers, removing duplicates, etc. For example, delete data whose absence start time is not between 2018 and 2023; fill the blank value of the cause with "none" and other operations. The data of the first 4 rows after processing are shown in Table 1. Data type conversion: Convert the data to the format required by the model to ensure the consistency and availability of the data.

[0058] Table 1

[0059]

[0060] Furthermore, the process of performing feature engineering processing on the converted data to obtain the preprocessed data set includes:

[0061] Performing feature selection on the converted data to generate feature extraction data;

[0062] Based on the LabelEncoder pair, each classification label in the feature extraction data is mapped to a unique integer, and then the classification label features are converted into a binary vector through the one-hot encoding method to generate the preprocessed data.

[0063] In the application model research, feature engineering is a crucial link, which directly affects the performance and prediction accuracy of the model. Effective feature engineering can help this embodiment optimize the training process of the model, improve the generalization ability of the model, and accelerate the convergence speed of the model. Among them, feature selection and preprocessing are the core steps in feature engineering. Feature selection aims to determine which features are most critical for predicting the target variable. Feature preprocessing focuses on how to adjust the scale of the features and eliminate the scale differences between different features so that the model can learn and generalize better.

[0064] Feature selection refers to selecting a part of the original dimensions directly to participate in the calculation and modeling process according to certain rules and experience, replacing all features with the selected features, without changing the original features or generating new feature values. It can meet the needs of subsequent data processing and modeling, and retain the original business meaning of the dimension for business understanding and application. For business analytical applications, the comprehensibility and usability of the model are often limited to technical indicators such as the accuracy and efficiency of the model itself. For example, the feature rules obtained by the decision tree can be used as the basic conditions for selecting user samples, and these feature rules are generated based on the input dimensions. In this embodiment, in order to identify the target variable "cause", "symptoms", "other causes", "whether sore throat", "district", "school category", "grade", "symptom date" and "whether to see a doctor" are selected. In order to more intuitively show the relationship between these features and the target variable.

[0065] Feature encoding is an important step in data preprocessing for machine learning, especially when the dataset contains categorical features. Categorical features are usually in text form, while most machine learning algorithms require numeric inputs. Therefore, feature encoding is needed to convert these categorical features into numeric data. Common encoding methods include LabelEncoder and One-HotEncoding. LabelEncoder implements encoding by assigning a unique integer to each categorical value, which is particularly effective when dealing with labels or target variables. Through the mapping of LabelEncoder, the model can more easily capture the potential relationship between different categories and make predictions based on it. LabelEncoder can work well in some specific scenarios, such as when using algorithms such as decision trees or random forests. These algorithms do not rely on distance metrics, so even if LabelEncoder is used to convert categorical variables into integers, it will not introduce unnecessary assumptions or misleading. One-HotEncoding is a method that converts categorical features into binary vectors. Each categorical value is converted into a vector containing only a single 1 and multiple 0s, where the position of 1 corresponds to the index of the categorical value in all possible categories. This method can retain the complete information in the categorical data and avoid introducing unnecessary order assumptions, which is particularly suitable for features with multiple categories. Therefore, this embodiment first uses LabelEncoder to encode the categorical features and maps each categorical label to a unique integer. Then, using unique hot encoding, the categorical features are converted into binary vectors, thereby avoiding potential order problems that LabelEncoder may introduce, while retaining all the information of the original categorical features, laying a solid foundation for subsequent data analysis and modeling.

[0066] In machine learning projects, the division of data sets is also a crucial step, which is directly related to the effect of model training and the accuracy of evaluation. In order to effectively carry out model training and performance evaluation, the data set is usually divided into a training set and a test set. Among them, the training set is used for training and learning of the model, while the test set is used to evaluate the performance of the model. This embodiment uses the train_test_split function to divide the data set into a training set and a test set for model training and evaluation, and ensures that the test set accounts for 20% of the total data set. After the division is completed, the size of the training set and the test set will be output so that there is a clear understanding of the scale of the data set, and then better model training and performance evaluation can be carried out.

[0067] Furthermore, the process of obtaining the feature recognition model includes:

[0068] Build a random forest model and initialize the random forest classifier;

[0069] The random forest model is trained by using the preprocessed data set until the model learns the mapping relationship from the input features to the target variables and then outputs the mapping relationship to obtain a training model;

[0070] Inputting the test set into the training model to generate prediction results for the test data;

[0071] The feature recognition model is generated by comparing the true label and the predicted label to calculate the prediction accuracy of the model and returning the model accuracy.

[0072] Random forest is an innovative and efficient machine learning algorithm proposed by Breiman. As the name implies, random forest constructs a "forest" composed of many decision trees in a random way. In this process, the output categories of the classifier are the majority of individual trees. In the process of constructing each decision tree, the random forest algorithm adopts double randomness, that is, randomly selecting samples as training data in proportion, randomly selecting features to split the tree, and then training. Therefore, such randomness enhances the generalization ability of the model and effectively avoids overfitting. When faced with a new output sample, each decision tree in the forest will make an independent classification prediction for it, that is, N trees have N classification effects. Since different decision trees introduce randomness in the construction process, the correlation between them is relatively weak, which further improves the robustness of the model. Random forest will discriminate and predict each decision tree, so as to obtain and summarize the categories finally selected by different decision trees, and comprehensively analyze the prediction results of all decision trees to determine the final classification category by majority voting. Its principle is as follows Figure 1 shown.

[0073] In order to ensure the generalization ability of the model, random forest generally follows data randomness and feature randomness. It usually matches multiple decision tree classifiers on different subsamples and uses averaging to improve prediction accuracy and control overfitting.

[0074] Model process: Initialization -> Selection -> Training -> Prediction -> Comparison -> Output The specific steps are as follows:

[0075] Step 1: Initialize the random forest classifier: Import the random forest classifier and create an instance through RandomForestClassifier();

[0076] Step 2: Train the model: Use the training dataset X_train and the corresponding target variable y_train to train the random forest classifier, and let the model learn the mapping relationship from input features to target variables by calling the fit method of the model instance;

[0077] Step 3: Make predictions: After the model training is completed, the model instance’s predict method is called and the test set X_test is passed in to obtain the model’s prediction results for the test data.

[0078] Step 4: Calculate and return the model accuracy: Calculate the prediction accuracy of the model by comparing the true label y_test and the predicted label y_pred and return the model accuracy;

[0079] Step 5: Use the trained model to make predictions: The new data is a DataFrame containing features such as symptoms and whether there is sore throat. Finally, the predicted cause is output.

[0080] According to the described model process, the random forest classifier completes the entire process from initialization to prediction output. The model first learns the mapping relationship between the input features and the target variable through the training data set, then verifies its performance on the test set, and finally uses it to predict new data. Finally, the model outputs the result, and its accuracy reaches 0.92. This shows that the model has good performance in identifying the cause of disease, and in most cases can accurately classify unknown samples according to the input features. For data samples with specific input features (such as symptoms of "fever", whether sore throat is "yes", the district is "Baiyun District", and the symptom date is "2024-04-24 morning", etc.), the model can use the trained model to make accurate predictions and output the prediction results of "upper respiratory tract infection". Based on this prediction, students can take corresponding preventive measures in time. Due to the high accuracy of the model, this embodiment can be considered to have a high degree of credibility. However, in practical applications, it is still necessary to pay attention to the influence of various potential factors, such as data noise, feature selection, etc. Therefore, when using models for prediction, in addition to relying on the results of the model output, the prediction results should be carefully analyzed and judged in combination with actual conditions and medical expertise to ensure the accuracy and reliability of the predictions.

[0081] Furthermore, the process of generating the feature recognition model also includes:

[0082] Define a random forest classifier and specify a random seed of 42;

[0083] defining a parameter grid comprising different parameter combinations of a random forest model;

[0084] Use grid search to construct a cross validation object;

[0085] Perform parameter search and cross-validation on the training data to obtain the best parameters and optimal model;

[0086] Construct a new Random Forest Classifier object using the best parameter combination and fit it to the training data;

[0087] The test set is predicted, the accuracy of the optimal model on the test set is calculated, and the feature recognition model is generated.

[0088] Model optimization is a crucial step in model research, which involves adjusting the parameters of the model to find the best model performance. For the random forest classifier, the number of decision trees (n_estimators) is a key parameter, which can directly affect the complexity and generalization ability of the model. Therefore, this embodiment performs an optimal parameter search for the algorithm. Its specific parameters and description are shown in Table 2.

[0089] Table 2

[0090]

[0091] The specific steps are as follows:

[0092] Step 1: Define a random forest classifier and specify the random seed as 42;

[0093] Step 2: Define the parameter grid (param_grid), including different parameter combinations of the random forest model. Among them, n_estimators is the number of decision trees, max_depth is the maximum depth of the tree; min_samples_split is the minimum number of samples required for internal node re-division, and min_samples_leaf is the minimum number of samples for leaf nodes;

[0094] Step 3: Use grid search (GridSearchCV) to build a cross-validation object, where the estimator parameter specifies the basic model, param_grid specifies the parameter grid, and cv=5 specifies the cross-validation fold as 5, that is, the data set is divided into 5 parts, 4 of which are used for training each time, and the remaining 1 is used for validation, and finally the average performance evaluation result is obtained;

[0095] Step 4: Perform parameter search and cross-validation on training data;

[0096] Step 5: Get the best parameters (best_params) and the best model (best_setimator);

[0097] Step 6: Construct a new random forest classifier object using the best parameter combination and fit it to the training data;

[0098] Step 7: Make predictions on the test set and calculate the accuracy of the optimal model on the test set.

[0099] Step 8: Use the trained model to make predictions: The new data is a DataFrame containing features such as symptoms and whether there is sore throat. Finally, the predicted cause is output.

[0100] According to the described steps, grid search and cross-validation techniques can be used to find the best parameters of the model. The optimized parameter combination is: the number of decision trees is set to 300, the minimum number of leaf node samples is set to 1, the minimum number of samples required for internal node re-division is set to 2, and the maximum depth of the tree is not limited, but the model is allowed to make decisions automatically based on the data characteristics. Next, using these parameters, an optimal model is constructed with an accuracy of 0.92. When the trained optimal model is used to predict new data, the model can effectively determine the possible cause based on the symptoms in the new data, such as whether there is sore throat, etc. For example, after inputting the symptom as "fever", whether there is sore throat as "yes", the district to which it belongs is "Baiyun District", and the symptom date is "2024-04-24 morning", the prediction result output by the model is "upper respiratory tract infection". Since the accuracy of the model is relatively high, this embodiment can be considered that this prediction result has a high degree of credibility. However, the prediction ability of any machine learning model is not absolute. In practical applications, some special cases or outliers may be encountered, resulting in inaccurate prediction results. Therefore, when using the model for prediction, it is necessary to combine the actual situation and medical knowledge to conduct a comprehensive analysis and judgment of the prediction results. At the same time, new data should be continuously collected to continuously optimize and update the model to improve its prediction performance and stability.

[0101] The autoregressive model (AR model) is a statistical method widely used in time series analysis. It can predict future values ​​through the stability and autocorrelation principles of data, that is, it associates the dependent variable with its own historical values, thereby revealing the dynamic laws of time series data. The previous data points in the autoregressive model are called the lag terms or autoregressive terms of the model. By estimating the coefficients of these lag terms and combining them with known historical data, the future values ​​of the time series can be predicted. Its principle is as follows Figure 2 shown.

[0102] Model process: data preparation -> selection -> parameter estimation -> model fitting -> prediction -> diagnosis

[0103] Furthermore, the process of constructing an autoregressive model, training the autoregressive model through time series data, and generating an autoregressive prediction model includes:

[0104] Collect and organize time data, and verify the completeness and accuracy of the time data to generate a time data set;

[0105] Constructing an autoregressive model, and selecting a p-value of the autoregressive model by observing plots of the autocorrelation function and the partial autocorrelation function;

[0106] The parameters and constant term of the autoregressive model are estimated based on the maximum likelihood estimation method, and the autoregressive order is determined by the lags parameter;

[0107] An optimization model is constructed based on the parameters of the autoregressive model, the constant term and the autoregressive model, and the optimization model is trained using the time data set to obtain the autoregressive prediction model.

[0108] The details are as follows:

[0109] Step 1: Data preparation: Collect and organize time series data to ensure data integrity and accuracy. For example, encode the cause category and map each unique cause to a unique number; aggregate the data by year and calculate the total cause number for each year to reveal the changing trend of the cause over time.

[0110] Step 2: Selection of model order p: Create an autoregressive model and select an appropriate p value by observing the graphs of the autocorrelation function (ACF) and partial autocorrelation function (PACF). ACF shows the correlation between the data and its own past values, while PACF shows the direct correlation between the data and its own past values.

[0111] Step 3: Parameter estimation: Use maximum likelihood estimation or other estimation methods to estimate the parameters φ1, φ2, …, φp and possible constant terms c in the model. The autoregressive order is determined by specifying the lags parameter, that is, how many historical values ​​the model will consider to predict future values.

[0112] Step 4: Model fitting and prediction: Use the estimated parameters to fit the AR model, and apply the model to predict the number of upper respiratory tract infections in 2024.

[0113] Step 5: Model diagnosis: Check whether the residual sequence of the model meets the white noise assumption, that is, the residuals should be independent of each other and follow a normal distribution, so as to ensure the quality of the model.

[0114] According to the described steps and code analysis, the data has been coded and aggregated to form a sequence of the number of upper respiratory tract infections from 2018 to 2024. This continuous data sequence not only reveals the changing trend of the cause over time, but also the data points are continuous and without obvious abnormalities, ensuring the integrity and accuracy of the data.

[0115] The autoregressive model predicts that the number of upper respiratory tract infections in 2024 will be 911. This prediction provides a basis for subsequent risk assessment. Figure 3, it can be found that the number of upper respiratory tract infections reached a peak in 2021, and then dropped sharply in 2022, reaching its lowest point. In 2023 and 2024, the number of people gradually increased. This obvious fluctuation and trend change reflects that upper respiratory tract infections may be closely related to external factors such as climate and epidemic prevention measures. Figure 4 It can be seen that as the lag order increases, the autocorrelation coefficient shows a trend of gradual attenuation, but it does not completely return to zero. This shows that there is indeed a certain degree of autocorrelation between the data series, that is, the number of cases in the past has a certain impact on the number of cases in the future.

[0116] This embodiment defines a risk assessment and early warning mechanism based on the number of upper respiratory tract infections predicted in 2024 in the autoregressive model. If the predicted result is greater than 1400, a "serious risk warning" is issued; if the predicted result is greater than 1000 and less than or equal to 1400, a "relatively serious risk warning" is issued; if the predicted result is greater than 300 and less than or equal to 1000, a "medium risk warning" is issued; if the predicted result is other, it prompts "minor risk" and outputs the corresponding warning information. In this way, the risk level of the number of upper respiratory tract infections can be assessed in a timely and accurate manner, and corresponding prevention and control measures can be taken to ensure the health and safety of teachers and students on campus. At the same time, it also reminds all teachers and students in the school to remain vigilant at all times and jointly respond to possible epidemic challenges. Risk situation of upper respiratory tract infection in 2024.

[0117] The above are only preferred specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A school infectious disease identification and early warning method based on big data and AI technology, characterized in that: The following steps are involved: Acquiring case data, and preprocessing the case data to obtain a preprocessed data set; Constructing a random forest model, and training the random forest model using the preprocessed data set to obtain a feature recognition model; Constructing an autoregressive model, training the autoregressive model through time series data, and generating an autoregressive prediction model; Early warning and prevention and control of the spread of sensory diseases are carried out based on the results generated by the feature recognition model and the autoregressive prediction model.

2. The school infectious disease identification and early warning method based on big data and AI technology according to claim 1 is characterized in that: The process of acquiring case data, preprocessing the case data, and obtaining a preprocessed data set includes: Acquire the case data, process missing values, process abnormal values, and remove duplicates in the case data in sequence to obtain processed data; Performing data type conversion on the processed data to generate converted data; Perform feature engineering processing on the converted data to obtain the preprocessed data set.

3. The school infectious disease identification and early warning method based on big data and AI technology according to claim 2 is characterized in that: The process of performing feature engineering processing on the converted data to obtain the preprocessed data set includes: Performing feature selection on the converted data to generate feature extraction data; Based on the LabelEncoder pair, each classification label in the feature extraction data is mapped to a unique integer, and then the classification label features are converted into a binary vector through the one-hot encoding method to generate the preprocessed data.

4. The school infectious disease identification and early warning method based on big data and AI technology according to claim 3 is characterized in that: The classification labels of the feature extraction data include, but are not limited to, symptoms, other causes, whether there is sore throat, district, school category, grade, symptom date, and whether to seek medical treatment.

5. The school infectious disease identification and early warning method based on big data and AI technology according to claim 1 is characterized in that: The process of obtaining the feature recognition model includes: Build a random forest model and initialize the random forest classifier; The random forest model is trained by using the preprocessed data set until the model learns the mapping relationship from the input features to the target variables and then outputs the mapping relationship to obtain a training model; Inputting the test set into the training model to generate prediction results for the test data; The feature recognition model is generated by comparing the true label and the predicted label to calculate the prediction accuracy of the model and returning the model accuracy.

6. The school infectious disease identification and early warning method based on big data and AI technology according to claim 5 is characterized in that: The process of generating the feature recognition model further includes: Define a random forest classifier and specify a random seed of 42; defining a parameter grid comprising different parameter combinations of a random forest model; Use grid search to construct a cross validation object; Perform parameter search and cross-validation on the training data to obtain the best parameters and optimal model; Construct a new Random Forest Classifier object using the best parameter combination and fit it to the training data; The test set is predicted, the accuracy of the optimal model on the test set is calculated, and the feature recognition model is generated.

7. The school infectious disease identification and early warning method based on big data and AI technology according to claim 6 is characterized in that: The process of training the random forest model using the preprocessed data set also includes: dividing the preprocessed data set into a training set and a test set using a train_test_split function.

8. The school infectious disease identification and early warning method based on big data and AI technology according to claim 6 is characterized in that: The optimal parameters are: the number of decision trees is set to 300, the minimum number of samples for leaf nodes is set to 1, the minimum number of samples required for internal node re-division is set to 2, and the maximum depth of the tree is not limited.

9. The school infectious disease identification and early warning method based on big data and AI technology according to claim 1 is characterized in that: The process of constructing an autoregressive model, training the autoregressive model through time series data, and generating an autoregressive prediction model includes: Collect and organize time data, and verify the completeness and accuracy of the time data to generate a time data set; Constructing an autoregressive model, and selecting a p-value of the autoregressive model by observing plots of the autocorrelation function and the partial autocorrelation function; The parameters and constant term of the autoregressive model are estimated based on the maximum likelihood estimation method, and the autoregressive order is determined by the lags parameter; An optimization model is constructed based on the parameters of the autoregressive model, the constant term and the autoregressive model, and the optimization model is trained using the time data set to obtain the autoregressive prediction model.

10. The school infectious disease identification and early warning method based on big data and AI technology according to claim 9 is characterized in that: The process of collecting and organizing the temporal data also includes: coding the cause categories, mapping each unique cause to a unique number; aggregating the data by year, and calculating the total cause number for each year.