Quantum analogy-based gestational diabetes risk prediction method and device, and terminal
By constructing longitudinal trajectories of thyroid and blood glucose indicators in pregnant women, and combining quantum analogy and Markov chain Monte Carlo methods, the accuracy problem of gestational diabetes risk prediction was solved, achieving stable and reliable prediction under small sample conditions.
Patent Information
- Application Number
- CN202611464824.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-20
- Publication Date
- 2026-11-24
AI Technical Summary
Current technologies struggle to accurately predict the risk of gestational diabetes, especially when the thyroid function of pregnant women is affected by placental endocrine and hypothalamic-pituitary axis factors, making serological reference ranges inapplicable and leading to diagnostic difficulties.
By constructing longitudinal trajectories containing changes in thyroid-stimulating hormone, free thyroxine, and fasting blood glucose, a quantum analogy method was used for cluster analysis. The local minima of the quantum potential field were used as the initial cluster centers, allowing sample migration to optimize the clustering results. The sample features were evaluated based on the Markov chain Monte Carlo method, and confidence weights were set to improve prediction accuracy.
It improves the accuracy and stability of gestational diabetes risk prediction, overcomes the local optimum problem of classical clustering algorithms, and ensures reliable risk subtype classification and prediction even under small sample conditions.
Smart Images

Figure CN123161884A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical data processing technology based on quantum analogy, specifically to a method, device, and terminal for predicting the risk of gestational diabetes based on quantum analogy. Background Technology
[0002] Thyroid hormone (TH) is a tyrosine iodide synthesized by thyroid follicular epithelial cells. In clinical practice, serological testing is mainly used to assist in the diagnosis of some patients with thyroid diseases who have not yet shown obvious clinical manifestations. Because placental endocrine function and the hypothalamic-pituitary axis have a significant impact on the secretion and metabolism of maternal thyroid hormones during pregnancy, and because the differences in the testing methods, instruments and reagents used by laboratories in various medical institutions can also have an impact, the reference range of serum thyroid indicators for the general population can no longer accurately reflect the thyroid function status of the body during pregnancy.
[0003] Recent studies have shown that thyroid hormones can affect glucose and lipid metabolism by influencing insulin resistance, which could be a crucial link between thyroid disease and gestational diabetes mellitus (GDM). However, the specific mechanisms involved remain to be elucidated. As an endocrine disorder caused by carbohydrate intolerance during pregnancy, early identification and prevention of GDM have long been a research hotspot in the academic community. How to predict the risk of gestational diabetes based on thyroid indicators is an urgent problem to be solved. Summary of the Invention
[0004] In view of this, embodiments of this application provide a method, device, and terminal for predicting the risk of gestational diabetes based on quantum analogy, which can improve the accuracy of gestational diabetes risk prediction.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a method for predicting the risk of gestational diabetes based on quantum analogy, including:
[0007] Obtain a sample set, wherein each sample in the sample set contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early stages of pregnancy, as well as a gestational diabetes diagnosis label in the mid-trimester.
[0008] Based on the test values at each blood collection time point, a longitudinal trajectory of thyroid-stimulating hormone, free thyroxine, and fasting blood glucose for each sample was constructed, and the trajectory characteristics of each sample were determined based on the three longitudinal trajectory.
[0009] The trajectory features of each sample are used as high-dimensional data points. The quantum potential energy value of each sample is calculated and a quantum potential field is constructed. The local minimum value of the quantum potential field is used as the initial clustering center for clustering. The quantum barrier crossing probability of each sample in the quantum potential field is calculated based on the initial clustering result. Samples with a quantum barrier crossing probability greater than the threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering result is iteratively optimized to obtain the final clustering result of each sample.
[0010] Risk subtypes are determined based on the final clustering results of each sample, and risk labels for each risk subtype are determined based on the gestational diabetes positivity rate of samples within that risk subtype.
[0011] Based on the thyroid index and fasting blood glucose test values of the pregnant woman to be predicted, a trajectory feature to be predicted is constructed. The quantum potential difference between the trajectory feature to be predicted and the cluster centers of each risk subtype is calculated. The risk subtype with the smallest quantum potential difference is determined as the predicted risk subtype of the pregnant woman to be predicted. The probability of gestational diabetes risk of the pregnant woman to be predicted is determined based on the risk label of the risk subtype.
[0012] Based on the first aspect, in some embodiments, before constructing the longitudinal change trajectory of thyroid-stimulating hormone, free thyroxine and fasting blood glucose for each sample based on the detection values at each time point, the method further includes: adaptively aligning the blood collection time points of each sample to obtain the aligned detection values of each sample at a unified standard time point.
[0013] The adaptive alignment includes: constructing a time-disaligned state space model with the actual blood collection time point as the observation time and a unified standard time point as the potential state. The state vector of the state space model includes a thyroid-stimulating hormone trajectory component, a free thyroxine trajectory component, and a time difference variable. The time difference variable is used to describe the actual time interval between two adjacent blood collections. The state transition matrix of the state space model is adaptively adjusted as the time interval between adjacent blood collections changes.
[0014] The state-space model is filtered and estimated using a Kalman filter algorithm: in the prediction step, the state transition matrix is adjusted according to the current value of the time difference variable to predict the current state; in the update step, the predicted state is corrected according to the actual detection value, and the time difference variable is updated according to the deviation between the actual blood collection time point and the predicted blood collection time point; after filtering, the posterior state estimate from each actual blood collection time point is predicted to each unified standard time point to obtain the aligned detection value.
[0015] Based on the first aspect, in some embodiments, the evolution law of the time difference variable is: δ k = γ1·δ k-1 +γ2·δ k-2 + ξk , where γ1 and γ2 are autoregressive coefficients, ξ k To drive noise, δ k Let γ1 be the time interval between the k-th blood collection and the (k-1)-th blood collection. 10 + λ1·(TSH k - TSH normal ), γ2 = γ 20 + λ2·(FT4 k -FT4 normal ), where γ 10 and γ 20 Based on the autoregressive coefficient, TSH k and FT4 k TSH is an estimate of the current physiological state. normal and FT4 normal These are reference values within the normal range, and λ1 and λ2 are preset modulation coefficients.
[0016] Based on the first aspect, in some embodiments, determining the trajectory features of each sample according to three longitudinal change trajectories includes:
[0017] The sample set is pre-clustered to divide all samples into multiple pre-cluster subtypes, and the pre-cluster subtype to which each sample belongs is determined.
[0018] Based on the pre-cluster subtype to which each sample belongs, the trajectory of thyroid-stimulating hormone, free thyroxine, and fasting blood glucose of the same sample is fitted with a polynomial function under the constraints of the corresponding pre-cluster subtype. The coefficients of the polynomial function constitute the trajectory parameters of the sample. A subtype-adaptive hierarchical prior distribution is set for the trajectory parameters so that samples belonging to the same pre-cluster subtype share the prior information of that subtype.
[0019] The hierarchical posterior distribution is sampled using the Markov chain Monte Carlo method to obtain the posterior distribution of trajectory parameters for each sample. The mean of the posterior distribution is used as the stable trajectory parameter for each sample, and the variance of the posterior distribution is used as a measure of the uncertainty of parameter estimation.
[0020] The trajectory characteristics of each sample are determined based on the stable trajectory parameters of each sample. The trajectory characteristics include at least one of the following: slope of change, area under the curve, and peak-to-valley difference.
[0021] Based on the first aspect, in some embodiments, determining the trajectory features of each sample according to the three longitudinal change trajectories further includes:
[0022] Calculate the stable trajectory parameter β for each sample. i The posterior variance Var(β) iBased on the posterior variance Var(β) i Set confidence weights for each sample: w i = exp(-ν·Var(β i )), ν is the adjustment parameter, w i ∈(0,1];
[0023] If the average confidence weight of all samples in a certain pre-cluster subtype is less than the first preset threshold, the pre-cluster subtype is marked as an unstable subtype, and the quantum potential difference of the pre-cluster subtype is increased when calculating the quantum potential difference between the trajectory characteristics of the pregnant woman to be predicted and the cluster centers of each risk subtype.
[0024] If the posterior variance of a sample is greater than or equal to the second preset threshold and the confidence weight is less than the preset weight threshold, then the prior mean of the pre-cluster subtype to which the sample belongs is set as the substitute value of the stable trajectory parameter of the sample.
[0025] Based on the first aspect, in some embodiments, the formula for calculating the quantum potential energy value is: Φ(x i ) = Σ j exp(-||x i - x j || 2 / 2σ 2 ), x i and x j Let σ be the trajectory features of the i-th and j-th samples, and σ be the scale parameter. i - x j || 2 The squared Euclidean distance between two sample points is given; the scale parameter σ is determined by calculating the pairwise Euclidean distances between all sample trajectory features in the sample set, and taking the median of all Euclidean distances as the initial value of σ.
[0026] Based on the first aspect, in some embodiments, the quantum barrier crossing probability is calculated as follows: for sample point x i From its current cluster center c a Migrate to target cluster center c b Barrier crossing probability Pr(x) i : c a →c b ) =exp(-ΔΦ / T'), where ΔΦ is the potential energy difference required for a sample point to travel from its current location to the target cluster center, ΔΦ = Φ(c b )- Φ(x i If ΔΦ≤0, then Pr=1, and T' is the simulated annealing temperature parameter, which gradually decreases during the iterative optimization process.
[0027] Based on the first aspect, in some embodiments, the method further includes: for any sample point, if the quantum potential difference between the sample point and all cluster centers is greater than a preset anomaly threshold, then the sample point is marked as an outlier and no risk subtype label is assigned to it.
[0028] Secondly, embodiments of this application provide a gestational diabetes risk prediction device based on quantum analogy, comprising:
[0029] The sample acquisition module is used to acquire a sample set, wherein each sample in the sample set contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early pregnancy of pregnant women, as well as a gestational diabetes diagnosis label in the mid-pregnancy period.
[0030] The trajectory feature determination module is used to construct the longitudinal change trajectory of thyroid-stimulating hormone, free thyroxine and fasting blood glucose for each sample based on the detection values at each blood collection time point, and to determine the trajectory features of each sample based on the three longitudinal change trajectories.
[0031] The clustering module is used to treat the trajectory features of each sample as high-dimensional data points, calculate the quantum potential energy value of each sample and construct a quantum potential field. The local minimum value of the quantum potential field is used as the initial clustering center for clustering. Based on the initial clustering results, the quantum barrier crossing probability of each sample in the quantum potential field is calculated. Samples with a quantum barrier crossing probability greater than a threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering results are iteratively optimized to obtain the final clustering results of each sample.
[0032] The subtype determination module is used to determine the risk subtype based on the final clustering results of each sample, and to determine the risk label of the risk subtype based on the gestational diabetes positivity rate of samples within that risk subtype.
[0033] The prediction module is used to construct a trajectory feature to be predicted based on the thyroid index test value and fasting blood glucose test value of the pregnant woman to be predicted, calculate the quantum potential difference between the trajectory feature to be predicted and the cluster center of each risk subtype, determine the risk subtype with the smallest quantum potential difference as the predicted risk subtype of the pregnant woman to be predicted, and determine the probability of gestational diabetes risk of the pregnant woman to be predicted based on the risk label of the risk subtype.
[0034] Thirdly, embodiments of this application provide a terminal including a memory and a processor, the memory storing a computer program executable on the processor, the processor executing the computer program to implement the steps of the quantum analogy-based gestational diabetes risk prediction method as described in any of the first aspects above.
[0035] The beneficial effects of the embodiments of this application compared with the prior art include:
[0036] (1) By constructing longitudinal change trajectories containing three indicators: thyroid-stimulating hormone, free thyroxine and fasting blood glucose, and jointly fitting the three trajectories, and then using adaptive alignment to map the trajectories of different pregnant women to a unified standard time point, since the longitudinal change trajectory can capture the dynamic information such as the direction, rate and fluctuation amplitude of each indicator as the gestational week changes, the adaptive alignment solves the problem of inconsistent time axis caused by the misalignment of blood collection time points of different pregnant women, and the joint fitting explores the thyroid-blood glucose synergistic change information that cannot be reflected by a single indicator, thus improving the accuracy of gestational diabetes risk prediction.
[0037] (2) The trajectory features of each sample are used as high-dimensional data points. The quantum potential energy value is calculated and a quantum potential field is constructed. The local minimum value of the quantum potential field is used as the initial cluster center. The quantum barrier crossing probability allows the sample to migrate between cluster centers to iteratively optimize the clustering result. Since the quantum potential field can naturally characterize the data distribution and the cluster center is automatically determined by the local minimum value of the potential field without pre-specifying the number of clusters, the quantum barrier crossing mechanism allows the sample to overcome the potential energy difference with a certain probability and migrate to a better cluster center, thereby making the clustering result jump out of the local optimum. Therefore, it can overcome the shortcomings of the classical clustering algorithm that is sensitive to the initial center and easily falls into the local optimum, thereby improving the stability of risk subtype division.
[0038] (3) The sample set is pre-clustered and a hierarchical prior distribution of the trajectory parameters is set for subtype adaptation. The Markov chain Monte Carlo method is used to sample the posterior distribution. The confidence weight is set for each sample based on the posterior variance. Subtypes with low average confidence are marked as unstable subtypes and their quantum potential difference is increased during matching. For extremely unreliable samples, the subtype prior mean is used to replace their stable trajectory parameters. Since the hierarchical prior allows samples within the same subtype to share group information, the individual estimation is constrained by the group information. The confidence weight makes the reliable trajectory estimation samples have a higher influence. The unstable subtype labeling and the replacement of extremely unreliable samples prevent noisy samples from polluting the clustering structure. Therefore, it is possible to stabilize the trajectory parameter estimation and ensure the robustness of risk prediction under small sample conditions. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a flowchart illustrating the method for predicting the risk of gestational diabetes based on quantum analogy provided in the embodiments of this application.
[0041] Figure 2This is a structural block diagram of the gestational diabetes risk prediction device based on quantum analogy provided in the embodiments of this application;
[0042] Figure 3 This is a structural block diagram of the terminal provided in the embodiments of this application. Detailed Implementation
[0043] The present application will be described more clearly below with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the function of the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0045] See Figure 1 The method for predicting the risk of gestational diabetes based on quantum analogy provided in the embodiments of this application is described in detail below:
[0046] Step 101: Obtain a sample set, wherein each sample in the sample set contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early stages of pregnancy, as well as a gestational diabetes diagnosis label in the mid-trimester.
[0047] Specifically, the goal of this step is to construct a structured, multi-timepoint longitudinal sample dataset. Each sample corresponds to a pregnant woman and includes thyroid hormone levels and fasting blood glucose levels from at least two different blood sampling times during early pregnancy (8 to 12 weeks), as well as a gestational diabetes mellitus (GDM) diagnostic label during mid-pregnancy (24 to 28 weeks). The thyroid hormone and fasting blood glucose levels may include thyroid-stimulating hormone (TSH), free thyroxine (FT4), free triiodothyronine (FT3), thyroid peroxidase antibody (TPOAb), thyroglobulin antibody (TgAb), and fasting plasma glucose (FPG). The GDM diagnostic label can be confirmed by a 75g oral glucose tolerance test (OGTT) between 24 and 28 weeks of gestation, with a value of 1 for the presence of diabetes and 0 for the absence of diabetes. The gestational week corresponding to each blood sampling, as well as the pregnant woman's age and pre-pregnancy body mass index, are also recorded.
[0048] Strict inclusion and exclusion criteria were established during data collection. Inclusion criteria included: singleton pregnancy; at least two thyroid function and fasting blood glucose tests completed at our hospital during early pregnancy; an oral glucose tolerance test (OGTT) completed during mid-pregnancy with a clear diagnosis; and complete clinical data. Exclusion criteria included: pre-existing thyroid disease or diabetes and currently receiving treatment; multiple pregnancies; and other serious pregnancy complications. All data collection adhered to hospital ethics review and data security regulations, and patient information was de-identified.
[0049] The collected data was organized into structured tables. Since each pregnant woman had multiple blood collection times, a "one blood collection record per row" approach was adopted for storage. Each row included a unique patient identifier, gestational week of blood collection, TSH, FT4, FT3, TPOAb, TgAb, fasting blood glucose, and other variables. Each patient also had a unique OGTT diagnostic label, age, and pre-pregnancy BMI. The data could be exported to CSV or Excel format and stored in a secure data analysis environment. A data dictionary was established to define the units and ranges of each variable; for example, TSH was in mIU / L, FT4 in pmol / L, fasting blood glucose in mmol / L, age in whole years, and BMI rounded to one decimal place.
[0050] After obtaining the sample set, the data was cleaned and quality controlled. For thyroid indicators and fasting blood glucose, the missing percentage of each variable was calculated. A missing percentage threshold of 15% was set. If the missing percentage of a variable was less than this threshold, age, gestational age at blood collection, and pre-pregnancy BMI were selected as auxiliary features. After standardization, Euclidean distance was calculated, and the median of the five closest complete samples was used as the imputation value. If all core indicators were missing at a given blood collection time point, that time point was removed from the sample. If fewer than two blood collection time points remained after removal, the entire sample was deleted.
[0051] After imputation of missing values, outlier handling was performed on thyroid indicators and fasting blood glucose. The 25th percentile, 75th percentile, and interquartile range of each variable were calculated. The 3-interquartile range criterion was used to determine the outlier boundaries. Values below the lower boundary limit were replaced with the lower boundary limit, and values above the upper boundary limit were replaced with the upper boundary limit. For TPOAb and TgAb, binarization was performed according to the positive threshold provided by the kit. Values above the threshold were assigned a value of 1 (positive), and otherwise a value of 0 (negative).
[0052] After the above processing, the final sample set included thyroid hormone levels and fasting blood glucose levels from at least two blood sampling points for each pregnant woman, as well as a gestational diabetes diagnosis label from the second trimester. The blood sampling points were not aligned among the pregnant women; that is, the number of blood samples, the intervals between samples, and the specific gestational week varied.
[0053] Step 102: Construct longitudinal change trajectories of thyroid-stimulating hormone, free thyroxine, and fasting blood glucose for each sample based on the detection values at each blood collection time point, and determine the trajectory characteristics of each sample based on the three longitudinal change trajectories.
[0054] The purpose of this step is to transform discrete, irregularly time-series raw test values into longitudinal trajectory data that reflects the dynamic changes of each indicator, and to extract trajectory features that can be used for subsequent cluster analysis. Each sample has test values from at least two blood collection time points in early pregnancy; these values are essentially discrete time-series data. Directly using the raw test values cannot reflect the changing trends of the indicators as pregnancy progresses, nor can it compare the differences in change patterns between different samples. Therefore, it is necessary to construct longitudinal trajectory data for three indicators—thyroid-stimulating hormone (TSH), free thyroxine (FTH), and fasting blood glucose—based on the test values from each blood collection time point, transforming discrete data points into continuous trajectory curves, thereby capturing the dynamic information of each indicator's changes with gestational age, including the direction, rate, and amplitude of change.
[0055] The longitudinal trajectory of these three indicators can reflect the synergistic relationship between the thyroid and blood glucose axis. Since thyroid hormones can affect glucose and lipid metabolism by influencing insulin resistance, and there is a physiological coupling between TSH, FT4, and fasting blood glucose, joint analysis of the trajectories of these three indicators helps to uncover multimodal synergistic information that cannot be reflected by a single indicator.
[0056] After constructing the longitudinal trajectory, it is necessary to determine the trajectory features of each sample. Trajectory features are numerical representations of the trajectory curve, used to transform the continuous trajectory curve into feature vectors usable for subsequent quantum potential clustering. Trajectory features include at least one of the following: slope, area under the curve, and peak-to-trough difference. The slope reflects the rate and direction of the indicator's change with gestational age; the area under the curve reflects the cumulative exposure level of the indicator throughout the entire early pregnancy period; and the peak-to-trough difference reflects the fluctuation range of the indicator in early pregnancy. By extracting these trajectory features, each sample is represented by a set of multidimensional feature vectors, providing a data foundation for subsequent quantum potential clustering using the samples as high-dimensional data points.
[0057] In some embodiments, determining the trajectory characteristics of each sample based on the three longitudinal change trajectories may include: pre-clustering the sample set, dividing all samples into multiple pre-cluster subtypes, and determining the pre-cluster subtype to which each sample belongs; based on the pre-cluster subtype to which each sample belongs, performing polynomial function fitting on the thyroid-stimulating hormone trajectory, free thyroxine trajectory, and fasting blood glucose trajectory of the same sample under the constraints of the corresponding pre-cluster subtype, wherein the coefficients of the polynomial function constitute the trajectory parameters of the sample, setting a subtype-adaptive hierarchical prior distribution for the trajectory parameters, so that samples belonging to the same pre-cluster subtype share the prior information of the subtype; sampling the hierarchical posterior distribution using the Markov chain Monte Carlo method to obtain the posterior distribution of the trajectory parameters of each sample, using the mean of the posterior distribution as the stable trajectory parameters of each sample, and using the variance of the posterior distribution as a measure of the uncertainty of parameter estimation; determining the trajectory characteristics of each sample based on the stable trajectory parameters of each sample, wherein the trajectory characteristics include at least one of the slope of change, area under the curve, and peak-to-trough difference.
[0058] First, the thyroid-stimulating hormone (TSH), free thyroxine (FTH), and fasting blood glucose (HG) values for each sample at a standardized time point are concatenated chronologically to form an initial feature vector. For example, the standardized time points are 8.0 weeks, 8.5 weeks, 9.0 weeks, ..., 12.0 weeks of gestation, with each time point containing three indicators, resulting in a 27-dimensional initial feature vector. After standardizing the initial feature vectors of all samples, K-means clustering is used for pre-clustering. After clustering, multiple pre-cluster subtypes are obtained, and the pre-cluster subtype to which each sample belongs is determined.
[0059] Subsequently, based on the pre-cluster subtype to which each sample belongs, polynomial function fitting is performed on the thyroid-stimulating hormone (TSH) trajectory, free thyroxine (FTH) trajectory, and fasting blood glucose trajectory of the same sample under the constraints of the corresponding pre-cluster subtype. For each index trajectory of each sample, a quadratic polynomial y(t) = β0 + β1t + β2t can be used. 2 A fitting process is performed, where t represents the gestational age at a standardized time point, and y(t) represents the measured value of the corresponding indicator. The polynomial coefficients β0, β1, and β2 constitute the trajectory parameters of this indicator for this sample. A total of nine coefficients from the three indicators constitute the trajectory parameter vector β for this sample. i .
[0060] Next, a hierarchical prior distribution is set for the trajectory parameters, so that samples belonging to the same pre-cluster subtype share the prior information of that subtype. For sample i belonging to the g-th pre-cluster subtype, its trajectory parameter β i It follows a normal distribution centered at the mean of this subtype: β i ∣(G i =g)~N(μ βg ,Σβg ). Wherein, μ βg Σ is the empirical mean of the trajectory parameters of all samples within this subtype. βg G represents the empirical covariance of the trajectory parameters of all samples within this subtype. i Let N be the subtype to which the i-th individual belongs, and let N() represent the normal distribution. The prior means of different pre-clustered subtypes are independent of each other, so that the trajectory parameter estimation of each subtype only borrows the population information of the samples within its own subtype, avoiding mutual interference between samples with different trajectory patterns, thereby stabilizing the estimation of trajectory parameters under small sample conditions.
[0061] Subsequently, the hierarchical posterior distribution is sampled using the Markov chain Monte Carlo method. A Markov chain is constructed, and samples are drawn from the posterior distribution using Gibbs sampling or the Metropolis-Hastings algorithm. During the sampling process, the Gelman-Rubin statistic is calculated to diagnose the convergence of multiple Markov chains; if the Gelman-Rubin statistic is greater than 1.1, the number of sampling iterations is increased until convergence. Finally, the trajectory parameters β of each sample are obtained. i The posterior distribution is used. The mean of the posterior distribution is used as the stable trajectory parameter for each sample, and the variance of the posterior distribution is used as a measure of the uncertainty of parameter estimation.
[0062] Finally, for each sample, trajectory features are determined based on its stable trajectory parameters. These trajectory features include at least one of the following: slope of change, area under the curve, and peak-to-trough difference.
[0063] Slope of change: Take the first derivative of the quadratic polynomial y′(t)=β1+2β2t, and take the average derivative value in the early pregnancy period or the derivative value at a specific time point as the slope of change, which reflects the rate and direction of change of the indicator with gestational age.
[0064] Area under the curve: the integral of the quadratic polynomial over the time interval [a,b] in early pregnancy. This reflects the cumulative exposure level of the indicator throughout the first trimester of pregnancy.
[0065] Peak-to-trough difference: For a quadratic polynomial, if β2 > 0, the parabola opens upwards, with the minimum value at -β1 / (2β2). Calculate the difference between the maximum and minimum values at the endpoints and extreme points of the interval. If β2 < 0, the parabola opens downwards, with the maximum value at -β1 / (2β2). Calculate the difference between the maximum and minimum values at the endpoints and extreme points of the interval. This difference reflects the fluctuation range of the indicator in early pregnancy.
[0066] Ultimately, each sample yields trajectory features for each of the three indicators, which are then concatenated to form the trajectory feature vector of that sample, providing a data foundation for subsequent quantum potential clustering of the samples as high-dimensional data points.
[0067] Optionally, the above determination of the trajectory characteristics of each sample based on the three longitudinal change trajectories may further include: calculating the stable trajectory parameter β of each sample. i The posterior variance Var(β) i Based on the posterior variance Var(β) i Set confidence weights for each sample: w i = exp(-ν·Var(β i )), ν is the adjustment parameter, w i ∈(0,1]; If the average confidence weight of all samples in a certain pre-cluster subtype is less than the first preset threshold, then the pre-cluster subtype is marked as an unstable subtype, and the quantum potential difference of the pre-cluster subtype is increased when calculating the quantum potential difference between the trajectory features of the pregnant woman to be predicted and the cluster centers of each risk subtype; If the posterior variance of a sample is greater than or equal to the second preset threshold and the confidence weight is less than the preset weight threshold, then the prior mean of the pre-cluster subtype to which the sample belongs is set as the substitute value of the stable trajectory parameter of the sample.
[0068] In this embodiment of the application, after obtaining the stable trajectory parameter β of each sample... i After the posterior distribution, in order to solve the problem of unstable and unreliable trajectory parameter estimation under small sample conditions, and to prevent individual noisy samples or unreliable subtypes from contaminating the subsequent clustering structure and risk prediction results, the reliability of trajectory parameter estimation can be further evaluated and corrected.
[0069] Specifically, due to the actual situation of clinical data collection, the number of blood samples and the time interval between blood samples vary greatly among different pregnant women. Some samples may only have two blood sample records, resulting in a wide posterior distribution and greater estimation uncertainty for their trajectory parameters. If the trajectory parameters of all samples are used directly for subsequent quantum potential clustering without differentiation, these unreliable estimates may distort the calculation of cluster centers, thereby affecting the accuracy of risk subtype classification. Therefore, it is necessary to quantitatively assess the reliability of trajectory parameter estimation and take graded processing measures accordingly.
[0070] First, calculate the stable trajectory parameter β for each sample. i The posterior variance Var(β) i ). Due to β i The vector represents the polynomial coefficients of three indicators (thyroid-stimulating hormone, free thyroxine, and fasting blood glucose). Its posterior variance is also a vector, reflecting the uncertainty of each coefficient estimate. A larger posterior variance indicates a less reliable estimation of the trajectory parameters for that sample, potentially due to fewer blood collection points, higher detection noise, or a trajectory shape deviating from its subtype.
[0071] Then, based on the posterior variance Var(β)i Set confidence weights for each sample: w i =exp(-ν·Var(β i Where ν is an adjustment parameter used to control the rate of decay of the weights' subsequent variance; the larger ν is, the faster the weights decay. i For each ∈(0,1], the larger the posterior variance, the smaller the confidence weight, indicating that the trajectory parameter estimation of the sample is less reliable. Optionally, ν can be set empirically or determined through cross-validation, for example, ν=1 or ν=0.5.
[0072] Next, a subtype-level stability assessment is performed on the overall reliability of trajectory parameter estimation for all samples within each pre-cluster subtype. For each pre-cluster subtype, the average confidence weight of all samples within that subtype is calculated. If the average confidence weight of all samples in a pre-cluster subtype is less than a first preset threshold (e.g., the first preset threshold is set to 0.5), it indicates that the overall reliability of trajectory parameter estimation for samples within that subtype is insufficient, and the pre-cluster subtype is marked as an unstable subtype. When subsequently calculating the quantum potential difference between the trajectory characteristics of the pregnant woman to be predicted and the cluster centers of each risk subtype, the quantum potential difference is increased for categories marked as unstable subtypes. For example, the quantum potential difference of this subtype can be multiplied by a penalty coefficient greater than 1, or a positive bias can be directly added, making this subtype disadvantaged in matching, thereby reducing its probability of being selected as a predicted risk subtype, thus avoiding misjudgment due to the unreliability of the subtype itself.
[0073] Finally, the stable trajectory parameter estimates for individual samples undergo sample-level extreme unreliability processing. If the posterior variance of a sample is greater than or equal to a second preset threshold (e.g., the second preset threshold is set to the upper quartile of the posterior variance of all samples), and the confidence weight of that sample is less than a preset weight threshold (e.g., the preset weight threshold is set to 0.3), it indicates that the trajectory parameter estimates for that sample are unreliable, and its estimated value may deviate significantly from the true trajectory. In this case, the prior mean μ of the pre-cluster subtype to which the sample belongs is... βg This serves as a substitute value for the stable trajectory parameters of the sample. That is, the unstable estimation result of the sample itself is discarded, and the average level of its subtype is used to represent the trajectory parameters of the sample. This preserves the sample's participation in subsequent clustering while avoiding the interference of its unreliable estimates on cluster centers and risk subtype classification.
[0074] In this step, under small sample conditions, the uncertainty of each sample trajectory parameter estimation is quantified by posterior variance, and confidence weights are set accordingly. The reliability of the entire subtype is evaluated by the average weight at the subtype level, and unreliable subtypes are weighted down in subsequent matching. Extremely unreliable samples are replaced at the sample level to prevent individual noisy samples from contaminating the overall clustering structure. This improves the accuracy and robustness of subsequent quantum potential clustering and risk prediction.
[0075] Optionally, since the blood sampling time points of different pregnant women are not aligned (i.e., the number of blood samplings, the intervals between samplings, and the specific gestational weeks vary), directly constructing longitudinal trajectories of thyroid-stimulating hormone (TSH), free thyroxine (FTH), and fasting blood glucose using the original blood sampling time points would place the three trajectories on different time coordinate systems for different pregnant women, making it impossible to compare the synergistic changes of the three indicators on the same time axis. Therefore, it is necessary to adaptively align the blood sampling time points of each sample, mapping the three trajectories of all samples to a unified standard time point, providing a consistent data foundation for the subsequent construction of the three trajectories and the extraction of trajectory features.
[0076] Therefore, prior to step 102, the aforementioned quantum analogy-based gestational diabetes risk prediction method may further include: adaptively aligning the blood sampling time points of each sample to obtain aligned detection values for each sample at a unified standard time point. Correspondingly, the detection values at each blood sampling time point in step 102 are the adaptively aligned detection values.
[0077] The adaptive alignment can include: constructing a time-disaligned state-space model with the actual blood collection time as the observation time and a unified standard time as the potential state. The state vector of the state-space model includes a thyroid-stimulating hormone trajectory component, a free thyroxine trajectory component, and a time difference variable. The time difference variable describes the actual time interval between two adjacent blood collections. The state transition matrix of the state-space model is adaptively adjusted as the time interval between adjacent blood collections changes. A Kalman filter algorithm is used to filter and estimate the state-space model: in the prediction step, the state transition matrix is adjusted according to the current value of the time difference variable to predict the current state; in the update step, the predicted state is corrected according to the actual detection value, and the time difference variable is updated according to the deviation between the actual blood collection time and the predicted blood collection time; after filtering, the posterior state estimates from each actual blood collection time are predicted to each unified standard time to obtain the aligned detection values.
[0078] For example, the evolution law of the time difference variable is: δ k = γ1·δ k-1 + γ2·δ k-2 + ξ k Where γ1 and γ2 are autoregressive coefficients, ξ kTo drive noise, δ k Let γ1 be the time interval between the k-th blood collection and the (k-1)-th blood collection. 10 + λ1·(TSH k - TSH normal ), γ2 = γ 20 + λ2·(FT4 k - FT4 normal ), where γ 10 and γ 20 Based on the autoregressive coefficient, TSH k and FT4 k TSH is an estimate of the current physiological state. normal and FT4 normal These are reference values within the normal range, and λ1 and λ2 are preset modulation coefficients.
[0079] Specifically, a time-disaligned state-space model is first constructed, using the actual blood collection time as the observation time and a unified standard time as the potential state. The state vector of the state-space model includes a thyroid-stimulating hormone (TSH) trajectory component, a free thyroxine (FTH) trajectory component, and a time difference variable. Specifically, the state vector is defined as: x k = [s TSH (t k ), v TSH (t k ), a TSH (t k ), s FT4 (t k ), v FT4 (t k ), a FT4 (t k ), δ k ] T Among them, s TSH (t k ) and s FT4 (t k ) represent the values of thyroid-stimulating hormone (TSH) and free thyroxine (FTH) on the potential true trajectory, respectively. TSH (t k ) and v FT4 (t k Let a be their respective first-order rates of change. TSH (t k ) and a FT4 (t k ) represents their respective second-order rates of change, δ k Let δ be the time difference variable. k =t k -t k-1 , t kt represents the actual gestational age at the kth blood collection. k-1 This represents the actual gestational age at the (k-1)th blood sample. The time difference variable describes the actual time interval between two adjacent blood samples. The state transition matrix F(δ) k F(δ) is a block diagonal matrix. k )=diag(B(δ k ), B(δ k ), φ(δ k )), where B(δ k ) is a 3×3 submatrix. ,φ(δ k Let δ be the self-transition function of the time difference variable. This state transition matrix makes the trajectory state transitions of thyroid-stimulating hormone (TSH) and free thyroxine (FTH) change with the time interval between adjacent blood sampling. k It adapts to changes in [something]. The observation equation is: y k = H·x k + η k , where y k Let H be the actual detected value at the k-th observation time point, H be the observation matrix, and η be the actual detected value at the k-th observation time point. k To observe noise.
[0080] Secondly, the time difference variable has an independent evolutionary pattern, which is controlled by a second-order autoregressive model: δ k =γ1·δ k-1 + γ2·δ k-2 + ξ k This second-order autoregressive model allows the time difference variable to not only serve as a regulating parameter for the state transition matrix but also as an independent state component with its own dynamic characteristics, participating in state evolution. When the blood collection intervals of pregnant women exhibit a regular pattern, the model captures this pattern and uses it to predict future blood collection intervals; when the blood collection intervals of pregnant women exhibit random fluctuations, the prediction error is mitigated by driving the noise ξ. k Absorption enables the filter to adaptively handle arbitrary irregular blood sampling time patterns.
[0081] Furthermore, the autoregressive coefficients are modulated by the physiological states of thyroid-stimulating hormone (TSH) and free thyroxine (FTH): γ1 = γ 10 + λ1·(TSH k - TSH normal ), γ2 = γ 20 + λ2·(FT4 k - FT4 normal When thyroid-stimulating hormone deviates from the normal range, γ1 deviates from γ. 10 The first-order autoregressive strength of the time difference variable changes; when free thyroxine deviates from the normal range, γ2 deviates from γ 20The second-order autoregressive strength of the time difference variable changes. This forms a causal transmission chain from physiological state to blood collection behavior and then to alignment accuracy: abnormal physiological state changes the evolution trajectory of the time difference variable through changes in the autoregressive coefficient, the evolution deviation of the time difference variable further leads to the calculation deviation of the state transition matrix of the Kalman filter prediction step, and finally affects the accuracy of the aligned detection value.
[0082] Subsequently, the Kalman filter algorithm is used to perform filtered estimation on the state-space model. The filtering process includes a prediction step and an update step. In the prediction step, the posterior state estimate from the previous time point is used... Using the state transition matrix Predicting the prior state estimate at the current time point The state transition matrix is dynamically calculated based on the current estimated value of the time difference variable, allowing the state prediction step size to adaptively match the actual blood collection time interval. The formula for the prediction step is: , , where P is the prior estimate covariance and Q is the process noise covariance.
[0083] Obtain the actual detection value y at the current time point. k Then, the process proceeds to the update step. In the update step, the prior state estimate is corrected based on the actual detection values to obtain the posterior state estimate for the current time point. The formula for the update step is: , , K k Let be the Kalman gain, R be the observation noise covariance, H be the observation matrix, and I be the identity matrix. The observation matrix H is used to extract the observable components from the state vector x. k The first component is the potential true trajectory value s of thyroid-stimulating hormone. TSH The fourth component is the potential true trajectory value s of free thyroxine. FT4 Therefore, the observation matrix H is a 2×7 matrix: Meanwhile, the time difference variable is updated based on the deviation between the actual blood collection time and the predicted blood collection time: , This represents the row vector in the Kalman gain matrix corresponding to the time difference variable component. This update uses the deviation between the actual observation time and the predicted time to correct the estimated value of the time difference variable, achieving online adaptive tracking of the time difference variable and the actual blood collection time pattern.
[0084] After filtering, predictions are made from the posterior state estimates of each actual blood collection time point to various unified standard time points. Specifically, a unified standard time point sequence t={t1, t2,…, t…} is defined. MThe unified standard time points are evenly distributed at half-week intervals. For each unified standard time point t... j Based on the state vector obtained by filtering estimation, the state transition matrix is used to predict the state from the most recent actual observation point to the next state. , t k Let t be the distance j The most recent actual blood collection time point, For the posterior state estimate at this time point, F(t) j - t k ) is based on the time interval (t) j -t k Calculate the state transition matrix. Take... The positional components of thyroid-stimulating hormone (TSH) and free thyroxine (FTH) were used as the basis for determining the positional components of the sample at the standardized time point t. j Aligned detection value on t. j Backward prediction is used when the time point is earlier than the first actual blood collection time; when t j Forward prediction was used after the last actual blood collection time point. Ultimately, each sample obtained aligned thyroid-stimulating hormone, free thyroxine, and fasting blood glucose values at a unified standard time point, providing a time-consistent data foundation for constructing subsequent longitudinal change trajectories.
[0085] Step 103: The trajectory features of each sample are used as high-dimensional data points. The quantum potential energy value of each sample is calculated and a quantum potential field is constructed. The local minimum value of the quantum potential field is used as the initial clustering center for clustering. The quantum barrier crossing probability of each sample in the quantum potential field is calculated based on the initial clustering result. Samples with a quantum barrier crossing probability greater than the threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering result is iteratively optimized to obtain the final clustering result of each sample.
[0086] For example, the formula for calculating the quantum potential energy is: Φ(x i ) = Σ j exp(-||x i - x j || 2 / 2σ 2 ), x i and x j Let σ be the trajectory features of the i-th and j-th samples, and σ be the scale parameter. i - x j || 2 The squared Euclidean distance between two sample points is given; the scale parameter σ is determined by calculating the pairwise Euclidean distances between all sample trajectory features in the sample set, and taking the median of all Euclidean distances as the initial value of σ.
[0087] The probability of crossing a quantum barrier is calculated as follows: for sample point x i From its current cluster center c a Migrate to target cluster center c b Barrier crossing probability Pr(x) i : c a →c b ) = exp(-ΔΦ / T'), where ΔΦ is the potential energy difference required for a sample point to travel from its current location to the target cluster center, ΔΦ = Φ(c b ) - Φ(x i If ΔΦ≤0, then Pr=1, and T' is the simulated annealing temperature parameter. During the iterative optimization process, the simulated annealing temperature parameter T' gradually decreases.
[0088] In this step, the trajectory features of each sample are used as high-dimensional data points, and the samples are clustered using a quantum potential clustering algorithm to obtain the final clustering results for each sample.
[0089] The first step is to calculate the quantum potential energy value of each sample and construct the quantum potential field. The trajectory feature vector of each sample in the sample set is taken as a data point in a high-dimensional space, hereinafter collectively referred to as a sample point. For any two samples i and j, through... Calculate the quantum potential energy value of each sample point, x i and x j Let be the trajectory feature vectors of the i-th and j-th samples, respectively, and σ be the scale parameter. The quantum potential energy is the square of the Euclidean distance between two sample points. The physical meaning of this formula is that the quantum potential energy of each sample point is equal to the sum of the potential energy contributions of all other sample points to that sample point, with the contribution decreasing exponentially with increasing distance. Therefore, the denser the sample points, the higher the quantum potential energy; the sparser the sample points, the lower the quantum potential energy. The quantum potential energy is used to simulate the distribution characteristics of quantum particles in a potential field. The quantum potential energy of each sample point reflects the density distribution of that sample point in its neighborhood. The scale parameter σ can be determined by calculating the pairwise Euclidean distances between all sample trajectory features in the sample set, and taking the median of all Euclidean distances as the initial value of σ. The quantum potential energy values of all sample points are then mapped to a higher-dimensional space to form a quantum potential field.
[0090] The second step involves determining initial cluster centers and performing initial clustering based on the quantum potential energy and quantum potential field of each sample. For each sample point, if its quantum potential energy value is less than the quantum potential energy values of all its neighboring sample points, then this sample point is a local minimum. The local minimum points of the quantum potential field are determined as the initial cluster centers. Each local minimum point represents the center of a data-dense region, i.e., a potential cluster center. After determining the initial cluster centers, each sample point is assigned to the nearest initial cluster center, obtaining the initial clustering result. Specifically, for each sample point x... i Calculate the Euclidean distance between the sample point and each initial cluster center, and assign the sample point to the cluster center with the smallest Euclidean distance. After traversing all sample points, the initial clustering results for each sample point are obtained.
[0091] The third step is to calculate the quantum barrier crossing probability for each sample in the quantum potential field. For sample point x... i Its current cluster center is c. a The target cluster center is c b Then from c a Migrate to c b The quantum barrier crossing probability is: Pr(x) i :c a →c b )=exp(-ΔΦ / T'), ΔΦ=Φ(c b )−Φ(x i Pr represents the potential energy difference required for a sample point to migrate from its current position to the target cluster center. If ΔΦ ≤ 0, then Pr = 1, indicating that the sample point can unconditionally migrate to the target cluster center. The physical meaning of this formula is: a sample point needs to overcome a certain potential energy difference to migrate from its current cluster center to the target cluster center; the larger the potential energy difference, the lower the migration probability. The higher the simulated annealing temperature parameter T', the easier it is for the sample point to overcome the potential energy difference and migrate, which is beneficial for global exploration; the lower the temperature parameter T, the more likely the sample point is to remain in the current cluster center, which is beneficial for local convergence.
[0092] The fourth step is to iteratively optimize the initial clustering results to obtain the final clustering results for each sample. For each sample point x... i Calculate the quantum barrier crossing probability of its migration to all other cluster centers. If there exists at least one target cluster center c b , so that Pr(x) i :c a →c b If the value is greater than the preset threshold, then the sample point x will be... i From the current cluster center c a Migrate to the target cluster center c with the highest probability of crossing the quantum barrier bAfter traversing all sample points, one round of clustering result updates is completed. Steps three and four are repeated, with the temperature parameter T' gradually decreasing according to a preset annealing plan in each iteration, for example, T... t+1 =α×T t ', where α is the attenuation coefficient, ranging from 0.9 to 0.99. In each iteration, the quantum barrier crossing probability of each sample point is recalculated, and migration is performed based on the probability. Iteration stops when any of the following convergence conditions are met: the cluster affiliation of all sample points no longer changes; or the preset maximum number of iterations is reached; or the simulated return temperature parameter T' drops below the preset minimum value. Finally, the final clustering results for each sample are obtained.
[0093] This step performs cluster analysis on all samples in the sample set using quantum potential energy values and quantum potential fields, automatically classifying samples with similar longitudinal thyroid-glucose variation patterns into multiple risk subtypes. Specifically, after step 102, each sample is represented as a set of multidimensional trajectory feature vectors, which comprehensively reflect the longitudinal variation trends of three indicators—thyroid-stimulating hormone, free thyroxine, and fasting blood glucose—in early pregnancy. Using the trajectory features of each sample as data points in a high-dimensional space, the density distribution of data points in this high-dimensional space can be characterized by calculating quantum potential energy values and constructing a quantum potential field. Regions with dense data points form potential energy minima, corresponding to potential cluster centers; regions with sparse data points form regions with higher potential energy. Using the local minima of the quantum potential field as initial cluster centers for clustering, initial clustering results can be obtained.
[0094] This embodiment uses the quantum potential field to naturally characterize the data distribution, and the cluster centers are automatically determined by the local minimum of the potential field, without the need to pre-specify the number of clusters. This overcomes the shortcomings of classical clustering algorithms, which require manual setting of the number of clusters. This embodiment also uses the quantum barrier crossing mechanism to allow sample points to migrate to better cluster centers with a certain probability, overcoming the potential energy difference. This enables the clustering results to escape local optima and approach the global optimum, thus overcoming the shortcomings of classical clustering algorithms, which are sensitive to the initial centers and prone to getting trapped in local optima.
[0095] It should be noted that the quantum potential clustering in this step is different from the pre-clustering in step 102: the pre-clustering is a coarse grouping of the initial feature vectors, the purpose of which is to provide subtype constraints for polynomial fitting and improve the stability of trajectory parameter estimation; while the quantum potential clustering in this step is a fine clustering of stable trajectory features, the purpose of which is to discover the risk subtype structure that naturally exists in the samples and provide a classification basis for risk prediction.
[0096] Step 104: Determine the risk subtype based on the final clustering results of each sample, and determine the risk label of the risk subtype based on the gestational diabetes positivity rate of samples within that risk subtype.
[0097] In this step, after obtaining the final clustering results for each sample, a risk subtype is determined based on the final clustering results, and a risk label for that subtype is determined based on the gestational diabetes positivity rate of samples within that risk subtype. Simultaneously, for any sample point, if the quantum potential difference between that sample point and all cluster centers is greater than a preset outlier threshold, that sample point is marked as an outlier and is not assigned a risk subtype label.
[0098] For example, after iterative optimization using quantum potential clustering, all samples in the sample set are divided into multiple final clusters. Each final cluster represents a group of samples with similar longitudinal thyroid-glucose variation patterns. Each final cluster is identified as a risk subtype. For the g-th final cluster, it is identified as the g-th risk subtype, and all samples in this cluster belong to this risk subtype.
[0099] For each risk subtype, the gestational diabetes mellitus (GDM) diagnostic label is calculated for all samples within that subtype. The GDM diagnostic label is derived from the oral glucose tolerance test results during mid-pregnancy; a value of 1 is assigned to the presence of GDM, and 0 is assigned to the absence of GDM. The positivity rate of GDM for all samples within that risk subtype is calculated. The positivity rate g is equal to the number of samples with a diagnostic label of 1 within that subtype divided by the total positivity rate g of the total number of samples within that subtype. This calculated positivity rate is used as the risk label for that risk subtype. For example, if there are 50 samples in a certain risk subtype, and 15 of them are diagnosed with GDM, then the positivity rate for that risk subtype is 30%, and the risk label for that risk subtype is 30%. This risk label is used in subsequent risk prediction for pregnant women to be assessed, representing the probability of developing GDM corresponding to the risk subtype to which the pregnant woman belongs.
[0100] In this embodiment, the unsupervised clustering results of quantum potential clustering are transformed into clinically meaningful risk subtypes. Clustering itself only provides the grouping structure of samples but does not assign specific clinical meaning to each group. By calculating the gestational diabetes positivity rate within each cluster, each cluster is associated with the risk of gestational diabetes, giving the clustering results interpretable clinical significance. A higher positivity rate in a subtype indicates a stronger association between the longitudinal thyroid-glucose variation pattern and gestational diabetes within that subtype, and a higher risk label for that subtype. Based on this, a matching basis can be provided for subsequent risk prediction of pregnant women. When the trajectory characteristics of a pregnant woman to be predicted are matched with the cluster centers of each risk subtype, the risk label corresponding to the matched risk subtype is the probability of gestational diabetes risk for that pregnant woman. Therefore, the accuracy of the risk label directly affects the reliability of the final prediction result.
[0101] Furthermore, outlier identification can be performed before or simultaneously with risk subtype determination. Samples marked as outliers are not included in the risk subtype determination. That is, only samples not marked as outliers are assigned to a risk subtype based on their final cluster affiliation.
[0102] The process of outlier identification is as follows: for any sample point x in the sample set... i Calculate the quantum potential difference between the sample point and all cluster centers. The quantum potential difference is the difference between the quantum potential energy value of the sample point and the quantum potential energy value of the cluster center, or the squared Euclidean distance between the sample point and the cluster center. If the quantum potential difference between the sample point and all cluster centers is greater than a preset outlier threshold, it indicates that the sample point is far from all cluster centers and does not belong to the typical pattern represented by any cluster. The sample point is then marked as an outlier.
[0103] The preset outlier threshold can be determined based on the distribution of the quantum potential difference between all sample points and their respective cluster centers in the sample set. For example, the 95th percentile of the quantum potential difference between all sample points and their respective cluster centers can be used as the preset outlier threshold; or the mean of the quantum potential difference between all sample points and their respective cluster centers plus twice the standard deviation can be used as the preset outlier threshold. Samples marked as outliers are not assigned a risk subtype label, meaning that these samples do not participate in subsequent risk label statistics, nor are they considered as candidate subtypes for subsequent matching of pregnant women to be predicted.
[0104] In this embodiment, outlier identification can eliminate the interference of atypical samples on risk subtype classification and risk label statistics. In actual clinical data, there may be individual samples whose thyroid-glucose variation patterns do not match any of the known risk subtypes. These samples may be due to detection errors, special physiological conditions, or rare pathological conditions. If not identified, these outliers may distort the calculation of cluster centers or skew the statistical results of risk labels. By setting a preset outlier threshold, marking these samples as outliers and excluding them from risk subtype label determination can improve the accuracy and robustness of risk subtype classification and risk label statistics. At the same time, the marking of outliers itself also has clinical significance, such as prompting doctors to pay special attention to this type of pregnant woman, rather than simply applying the statistical conclusions of a certain risk subtype.
[0105] Step 105: Construct the trajectory feature to be predicted based on the thyroid index test value and fasting blood glucose test value of the pregnant woman to be predicted, calculate the quantum potential difference between the trajectory feature to be predicted and the cluster center of each risk subtype, determine the risk subtype with the smallest quantum potential difference as the predicted risk subtype of the pregnant woman to be predicted, and determine the probability of gestational diabetes risk of the pregnant woman to be predicted based on the risk label of the risk subtype.
[0106] Specifically, thyroid hormone levels and fasting blood glucose levels are obtained from at least two blood sampling points during early pregnancy in the pregnant woman to be predicted. The thyroid hormone levels include at least thyroid-stimulating hormone (TSH) and free thyroxine (FT4) levels, and the fasting blood glucose level is the fasting blood glucose concentration. Each time point corresponds to the gestational week of the blood sampling. For example, a pregnant woman to be predicted might have blood drawn at 8.1 weeks of gestation, with TSH = 2.5 mIU / L, FT4 = 14.2 pmol / L, and fasting blood glucose = 4.6 mmol / L; and blood drawn again at 10.3 weeks of gestation, with TSH = 2.9 mIU / L, FT4 = 13.5 pmol / L, and fasting blood glucose = 4.9 mmol / L.
[0107] Following the same data preprocessing methods as the training samples, missing value imputation and outlier handling were performed on the aforementioned detection values. Then, based on the detection values from the two blood sampling time points, longitudinal trajectory changes in thyroid-stimulating hormone (TSH), free thyroxine (FTH), and fasting blood glucose were constructed for the pregnant woman to be predicted. Specifically, for each indicator, with gestational age at blood sampling as the independent variable and the detection value as the dependent variable, linear fitting or quadratic polynomial fitting was used to obtain the trajectory curve of that indicator. For example, for TSH, the slope obtained by linear fitting at two time points (8.1, 2.5) and (10.3, 2.9) was approximately 0.18 mIU / L / week; for FT4, the slope obtained by linear fitting at two time points (8.1, 14.2) and (10.3, 13.5) was approximately -0.32 pmol / L / week; and for fasting blood glucose, the slope obtained by linear fitting at two time points (8.1, 4.6) and (10.3, 4.9) was approximately 0.14 mmol / L / week.
[0108] Next, trajectory features are extracted from the trajectory curves of the three indicators. These features include at least one of the following: slope of change, area under the curve, and peak-to-trough difference. Taking the slope of change as an example, the trajectory feature vector of the pregnant woman to be predicted is [0.18, -0.32, 0.14]. If the area under the curve is also included, the area under the curve of each of the three indicators is calculated in the early pregnancy time interval, and then concatenated to obtain a higher-dimensional trajectory feature vector.
[0109] The trajectory feature vector of the pregnant woman to be predicted is used as a new data point in a high-dimensional space. For each risk subtype obtained during the training phase, its cluster center is obtained. The quantum potential difference between the trajectory feature vector to be predicted and the cluster center of each risk subtype is calculated. The quantum potential difference can be the square of the Euclidean distance or the difference in quantum potential energy values. In this embodiment, the square of the Euclidean distance is used as the quantum potential difference, that is, for the g-th risk subtype, its quantum potential difference is: xnew Let c be the trajectory feature vector of the pregnant woman to be predicted. g It serves as the cluster center for the g-th risk subtype.
[0110] After calculating the quantum potential difference between the pregnant woman to be predicted and each risk subtype, the risk subtype with the smallest quantum potential difference is determined as the predicted risk subtype of the pregnant woman to be predicted. For example, assuming three risk subtypes are obtained during the training phase, with cluster centers c1, c2, and c3 respectively, and the calculated quantum potential differences are D1=0.52, D2=1.20, and D3=2.05 respectively, then the smallest quantum potential difference is D1=0.52, corresponding to risk subtype 1. Therefore, the predicted risk subtype of the pregnant woman to be predicted is determined as risk subtype 1.
[0111] Each risk subtype has a risk label determined during the training phase based on the gestational diabetes positivity rate of its samples. For example, if risk subtype 1 contains 60 samples, and 21 of them are diagnosed with gestational diabetes, then the risk label for this subtype is 35%. After matching the pregnant woman to be predicted to risk subtype 1, the risk label of 35% for that subtype is output as the probability of gestational diabetes for that pregnant woman. That is, the probability of that pregnant woman developing gestational diabetes is 35%.
[0112] Taking a pregnant woman to be predicted as an example: TSH, FT4, and fasting blood glucose were measured at 8.1 weeks and 10.3 weeks of pregnancy, and a trajectory feature vector was constructed [0.18, -0.32, 0.14]. The quantum potential difference was calculated with the cluster centers of the three risk subtypes, resulting in [0.52, 1.20, 2.05]. The minimum quantum potential difference was 0.52, corresponding to risk subtype 1. The risk label of risk subtype 1 was 35%. The probability of gestational diabetes for this pregnant woman was output as 35%.
[0113] This application utilizes a risk subtype system constructed during the training phase to rapidly and accurately predict the risk of individual pregnant women. By calculating the quantum potential difference between the predicted trajectory features and the cluster centers of each risk subtype, the pregnant woman is matched to the most similar risk subtype, thus classifying her into a group with similar longitudinal thyroid-glucose variation patterns. Since the risk label for each risk subtype is based on the statistical analysis of the gestational diabetes positivity rate of a large number of samples within that subtype, the risk label of the subtype after matching the pregnant woman to the corresponding subtype can serve as an individualized risk probability estimate for that pregnant woman. This method can achieve immediate prediction of new samples without retraining the model, and the prediction results have clear clinical interpretability. Classifying a pregnant woman into a certain risk subtype means that her thyroid-glucose variation pattern is highly similar to that of a sample group diagnosed with gestational diabetes within that subtype, thus indicating the corresponding risk level.
[0114] The embodiments of this application have the following beneficial effects:
[0115] (1) By constructing longitudinal change trajectories containing three indicators: thyroid-stimulating hormone, free thyroxine and fasting blood glucose, and jointly fitting the three trajectories, and then using adaptive alignment to map the trajectories of different pregnant women to a unified standard time point, since the longitudinal change trajectory can capture the dynamic information such as the direction, rate and fluctuation amplitude of each indicator as the gestational week changes, the adaptive alignment solves the problem of inconsistent time axis caused by the misalignment of blood collection time points of different pregnant women, and the joint fitting explores the thyroid-blood glucose synergistic change information that cannot be reflected by a single indicator, thus improving the accuracy of gestational diabetes risk prediction.
[0116] (2) The trajectory features of each sample are used as high-dimensional data points. The quantum potential energy value is calculated and a quantum potential field is constructed. The local minimum value of the quantum potential field is used as the initial cluster center. The quantum barrier crossing probability allows the sample to migrate between cluster centers to iteratively optimize the clustering result. Since the quantum potential field can naturally characterize the data distribution and the cluster center is automatically determined by the local minimum value of the potential field without pre-specifying the number of clusters, the quantum barrier crossing mechanism allows the sample to overcome the potential energy difference with a certain probability and migrate to a better cluster center, thereby making the clustering result jump out of the local optimum. Therefore, it can overcome the shortcomings of the classical clustering algorithm that is sensitive to the initial center and easily falls into the local optimum, thereby improving the stability of risk subtype division.
[0117] (3) The sample set is pre-clustered and a hierarchical prior distribution of the trajectory parameters is set for subtype adaptation. The Markov chain Monte Carlo method is used to sample the posterior distribution. The confidence weight is set for each sample based on the posterior variance. Subtypes with low average confidence are marked as unstable subtypes and their quantum potential difference is increased during matching. For extremely unreliable samples, the subtype prior mean is used to replace their stable trajectory parameters. Since the hierarchical prior allows samples within the same subtype to share group information, the individual estimation is constrained by the group information. The confidence weight makes the reliable trajectory estimation samples have a higher influence. The unstable subtype labeling and the replacement of extremely unreliable samples prevent noisy samples from polluting the clustering structure. Therefore, it is possible to stabilize the trajectory parameter estimation and ensure the robustness of risk prediction under small sample conditions.
[0118] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0119] Corresponding to the quantum analogy-based gestational diabetes risk prediction method described in the above embodiments, Figure 2 The diagram shows a structural block diagram of a gestational diabetes risk prediction device based on quantum analogy provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0120] See Figure 2 This application provides a quantum analogy-based gestational diabetes risk prediction device, which may include a sample acquisition module 201, a trajectory feature determination module 202, a clustering module 203, a subtype determination module 204, and a prediction module 205.
[0121] The sample acquisition module 201 is used to acquire a sample set, in which each sample contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early stages of pregnancy, as well as a gestational diabetes diagnosis label in the mid-trimester.
[0122] The trajectory feature determination module 202 is used to construct the longitudinal change trajectory of thyroid-stimulating hormone, free thyroxine and fasting blood glucose for each sample based on the detection values at each blood collection time point, and to determine the trajectory features of each sample based on the three longitudinal change trajectories.
[0123] The clustering module 203 is used to take the trajectory features of each sample as high-dimensional data points, calculate the quantum potential energy value of each sample and construct a quantum potential field, and use the local minimum value of the quantum potential field as the initial clustering center for clustering. Based on the initial clustering results, the quantum barrier crossing probability of each sample in the quantum potential field is calculated. Samples with a quantum barrier crossing probability greater than a threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering results are iteratively optimized to obtain the final clustering results of each sample.
[0124] The subtype determination module 204 is used to determine the risk subtype based on the final clustering results of each sample, and to determine the risk label of the risk subtype based on the gestational diabetes positivity rate of samples within the risk subtype.
[0125] The prediction module 205 is used to construct a trajectory feature to be predicted based on the thyroid index test value and fasting blood glucose test value of the pregnant woman to be predicted, calculate the quantum potential difference between the trajectory feature to be predicted and the cluster center of each risk subtype, determine the risk subtype with the smallest quantum potential difference as the predicted risk subtype of the pregnant woman to be predicted, and determine the probability of gestational diabetes risk of the pregnant woman to be predicted based on the risk label of the risk subtype.
[0126] Optionally, the device further includes an adaptive alignment module, which is used to adaptively align the blood collection time points of each sample to obtain aligned detection values of each sample at a unified standard time point. Adaptive alignment includes: constructing a time-unaligned state-space model with the actual blood collection time point as the observation time and the unified standard time point as the potential state. The state vector of the state-space model includes a thyroid-stimulating hormone trajectory component, a free thyroxine trajectory component, and a time difference variable. The time difference variable describes the actual time interval between two adjacent blood collections. The state transition matrix of the state-space model is adaptively adjusted according to the change in the time interval between adjacent blood collections. A Kalman filter algorithm is used to filter and estimate the state-space model: in the prediction step, the state transition matrix is adjusted according to the current value of the time difference variable to predict the current state; in the update step, the predicted state is corrected according to the actual detection value, and the time difference variable is updated according to the deviation between the actual blood collection time point and the predicted blood collection time point; after filtering, the posterior state estimate from each actual blood collection time point is predicted to each unified standard time point to obtain aligned detection values.
[0127] Alternatively, the evolution law of the time difference variable is: δ k = γ1·δ k-1 + γ2·δ k-2 + ξ k Where γ1 and γ2 are autoregressive coefficients, ξ k To drive noise, δ k γ1 = γ, where γ is the time interval between the k-th blood collection and the (k-1)-th blood collection. 10 + λ1·(TSH k - TSH normal ), γ2 = γ 20 + λ2·(FT4 k - FT4 normal ), where γ 10 and γ 20 Based on the autoregressive coefficient, TSH k and FT4 k TSH is an estimate of the current physiological state. normal and FT4 normal These are reference values within the normal range, and λ1 and λ2 are preset modulation coefficients.
[0128] Optionally, the trajectory feature determination module 202 is specifically used for: pre-clustering the sample set, dividing all samples into multiple pre-cluster subtypes, and determining the pre-cluster subtype to which each sample belongs; based on the pre-cluster subtype to which each sample belongs, performing polynomial function fitting on the thyroid-stimulating hormone trajectory, free thyroxine trajectory, and fasting blood glucose trajectory of the same sample under the constraints of the corresponding pre-cluster subtype, the coefficients of the polynomial function constituting the trajectory parameters of the sample, setting a subtype-adaptive hierarchical prior distribution for the trajectory parameters, so that samples belonging to the same pre-cluster subtype share the prior information of the subtype; sampling the hierarchical posterior distribution using the Markov chain Monte Carlo method to obtain the posterior distribution of the trajectory parameters of each sample, using the mean of the posterior distribution as the stable trajectory parameters of each sample, and using the variance of the posterior distribution as a measure of the uncertainty of parameter estimation; determining the trajectory features of each sample based on the stable trajectory parameters of each sample, the trajectory features including at least one of the following: slope of change, area under the curve, and peak-to-trough difference.
[0129] Optionally, the trajectory feature determination module 202 is also used to: calculate the stable trajectory parameter β for each sample. i The posterior variance Var(β) i Based on the posterior variance Var(β) i Set confidence weights for each sample: w i = exp(-ν·Var(β i )), ν is the adjustment parameter, w i ∈(0,1]; If the average confidence weight of all samples in a certain pre-cluster subtype is less than the first preset threshold, then the pre-cluster subtype is marked as an unstable subtype, and the quantum potential difference of the pre-cluster subtype is increased when calculating the quantum potential difference between the trajectory features of the pregnant woman to be predicted and the cluster centers of each risk subtype; If the posterior variance of a sample is greater than or equal to the second preset threshold and the confidence weight is less than the preset weight threshold, then the prior mean of the pre-cluster subtype to which the sample belongs is set as the substitute value of the stable trajectory parameter of the sample.
[0130] Optionally, the formula for calculating the quantum potential energy is: Φ(x i ) = Σ j exp(-||x i - x j || 2 / 2σ 2 ), x i and x j Let σ be the trajectory features of the i-th and j-th samples, and σ be the scale parameter. i - x j || 2The squared Euclidean distance between two sample points is given; the scale parameter σ is determined by calculating the pairwise Euclidean distances between all sample trajectory features in the sample set, and taking the median of all Euclidean distances as the initial value of σ.
[0131] Optionally, the probability of crossing the quantum barrier can be calculated as follows: for sample point x i The barrier crossing probability Pr(x) of a device migrating from its current cluster center ca to its target cluster center cb i : ca→cb) = exp(-ΔΦ / T'), where ΔΦ is the potential energy difference required for a sample point to travel from its current location to the target cluster center, ΔΦ = Φ(cb) - Φ(x) i If ΔΦ≤0, then Pr=1, and T' is the simulated annealing temperature parameter. During the iterative optimization process, the simulated annealing temperature parameter T' gradually decreases.
[0132] Optionally, for any sample point, if the quantum potential difference between the sample point and all cluster centers is greater than a preset anomaly threshold, then the sample point is marked as an outlier and is not assigned a risk subtype label.
[0133] Figure 3 This is a schematic diagram of a terminal provided in an embodiment of the present invention. Figure 3 As shown, the terminal 300 in this embodiment includes a processor 310 and a memory 320. The memory 320 stores a computer program that can run on the processor 310, such as a quantum analogy-based gestational diabetes risk prediction program. When the processor 310 executes the computer program, it implements the steps in the above-described embodiment of the quantum analogy-based gestational diabetes risk prediction method, for example... Figure 1 As shown in 101 to 105. Alternatively, when the processor 310 executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of the sample acquisition module 201 to the prediction module 205 are shown.
[0134] The terminal 300 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal may include, but is not limited to, a processor 310 and a memory 320. Those skilled in the art will understand that... Figure 3 This is merely an example of terminal 300 and does not constitute a limitation on terminal 300. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal may also include input / output devices, network access devices, buses, etc.
[0135] The processor 310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0136] The memory 320 can be an internal storage unit of the terminal 300, such as a hard disk or memory of the terminal 300. The memory 320 can also be an external storage device of the terminal 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the terminal 300. Furthermore, the memory 320 can include both internal storage units and external storage devices of the terminal 300. The memory 320 is used to store the computer program and other programs and data required by the terminal. The memory 320 can also be used to temporarily store data that has been output or will be output.
[0137] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for predicting the risk of gestational diabetes based on quantum analogy, characterized in that, include: Obtain a sample set, wherein each sample in the sample set contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early stages of pregnancy, as well as a gestational diabetes diagnosis label in the mid-trimester. Based on the test values at each blood collection time point, a longitudinal trajectory of thyroid-stimulating hormone, free thyroxine, and fasting blood glucose for each sample was constructed, and the trajectory characteristics of each sample were determined based on the three longitudinal trajectory. The trajectory features of each sample are used as high-dimensional data points. The quantum potential energy value of each sample is calculated and a quantum potential field is constructed. The local minimum value of the quantum potential field is used as the initial clustering center for clustering. The quantum barrier crossing probability of each sample in the quantum potential field is calculated based on the initial clustering result. Samples with a quantum barrier crossing probability greater than the threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering result is iteratively optimized to obtain the final clustering result of each sample. Risk subtypes are determined based on the final clustering results of each sample, and risk labels for each risk subtype are determined based on the gestational diabetes positivity rate of samples within that risk subtype. Based on the thyroid index and fasting blood glucose test values of the pregnant woman to be predicted, a trajectory feature to be predicted is constructed. The quantum potential difference between the trajectory feature to be predicted and the cluster centers of each risk subtype is calculated. The risk subtype with the smallest quantum potential difference is determined as the predicted risk subtype of the pregnant woman to be predicted. The probability of gestational diabetes risk of the pregnant woman to be predicted is determined based on the risk label of the risk subtype.
2. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 1, characterized in that, Before constructing the longitudinal change trajectory of thyroid-stimulating hormone, free thyroxine and fasting blood glucose for each sample based on the detection values at each time point, the method further includes: adaptively aligning the blood collection time points of each sample to obtain the aligned detection values of each sample at a unified standard time point. The adaptive alignment includes: constructing a time-disaligned state space model with the actual blood collection time point as the observation time and a unified standard time point as the potential state. The state vector of the state space model includes a thyroid-stimulating hormone trajectory component, a free thyroxine trajectory component, and a time difference variable. The time difference variable is used to describe the actual time interval between two adjacent blood collections. The state transition matrix of the state space model is adaptively adjusted as the time interval between adjacent blood collections changes. The state-space model is filtered and estimated using a Kalman filter algorithm: in the prediction step, the state transition matrix is adjusted according to the current value of the time difference variable to predict the current state; in the update step, the predicted state is corrected according to the actual detection value, and the time difference variable is updated according to the deviation between the actual blood collection time point and the predicted blood collection time point; after filtering, the posterior state estimate from each actual blood collection time point is predicted to each unified standard time point to obtain the aligned detection value.
3. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 2, characterized in that, The evolution law of the time difference variable is: δ k = γ1·δ k-1 + γ2·δ k-2 + ξ k Where γ1 and γ2 are autoregressive coefficients, ξ k To drive noise, δ k Let γ1 be the time interval between the k-th blood collection and the (k-1)-th blood collection. 10 + λ1·(TSH k - TSH normal ), γ2 = γ 20 + λ2·(FT4 k - FT4 normal ), where γ 10 and γ 20 Based on the autoregressive coefficient, TSH k and FT4 k TSH is an estimate of the current physiological state. normal and FT4 normal These are reference values within the normal range, and λ1 and λ2 are preset modulation coefficients.
4. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 1, characterized in that, The determination of trajectory characteristics for each sample based on three longitudinal change trajectories includes: The sample set is pre-clustered to divide all samples into multiple pre-cluster subtypes, and the pre-cluster subtype to which each sample belongs is determined. Based on the pre-cluster subtype to which each sample belongs, the trajectory of thyroid-stimulating hormone, free thyroxine, and fasting blood glucose of the same sample is fitted with a polynomial function under the constraints of the corresponding pre-cluster subtype. The coefficients of the polynomial function constitute the trajectory parameters of the sample. A subtype-adaptive hierarchical prior distribution is set for the trajectory parameters so that samples belonging to the same pre-cluster subtype share the prior information of that subtype. The hierarchical posterior distribution is sampled using the Markov chain Monte Carlo method to obtain the posterior distribution of trajectory parameters for each sample. The mean of the posterior distribution is used as the stable trajectory parameter for each sample, and the variance of the posterior distribution is used as a measure of the uncertainty of parameter estimation. The trajectory characteristics of each sample are determined based on the stable trajectory parameters of each sample. The trajectory characteristics include at least one of the following: slope of change, area under the curve, and peak-to-valley difference.
5. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 4, characterized in that, The method of determining the trajectory characteristics of each sample based on three longitudinal change trajectories also includes: Calculate the stable trajectory parameter β for each sample. i The posterior variance Var(β) i Based on the posterior variance Var(β) i Set confidence weights for each sample: w i = exp(-ν·Var(β i )), ν is the adjustment parameter, w i ∈(0,1]; If the average confidence weight of all samples in a certain pre-cluster subtype is less than the first preset threshold, the pre-cluster subtype is marked as an unstable subtype, and the quantum potential difference of the pre-cluster subtype is increased when calculating the quantum potential difference between the trajectory characteristics of the pregnant woman to be predicted and the cluster centers of each risk subtype. If the posterior variance of a sample is greater than or equal to the second preset threshold and the confidence weight is less than the preset weight threshold, then the prior mean of the pre-cluster subtype to which the sample belongs is set as the substitute value of the stable trajectory parameter of the sample.
6. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 1, characterized in that, The formula for calculating the quantum potential energy value is: Φ(x) i ) = Σ j exp(-||x i - x j || 2 / 2σ 2 ), x i and x j Let σ be the trajectory features of the i-th and j-th samples, and σ be the scale parameter. i - x j || 2 The squared Euclidean distance between two sample points is given; the scale parameter σ is determined by calculating the pairwise Euclidean distances between all sample trajectory features in the sample set, and taking the median of all Euclidean distances as the initial value of σ.
7. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 1, characterized in that, The quantum barrier crossing probability is calculated as follows: for sample point x i From its current cluster center c a Migrate to target cluster center c b Barrier crossing probability Pr(x) i : c a →c b ) = exp(-ΔΦ / T'), where ΔΦ is the potential energy difference required for a sample point to travel from its current location to the target cluster center, ΔΦ = Φ(c b ) - Φ(x i If ΔΦ≤0, then Pr=1, and T' is the simulated annealing temperature parameter, which gradually decreases during the iterative optimization process.
8. The method for predicting the risk of gestational diabetes based on quantum analogy according to claim 1, characterized in that, The method further includes: for any sample point, if the quantum potential difference between the sample point and all cluster centers is greater than a preset anomaly threshold, then the sample point is marked as an outlier and no risk subtype label is assigned to it.
9. A device for predicting the risk of gestational diabetes based on quantum analogy, characterized in that, include: The sample acquisition module is used to acquire a sample set, wherein each sample in the sample set contains thyroid index test values and fasting blood glucose test values at at least two blood collection time points in the early pregnancy of pregnant women, as well as a gestational diabetes diagnosis label in the mid-pregnancy period. The trajectory feature determination module is used to construct the longitudinal change trajectory of thyroid-stimulating hormone, free thyroxine and fasting blood glucose for each sample based on the detection values at each blood collection time point, and to determine the trajectory features of each sample based on the three longitudinal change trajectories. The clustering module is used to treat the trajectory features of each sample as high-dimensional data points, calculate the quantum potential energy value of each sample and construct a quantum potential field. The local minimum value of the quantum potential field is used as the initial clustering center for clustering. Based on the initial clustering results, the quantum barrier crossing probability of each sample in the quantum potential field is calculated. Samples with a quantum barrier crossing probability greater than a threshold are allowed to migrate from the current clustering center to other clustering centers. The initial clustering results are iteratively optimized to obtain the final clustering results of each sample. The subtype determination module is used to determine the risk subtype based on the final clustering results of each sample, and to determine the risk label of the risk subtype based on the gestational diabetes positivity rate of samples within that risk subtype. The prediction module is used to construct a trajectory feature to be predicted based on the thyroid index test value and fasting blood glucose test value of the pregnant woman to be predicted, calculate the quantum potential difference between the trajectory feature to be predicted and the cluster center of each risk subtype, determine the risk subtype with the smallest quantum potential difference as the predicted risk subtype of the pregnant woman to be predicted, and determine the probability of gestational diabetes risk of the pregnant woman to be predicted based on the risk label of the risk subtype.
10. A terminal comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the quantum analogy-based gestational diabetes risk prediction method as described in any one of claims 1 to 8.
