A diabetes risk assessment method based on time series and related equipment

By constructing a diabetes risk assessment model with frequency domain attention enhancement mechanism and MLP-Mixer structure, the problem of insufficient prediction accuracy and generalization ability of diabetes risk assessment methods in the prior art is solved, and more accurate diabetes risk prediction and personality are achieved Health management.

CN118553426BActive Publication Date: 2024-11-26SHENZHEN UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411009703.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-26
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

The prediction accuracy of diabetes risk assessment methods in the prior art is not high enough, the generalization ability is not strong, and the ability to dynamic monitoring and evaluation makes it difficult to maintain effectiveness in different populations and data sets.

Method used

Using a time series-based evaluation method, an initial model including frequency domain attention enhancement mechanism and MLP-Mixer structure was constructed. By training the time series data of diabetic patients, seasonal and trend characteristics were extracted, and multi-scale sequence perception and The time projection module generates a diabetes risk prediction model, and performs dynamic monitoring and personalized health management.

Benefits of technology

It improves the accuracy and generalization ability of diabetes risk assessment, can identify the subtle relationship between blood sugar fluctuations and other physiological parameters, provides dynamic risk prediction and personalized health management strategies, and enhances the practical application scope and timeliness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118553426B_ABST
    Figure CN118553426B_ABST
Patent Text Reader

Abstract

The present invention discloses a diabetes risk assessment method based on time series and related equipment. The method comprises: constructing an initial model, the initial model comprises a first sub-model and a second sub-model, the first sub-model comprises a frequency domain attention enhancement mechanism, and the second sub-model comprises an MLP-Mixer structure; obtaining an initial data set, the initial data set is a time series data set of multiple diabetic patients; training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model; obtaining target data, predicting the target data based on the target prediction model, and obtaining a diabetes risk prediction result for the target patient. The diabetes risk assessment method based on time series provided by the present invention can more accurately predict the diabetes risk of patients by integrating frequency domain attention and MLP-Mixer structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer-aided diagnosis, and in particular to a diabetes risk assessment method based on time series and related equipment. Background Art

[0002] With the development of social economy, people's living standards are constantly improving, and the incidence of chronic diseases such as diabetes is rising. High blood sugar can damage blood vessel walls and increase the risk of cardiovascular diseases such as coronary heart disease, myocardial infarction, and stroke. Long-term high blood sugar levels can also damage the nervous system, leading to symptoms such as paresthesia, pain, and numbness, and in severe cases, can lead to limb gangrene. Furthermore, diabetes may also lead to kidney disease, eye disease, foot disease, or other complications. Therefore, risk prediction for diabetes is particularly important.

[0003] In the existing technology, as machine learning and deep learning are widely used in predicting diabetes, feature screening methods based on big data and integrating multiple indicators are also slowly emerging, providing standards for early warning of the disease and accurate staging and classification of the disease, and to a large extent providing a basis for auxiliary diagnosis for clinicians.

[0004] However, existing machine methods for predicting diabetes risk have problems such as low prediction accuracy and weak generalization ability.

[0005] Therefore, the prior art still needs to be improved and enhanced. Summary of the invention

[0006] In view of the above-mentioned defects of the prior art, a diabetes risk assessment method and related equipment based on time series are provided, aiming to solve the problems of insufficient prediction accuracy and insufficient generalization ability in predicting diabetes risk level in the prior art.

[0007] A first aspect of the present invention provides a diabetes risk assessment method based on time series, comprising:

[0008] Constructing an initial model, the initial model comprising a first sub-model and a second sub-model, the first sub-model comprising a frequency domain attention enhancement mechanism, and the second sub-model comprising an MLP-Mixer structure;

[0009] Acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients;

[0010] Training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model;

[0011] Target data is acquired, and the target data is predicted based on the target prediction model to obtain a diabetes risk prediction result of the target patient, wherein the target data is diabetes-related data of the target patient.

[0012] In one implementation, the first sub-model includes a lightweight multivariate data separation module, a seasonal data processing module, a trend data processing module, and an output module;

[0013] The lightweight multivariate data separation module is used to perform hierarchical decomposition of the data to obtain seasonal time series data and trend time series data;

[0014] The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism;

[0015] The trend data processing module is used to perform normalization processing on the trend time series data to obtain the trend prediction result of the trend time series data;

[0016] The output module is used to output a first prediction result based on the seasonal prediction result and the trend prediction result.

[0017] In one implementation, the seasonal data processing module includes:

[0018] A data cutting module, the data cutting module is used to cut the seasonal data into a plurality of target small blocks, and embed each of the target small blocks into a corresponding target vector;

[0019] A wavelet attention module is used to decompose and reconstruct the target small block to extract wavelet attention features.

[0020] In one implementation, the second sub-model includes a multi-scale sequence perception module, a mixing module and a time projection module:

[0021] The multi-scale sequence perception module is used to input data features into the frequency domain for filtering and extraction;

[0022] The mixing module includes a time mixing module and a feature mixing module, which are used to extract data features, the time mixing module shares operations on all features, and the feature mixing module shares operations on all time steps;

[0023] The time projection module is used to convert the features extracted by the mixing module into predicted time series values.

[0024] In one implementation, the training of the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model includes:

[0025] Preprocessing the initial data to obtain a target training set and a target support set;

[0026] Based on the target training set, the first sub-model and the second sub-model are trained respectively by using a gradient descent method and an Adam optimizer method;

[0027] Based on the target support set, cross-validate and adjust hyperparameters of the trained first sub-model and the second sub-model to obtain a first target sub-model and a second target sub-model;

[0028] The output module of the first target sub-model is combined with the input module of the second target sub-model to obtain the target prediction model.

[0029] In one implementation, predicting the target data based on the target prediction model to obtain a diabetes risk prediction result of a target patient includes:

[0030] Inputting the target data into the encoder of the first sub-model for feature encoding to obtain a first feature;

[0031] Processing the first feature by a frequency domain attention enhancement mechanism in the first sub-model to obtain a second feature;

[0032] Inputting the feature into the second sub-model to perform mixed extraction of time and feature to obtain the target feature;

[0033] The diabetes risk level of the target patient is assessed based on the target feature.

[0034] In one implementation, after evaluating the diabetes risk level of the target patient based on the target feature, the method further includes:

[0035] generating a risk assessment report and a health management strategy based on the diabetes risk level of the target patient;

[0036] Dynamically monitor the real-time physiological data of the target patient and re-predict the diabetes risk level of the target patient based on the real-time physiological data to obtain an updated risk level, so as to perform personalized health management for the target patient based on the updated risk level.

[0037] A second aspect of the present invention provides a diabetes risk assessment device based on time series, comprising:

[0038] A model building module, used to build an initial model, wherein the initial model includes a first sub-model and a second sub-model, wherein the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure;

[0039] A data set acquisition module, used to acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients;

[0040] A training module, used for training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model;

[0041] The prediction module is used to obtain target data, predict the target data based on the target prediction model, and obtain the diabetes risk prediction result of the target patient, wherein the target data is diabetes-related data of the target patient.

[0042] The third aspect of the present invention provides a terminal, comprising: a processor, a storage medium communicatively connected to the processor, the storage medium being suitable for storing a plurality of instructions, and the processor being suitable for calling the instructions in the storage medium to execute the steps of implementing any of the above-mentioned time series-based diabetes risk assessment methods.

[0043] A fourth aspect of the present invention provides a storage medium, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any of the above-mentioned time series-based diabetes risk assessment methods.

[0044] Beneficial effects: Compared with the prior art, the present invention provides a diabetes risk assessment method based on time series and related equipment. In the diabetes risk assessment method based on time series provided by the present invention, when conducting diabetes risk assessment on a target patient, an initial model including a first sub-model and a second sub-model is constructed, wherein the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure, and then an initial data set is obtained, the initial data set is a time series data set of multiple diabetic patients, the first sub-model and the second sub-model are trained based on the initial data set to obtain a target prediction model, and finally, diabetes-related data of the target patient is obtained, and the diabetes-related data of the target patient is predicted based on the target prediction model to obtain a diabetes risk prediction result for the target patient. The diabetes risk assessment method based on time series provided by the present invention can more accurately process complex physiological and behavioral data related to diabetes by integrating frequency domain attention and MLP-Mixer structure, and identify the subtle relationship between blood sugar fluctuations and other physiological parameters of the target patient to obtain accurate diabetes risk prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A flowchart of an embodiment of a diabetes risk assessment method based on time series provided by the present invention;

[0046] Figure 2 A structural diagram of the first sub-model in an embodiment of the diabetes risk assessment method based on time series provided by the present invention;

[0047] Figure 3 A structural diagram of the second sub-model in an embodiment of the diabetes risk assessment method based on time series provided by the present invention;

[0048] Figure 4 A schematic diagram of the structure of an embodiment of a diabetes risk assessment device based on time series provided by the present invention;

[0049] Figure 5 A structural principle diagram of an embodiment of a terminal provided by the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and effect of the present invention clearer and more specific, the present invention is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0051] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0052] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.

[0053] The time series-based diabetes risk assessment method provided by the present invention can be applied to a terminal with computing capabilities, and the terminal can execute the time series-based diabetes risk assessment method provided by the present invention to detect and locate the target position in the image to be processed.

[0054] Embodiment 1

[0055] At present, with the development of social economy, people's living standards are constantly improving, and the incidence of chronic diseases such as diabetes is constantly rising. High blood sugar can damage blood vessel walls and increase the risk of cardiovascular diseases such as coronary heart disease, myocardial infarction, and stroke. Long-term high blood sugar levels can also damage the nervous system, leading to symptoms such as paresthesia, pain, and numbness, and in severe cases may lead to limb gangrene. Furthermore, diabetes may also lead to kidney disease, eye disease, foot disease or other complications. Therefore, risk prediction for diabetes is particularly important.

[0056] In the existing technology, as machine learning and deep learning are widely used in predicting diabetes, feature screening methods based on big data and integrating multiple indicators are also slowly emerging, providing standards for early warning of the disease and accurate staging and classification of the disease, and to a large extent providing a basis for auxiliary diagnosis for clinicians.

[0057] However, existing diabetes risk assessment methods have the following main defects:

[0058] Single information extraction: Current methods rely too much on traditional data features, such as blood sugar levels, weight, age, etc., and rarely involve more complex or indirect health indicators, such as patients' eating habits, mental health status, etc.;

[0059] Low prediction accuracy: Despite the use of machine learning and deep learning technologies, these models often require a large amount of data support and are very sensitive to the quality and completeness of the data. Once the data is biased or incomplete, it will affect the accuracy of the prediction;

[0060] Poor generalization ability: Existing diabetes risk assessment models work well on specific populations or data sets, but when applied to different populations or more heterogeneous data sets, their performance is often greatly reduced, which limits the practical application scope of the model;

[0061] Lack of dynamic monitoring and evaluation capabilities: Most existing models are based on one-time evaluations of static data, and few models are able to achieve dynamic tracking and real-time updates of patient status, which to some extent weakens the timeliness of prevention and intervention.

[0062] In view of the above-mentioned defects, this embodiment provides a diabetes risk assessment method based on time series, such as Figure 1 As shown, the diabetes risk assessment method based on time series provided in this embodiment includes the following steps:

[0063] S100, constructing an initial model, wherein the initial model includes a first sub-model and a second sub-model, wherein the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure.

[0064] Specifically, this embodiment extracts time series data of diabetic patients, and based on the non-stationarity, high dimensionality, dynamic change characteristics and potential nonlinear relationships of the time series data, proposes a time series-based diabetes risk assessment method, and constructs the initial model including the first sub-model and the second sub-model to train the model to obtain the target prediction model.

[0065] Specifically, the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure. MLP-Mixer is a visual network architecture based entirely on a multi-layer perceptron (MLP), which aims to simplify model complexity and achieve high-performance image classification by abandoning traditional convolution and self-attention mechanisms.

[0066] Wherein, the first sub-model includes a lightweight multivariate data separation module, a seasonal data processing module, a trend data processing module and an output module;

[0067] The lightweight multivariate data separation module is used to perform hierarchical decomposition of the data to obtain seasonal time series data and trend time series data;

[0068] The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism;

[0069] The trend data processing module is used to perform normalization processing on the trend time series data to obtain the trend prediction result of the trend time series data;

[0070] The output module is used to output a first prediction result based on the seasonal prediction result and the trend prediction result.

[0071] The seasonal data processing module includes:

[0072] A data cutting module, the data cutting module is used to cut the seasonal data into a plurality of target small blocks, and embed each of the target small blocks into a corresponding target vector;

[0073] A wavelet attention module is used to decompose and reconstruct the target small block to extract wavelet attention features.

[0074] Specifically, in this embodiment, the first sub-model is STSegNet, which is a deep convolutional encoder-decoder architecture network model designed for image semantic segmentation. It adopts an encoder-decoder framework. The encoder-decoder architecture can effectively process time series data. The encoder part is responsible for data compression and feature extraction, while the decoder converts these features into prediction results.

[0075] Reference Figure 2 , the first sub-model includes an input module, the lightweight multivariate data separation module, the seasonal data processing module, the trend data processing module and the output module. It can be seen that the input module is used to receive data and then pass the data to the lightweight multivariate data separation module. The lightweight multivariate data separation module is used to hierarchically decompose the data into seasonal time series data and trend time series data. This decomposition helps the model to handle periodic and long-term change trends respectively. The lightweight multivariate data separation module uses STL decomposition and PatchEmbed technology to achieve effective extraction and separation of multiple variables in time series data, thereby improving the dimension and accuracy of data processing. PatchEmbed is a technology in computer vision that divides images into small blocks and converts them into fixed-dimensional vectors. The seasonal time series data is input into the seasonal data processing module, and the trend time series data is input into the trend data processing module.

[0076] The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism. The seasonal data processing module includes: a data cutting module, which is used to cut the seasonal data into multiple target small blocks and embed each of the target small blocks into a corresponding target vector; a wavelet attention module, which is used to decompose and reconstruct the target small blocks to extract wavelet attention features. Specifically, refer to Figure 2 The data cutting module will first perform Patch Embedding. Patch Embedding is a technology in computer vision that divides images into small blocks and converts them into fixed-dimensional vectors. It is used to divide time series signals into small blocks, each of which is embedded in a vector of fixed length. Then the Wavelets Attention mechanism is used to process these small blocks. Wavelet Attention combines wavelet transform and attention mechanism to better capture local and global features in time series. Specifically, refer to Figure 3 , Figure 3The figure is a schematic diagram of the wavelet attention module. It can be seen that the first sub-model includes a frequency domain attention enhancement mechanism, which is based on the wavelet attention module and takes discrete wavelet transform as the core. It replaces the traditional multi-head attention mechanism and converts time series data from time domain to frequency domain for processing. By decomposing and reconstructing high and low frequencies, it can achieve more attention to local detail capture. Different from traditional time domain attention, the frequency domain attention mechanism focuses on the frequency components of the data and better captures the long-term dependence and periodic characteristics of the data.

[0077] Next, the output of the wavelet attention module is normalized through the addition and normalization layer (Add&Norm) to ensure that the data is not numerically unbalanced when propagating in the network; after further processing through the feedforward network layer (FeedForward), it passes through the addition and normalization layer again. This part of the structure is repeated N times, indicating that there are N encoders (NEncoders); finally, the output processed by the encoder is passed to M decoders (M Decoders). The decoder structure is similar to the encoder. After several layers of wavelet attention, addition and normalization, feedforward network, etc., the seasonal prediction result (Seasonal Prediction) is finally output. In other words, the seasonal time series data will be divided into blocks by the data cutting module patch in the seasonal data processing module, and then sent to the wavelet attention module WA (WaveletsAttention) for DWT decomposition and reconstruction based on DWT to obtain more useful high-frequency detail features.

[0078] The trend time series data is directly input into the trend data processing module for normalization processing to obtain the trend prediction result of the trend time series data; the seasonal prediction result and the trend prediction result will enter the output module, and then the seasonal prediction result and the trend prediction result will be added by the output module to obtain the first prediction result as output.

[0079] The second sub-model includes a multi-scale sequence perception module, a mixing module and a time projection module:

[0080] The multi-scale sequence perception module is used to input data features into the frequency domain for filtering and extraction;

[0081] The mixing module includes a time mixing module and a feature mixing module, which are used to extract data features, the time mixing module shares operations on all features, and the feature mixing module shares operations on all time steps;

[0082] The time projection module is used to convert the features extracted by the mixing module into predicted time series values.

[0083] Reference Figure 3 It can be seen that the multi-scale sequence perception module is an MSSP module. In the MSSP module, the input is also historical time series data. The input time series is FFTed through Fourier transform (FFT) to convert the time domain signal to the frequency domain. Then, a low-pass filter is used in the frequency domain to extract the low-frequency components. After that, the filtered frequency domain signal is converted back to the time domain through the inverse fast Fourier transform (iFFT) and divided into multiple small segments. The time series is preprocessed, the low-frequency components in the time series are extracted, the high-frequency noise is removed, and the data features are input into the frequency domain for filtering and extraction.

[0084] The mixing module includes the time mixing module and the feature mixing module. The time mixing module (Time Mixing) processes the time dimension through layer normalization (Layer Norm) and multi-layer perceptron (MLP 1) for mixing and integrating deep features. Through the mixing operation on the time and feature dimensions, the model's learning ability for multi-dimensional patient data is enhanced. The feature mixing module (Feature Mixing) processes the feature dimension through layer normalization (Layer Norm) and multi-layer perceptron (MLP 2). The function of this module is to process on the time and feature dimensions respectively to extract features in the time series. Time mixing focuses on processing information in the time dimension, while feature mixing focuses on processing information between different features. In other words, the time mixing module shares operations on all features, and the feature mixing module shares operations on all time steps, which improves the adaptability and generalization of the model to different time and feature combinations.

[0085] The time projection module is a fully connected layer (Fully Connected) used to map the features output by the mixing layer to the predicted time series. Its function is to convert the extracted features into predicted time series values.

[0086] It is not difficult to see that the overall logic of the second sub-model is to preprocess the time series first, extract useful low-frequency information, then perform deep feature extraction in both time and feature dimensions, and finally map the extracted features to the predicted time series to generate the final prediction results.

[0087] S200: Acquire an initial data set, where the initial data set is a time series data set of multiple diabetic patients.

[0088] In this embodiment, the initial data set includes diabetes-related data of about 5,000 patients. These data cover a series of biomedical and lifestyle indicators, including age, weight, body mass index (BMI), blood pressure, cholesterol level, blood sugar level, exercise frequency, eating habits, and family medical history. These data are collected from records of multiple medical institutions to ensure the diversity and representativeness of the data.

[0089] S300. Training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model.

[0090] The training of the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model includes:

[0091] Preprocessing the initial data to obtain a target training set and a target support set;

[0092] Based on the target training set, the first sub-model and the second sub-model are trained respectively by using a gradient descent method and an Adam optimizer method;

[0093] Based on the target support set, cross-validate and adjust hyperparameters of the trained first sub-model and the second sub-model to obtain a first target sub-model and a second target sub-model;

[0094] The output module of the first target sub-model is combined with the input module of the second target sub-model to obtain the target prediction model.

[0095] Wherein, the initial data is preprocessed to obtain a target training set and a target support set;

[0096] Data cleaning: removing irrelevant or erroneous data entries in the initial data, such as non-diabetes-related medical records or inconsistent input formats.

[0097] Missing value processing: For missing data points, mean filling, median filling or estimation based on data of similar patients are used according to their data type.

[0098] Data normalization: Standardize all numerical data to a uniform scale, such as using Z-score normalization or minimum-maximum normalization, to eliminate the impact of different measurement units.

[0099] Data segmentation: segment the normalized data to obtain the target training set consisting of more than 4,000 groups of time series data and the target support set consisting of more than 1,000 groups of time series data.

[0100] Then, the first sub-model and the second sub-model after training are trained based on the target training set and the target support set. The training process includes:

[0101] Initial training: Use the segmented target training set for preliminary network training, and apply batch gradient descent, Adam optimizer and other methods to quickly converge to a preliminary reasonable weight configuration.

[0102] Cross-validation: Use K-fold cross-validation to fine-tune the model, and repeat training and validation on different data subsets to ensure that the model maintains good predictive performance on a variety of data.

[0103] Performance evaluation: Evaluate the performance of the model on an independent target support set, focusing on indicators including but not limited to accuracy, recall, F1 score and AUC value. The F1 score is the harmonic mean of accuracy and recall, and the AUC value refers to the area under the ROC curve. The ROC curve (Receiver Operating Characteristic Curve) is drawn with the false positive rate (FPR) as the horizontal axis and the true positive rate (TPR) as the vertical axis. The closer the AUC value is to 1, the stronger the classification ability of the model.

[0104] Then perform hyperparameter tuning:

[0105] Parameter search: Systematically explore and test different hyperparameter combinations through grid search, random search, or Bayesian optimization methods.

[0106] Network depth and width: Adjust the number of MLP layers and the number of neurons in each layer to find the optimal network depth and width, balancing model complexity and predictive power.

[0107] Learning rate adjustment: Adopt a learning rate annealing strategy, such as gradually reducing the learning rate as the training progresses, to help the model approach the global optimum more closely in the later stages of training.

[0108] Through the above steps, the target prediction model obtained will show high accuracy and stability in diabetes risk prediction, providing reliable decision support for clinicians.

[0109] After the target prediction model is obtained, diabetes risk prediction can be performed on the target patient based on the target prediction model.

[0110] S400, acquiring target data, and predicting the target data based on the target prediction model to obtain a diabetes risk prediction result for a target patient, wherein the target data is diabetes-related data of the target patient.

[0111] S410, obtaining target data includes:

[0112] Obtain the target patient's historical data related to diabetes. Specifically, obtain the target patient's historical medical records from a medical database, including blood sugar, cholesterol, blood pressure and other data from previous physical examinations.

[0113] Acquire real-time data related to diabetes of the target patient, specifically, acquire instant physiological indicators of the target patient, such as data obtained through a mobile health monitoring device.

[0114] The historical data and implementation data of the target patient are standardized to obtain the target data. Specifically, the historical data and implementation data of the target patient are cleaned, missing value processed, and normalized to ensure that the data format and range are consistent with those during model training.

[0115] Perform feature engineering on the input data to extract information useful for diabetes risk prediction. For example, by combining the patient's age, gender, lifestyle and physiological data, construct derived variables such as "weight change rate" or "average blood sugar volatility" to obtain the target data.

[0116] S420, predicting the target data based on the target prediction model to obtain a diabetes risk prediction result for a target patient, including:

[0117] Inputting the target data into the encoder of the first sub-model for feature encoding to obtain a first feature;

[0118] Processing the first feature by a frequency domain attention enhancement mechanism in the first sub-model to obtain a second feature;

[0119] Inputting the feature into the second sub-model to perform mixed extraction of time and feature to obtain the target feature;

[0120] The diabetes risk level of the target patient is assessed based on the target feature.

[0121] Specifically, the target data is input into the target prediction model, feature encoded by the STSegNet encoder to obtain the first feature, then processed by the frequency domain attention mechanism to obtain the second feature, and finally further analyzed by Lx-Mixer to extract and integrate the relationship between time and physiological characteristics to obtain the target feature.

[0122] Then, based on the target features, the patient's diabetes risk level is calculated. This prediction process can use the trained model parameters to estimate the probability distribution of risk.

[0123] The diabetes risk of the target patient is divided into "low risk", "medium risk" and "high risk" levels based on probability distribution as the output item of the target prediction model, which is convenient for medical professionals to make further analysis and decision.

[0124] Furthermore, after evaluating the diabetes risk level of the target patient based on the target feature, the method further includes:

[0125] generating a risk assessment report and a health management strategy based on the diabetes risk level of the target patient;

[0126] Dynamically monitor the real-time physiological data of the target patient and re-predict the diabetes risk level of the target patient based on the real-time physiological data to obtain an updated risk level, so as to perform personalized health management for the target patient based on the updated risk level.

[0127] Specifically, after obtaining the diabetes risk level of the target patient, a risk report may also be generated, including:

[0128] The prediction results are integrated into an easy-to-understand report format, including risk levels and explanations of key influencing factors, to help doctors quickly understand the patient's risk status and possible medical interventions.

[0129] Decision support can also be provided, including:

[0130] The quantitative analysis results provided can serve as the basis for formulating treatment plans, lifestyle adjustment recommendations and long-term health management strategies.

[0131] Furthermore, the target patient may be dynamically monitored and adjusted, including:

[0132] According to the regular examination results and model feedback of the target patients, the treatment plan is adjusted to achieve personalized and precise diabetes management.

[0133] This can assist healthcare professionals in making better decisions in diabetes risk assessment and management by providing an efficient and accurate tool.

[0134] It can be seen that the diabetes risk assessment method based on time series provided in this embodiment can make professional risk assessment: by integrating frequency domain attention and MLP-Mixer structure, this model can more accurately process complex physiological and behavioral data related to diabetes. Especially for the processing of blood sugar data, the model can identify the subtle relationship between blood sugar fluctuations and other physiological parameters, and how these relationships change over time, so as to conduct long-term risk assessment.

[0135] And it has generalization ability: The performance on multiple independent and diverse public data sets proves the generalization ability of the model. Regardless of different populations, regions or different blood glucose monitoring technologies, the model can stably predict diabetes risk, indicating its reliability in practical applications.

[0136] Furthermore, the dynamic changes in the target patient's condition are taken into consideration, and the prediction results can be updated in real time by accepting continuous data input, which is particularly important for diabetic patients who require long-term management.

[0137] In summary, this embodiment provides a diabetes risk assessment method based on time series. When conducting diabetes risk assessment on a target patient, an initial model including a first sub-model and a second sub-model is constructed, wherein the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure. Then, an initial data set is obtained, and the initial data set is a time series data set of multiple diabetic patients. The first sub-model and the second sub-model are trained based on the initial data set to obtain a target prediction model. Finally, diabetes-related data of the target patient is obtained, and the diabetes-related data of the target patient is predicted based on the target prediction model to obtain a diabetes risk prediction result for the target patient. The diabetes risk assessment method based on time series provided in this embodiment can more accurately process complex physiological and behavioral data related to diabetes by integrating frequency domain attention and MLP-Mixer structure, and identify the subtle relationship between blood sugar fluctuations and other physiological parameters of the target patient to obtain accurate diabetes risk prediction results.

[0138] It should be understood that, although the various steps in the flowcharts given in the accompanying drawings of the present invention are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear description in this article, the execution of the steps in the present invention is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps of the present invention may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0139] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0140] Embodiment 2

[0141] Based on the above embodiments, the present invention also provides a diabetes risk assessment device based on time series, and its functional module schematic diagram is as follows: Figure 4 As shown, the diabetes risk assessment device based on time series includes:

[0142] A model building module, used to build an initial model, the initial model includes a first sub-model and a second sub-model, the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure, as described in Example 1;

[0143] A data set acquisition module, used to acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients, as specifically described in Example 1;

[0144] A training module, used for training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model, as specifically described in Embodiment 1;

[0145] The prediction module is used to obtain target data, predict the target data based on the target prediction model, and obtain the diabetes risk prediction result of the target patient. The target data is diabetes-related data of the target patient, as described in Example 1.

[0146] Embodiment 3

[0147] Based on the diabetes risk assessment method based on time series described in the first embodiment, the present invention also provides a terminal, whose principle block diagram can be as follows: Figure 5 The terminal includes a memory 10 and a processor 20. The memory 10 stores a diabetes risk assessment program based on a time series. When the processor 10 executes the computer program, at least the following steps can be implemented:

[0148] Constructing an initial model, the initial model comprising a first sub-model and a second sub-model, the first sub-model comprising a frequency domain attention enhancement mechanism, and the second sub-model comprising an MLP-Mixer structure;

[0149] Acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients;

[0150] Training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model;

[0151] Target data is acquired, and the target data is predicted based on the target prediction model to obtain a diabetes risk prediction result of the target patient, wherein the target data is diabetes-related data of the target patient.

[0152] Wherein, the first sub-model includes a lightweight multivariate data separation module, a seasonal data processing module, a trend data processing module and an output module;

[0153] The lightweight multivariate data separation module is used to perform hierarchical decomposition of the data to obtain seasonal time series data and trend time series data;

[0154] The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism;

[0155] The trend data processing module is used to perform normalization processing on the trend time series data to obtain the trend prediction result of the trend time series data;

[0156] The output module is used to output a first prediction result based on the seasonal prediction result and the trend prediction result.

[0157] Wherein, the seasonal data processing module includes:

[0158] A data cutting module, the data cutting module is used to cut the seasonal data into a plurality of target small blocks, and embed each of the target small blocks into a corresponding target vector;

[0159] A wavelet attention module is used to decompose and reconstruct the target small block to extract wavelet attention features.

[0160] The second sub-model includes a multi-scale sequence perception module, a mixing module and a time projection module:

[0161] The multi-scale sequence perception module is used to input data features into the frequency domain for filtering and extraction;

[0162] The mixing module includes a time mixing module and a feature mixing module, which are used to extract data features, the time mixing module shares operations on all features, and the feature mixing module shares operations on all time steps;

[0163] The time projection module is used to convert the features extracted by the mixing module into predicted time series values.

[0164] The step of training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model includes:

[0165] Preprocessing the initial data to obtain a target training set and a target support set;

[0166] Based on the target training set, the first sub-model and the second sub-model are trained respectively by using a gradient descent method and an Adam optimizer method;

[0167] Based on the target support set, cross-validate and adjust hyperparameters of the trained first sub-model and the second sub-model to obtain a first target sub-model and a second target sub-model;

[0168] The output module of the first target sub-model is combined with the input module of the second target sub-model to obtain the target prediction model.

[0169] The step of predicting the target data based on the target prediction model to obtain a diabetes risk prediction result for the target patient includes:

[0170] Inputting the target data into the encoder of the first sub-model for feature encoding to obtain a first feature;

[0171] Processing the first feature by a frequency domain attention enhancement mechanism in the first sub-model to obtain a second feature;

[0172] Inputting the feature into the second sub-model to perform mixed extraction of time and feature to obtain the target feature;

[0173] The diabetes risk level of the target patient is assessed based on the target feature.

[0174] Wherein, after evaluating the diabetes risk level of the target patient based on the target feature, the method further includes:

[0175] generating a risk assessment report and a health management strategy based on the diabetes risk level of the target patient;

[0176] Dynamically monitor the real-time physiological data of the target patient and re-predict the diabetes risk level of the target patient based on the real-time physiological data to obtain an updated risk level, so as to perform personalized health management for the target patient based on the updated risk level.

[0177] Embodiment 4

[0178] The present invention also provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the steps of the diabetes risk assessment method based on time series described in the above embodiment.

[0179] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A diabetes risk assessment method based on time series, characterized in that: include: Constructing an initial model, the initial model comprising a first sub-model and a second sub-model, the first sub-model comprising a frequency domain attention enhancement mechanism, and the second sub-model comprising an MLP-Mixer structure; The first sub-model includes a lightweight multivariate data separation module, a seasonal data processing module, a trend data processing module and an output module; The lightweight multivariate data separation module is used to perform hierarchical decomposition of the data to obtain seasonal time series data and trend time series data; The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism; Acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients; Training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model; The training of the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model includes: Preprocessing the initial data set to obtain a target training set and a target support set; Based on the target training set, the first sub-model and the second sub-model are trained respectively by using a gradient descent method and an Adam optimizer method; Based on the target support set, cross-validate and adjust hyperparameters of the trained first sub-model and the second sub-model to obtain a first target sub-model and a second target sub-model; Combining the output module of the first target sub-model with the input module of the second target sub-model to obtain the target prediction model; Acquire target data, and predict the target data based on the target prediction model to obtain a diabetes risk prediction result for the target patient; The acquiring of target data comprises: The historical medical records of the target patient are obtained from a medical database, wherein the historical medical records include blood sugar, cholesterol, and blood pressure data of the target patient during previous physical examinations.

2. The diabetes risk assessment method based on time series according to claim 1, characterized in that: The trend data processing module is used to perform normalization processing on the trend time series data to obtain the trend prediction result of the trend time series data; The output module is used to output a first prediction result based on the seasonal prediction result and the trend prediction result.

3. The diabetes risk assessment method based on time series according to claim 1, characterized in that: The seasonal data processing module includes: A data cutting module, the data cutting module is used to cut the seasonal time series data into a plurality of target small blocks, and embed each of the target small blocks into a corresponding target vector; A wavelet attention module is used to decompose and reconstruct the target small block to extract wavelet attention features.

4. The diabetes risk assessment method based on time series according to claim 1, characterized in that: The second sub-model includes a multi-scale sequence perception module, a mixing module and a time projection module: The multi-scale sequence perception module is used to input the historical time series data corresponding to the target data into the frequency domain for filtering and extraction; The mixing module includes a time mixing module and a feature mixing module, which are used to extract data features of the historical time series data corresponding to the target data, the time mixing module shares operations on all features, and the feature mixing module shares operations on all time steps; The time projection module is used to convert the features extracted by the mixing module into predicted time series values.

5. The diabetes risk assessment method based on time series according to claim 1, characterized in that: The step of predicting the target data based on the target prediction model to obtain a diabetes risk prediction result for a target patient includes: Inputting the target data into the encoder of the first sub-model for feature encoding to obtain a first feature; Processing the first feature by a frequency domain attention enhancement mechanism in the first sub-model to obtain a second feature; Inputting the second feature into the second sub-model to perform mixed extraction of time and features to obtain a target feature; The diabetes risk level of the target patient is assessed based on the target feature.

6. The diabetes risk assessment method based on time series according to claim 5, characterized in that: After evaluating the diabetes risk level of the target patient based on the target feature, the method further includes: generating a risk assessment report and a health management strategy based on the diabetes risk level of the target patient; Dynamically monitor the real-time physiological data of the target patient and re-predict the diabetes risk level of the target patient based on the real-time physiological data to obtain an updated risk level, so as to perform personalized health management for the target patient based on the updated risk level.

7. A diabetes risk assessment device based on time series, characterized in that: The device comprises: A model building module, used to build an initial model, wherein the initial model includes a first sub-model and a second sub-model, wherein the first sub-model includes a frequency domain attention enhancement mechanism, and the second sub-model includes an MLP-Mixer structure; A data set acquisition module, used to acquire an initial data set, wherein the initial data set is a time series data set of multiple diabetic patients; The first sub-model includes a lightweight multivariate data separation module, a seasonal data processing module, a trend data processing module and an output module; The lightweight multivariate data separation module is used to perform hierarchical decomposition of the data to obtain seasonal time series data and trend time series data; The seasonal data processing module is used to predict the seasonal prediction results of the seasonal time series data based on the frequency domain attention enhancement mechanism; A training module, used for training the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model; The training of the first sub-model and the second sub-model based on the initial data set to obtain a target prediction model includes: Preprocessing the initial data set to obtain a target training set and a target support set; Based on the target training set, the first sub-model and the second sub-model are trained respectively by using a gradient descent method and an Adam optimizer method; Based on the target support set, cross-validate and adjust hyperparameters of the trained first sub-model and the second sub-model to obtain a first target sub-model and a second target sub-model; Combining the output module of the first target sub-model with the input module of the second target sub-model to obtain the target prediction model; A prediction module is used to obtain target data, predict the target data based on the target prediction model, and obtain a diabetes risk prediction result for the target patient; The acquiring of target data comprises: The historical medical records of the target patient are obtained from a medical database, wherein the historical medical records include blood sugar, cholesterol, and blood pressure data of the target patient during previous physical examinations.

8. An electronic terminal, characterized in that: The terminal includes: a processor, a storage medium communicatively connected to the processor, the storage medium being suitable for storing a plurality of instructions, and the processor being suitable for calling the instructions in the storage medium to execute the steps of the time series-based diabetes risk assessment method as described in any one of claims 1-6 above.

9. A computer storage medium, characterized in that The computer storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the time series-based diabetes risk assessment method as described in any one of claims 1-6.