Machine learning-based osteoporosis risk assessment method, system, device, and medium

By using machine learning-based methods to screen key features in blood test data and construct a risk assessment model, this approach solves the problem of traditional osteoporosis risk assessment relying on DXA equipment. It achieves efficient, low-cost, and accurate osteoporosis risk assessment, improving the accuracy and universality of the assessment.

CN122177468APending Publication Date: 2026-06-09THE SEVENTH MEDICAL CENTER OF PLA GENERAL HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Traditional osteoporosis risk assessment methods rely on costly and radiation-exposed DXA equipment, making them difficult to widely apply in primary healthcare or large populations. Furthermore, linear models cannot fully utilize multidimensional physiological and pathological information, resulting in insufficient prediction accuracy.

Method used

By acquiring blood test data and age data of the target, a risk assessment model is constructed using preset feature screening rules and machine learning algorithms. Key blood component content parameters are screened out, osteoporosis risk probability values ​​are calculated, and feature contribution data are generated, achieving efficient, low-cost, and high-precision assessment without the need for DXA examination.

Benefits of technology

Without requiring DXA examination, it achieves efficient, low-cost, and high-precision osteoporosis risk screening, improving the accuracy, universality, and clinical acceptability of risk assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122177468A_ABST
    Figure CN122177468A_ABST
Patent Text Reader

Abstract

The application relates to an osteoporosis risk assessment method, system, device and medium based on machine learning. The method comprises the following steps: acquiring blood test data and age data of an evaluation target; screening each blood component content parameter in the blood test data based on a preset feature screening rule to obtain a prediction feature subset; inputting the prediction feature subset and the age data into a preset risk assessment model to obtain an osteoporosis risk probability value of the evaluation target; calculating feature contribution degree data based on the risk assessment model and the prediction feature subset; and composing a risk assessment result based on the feature contribution degree data and the osteoporosis risk probability value; and the feature contribution degree data is used for representing the contribution of each blood component content parameter in the prediction feature subset to the osteoporosis risk probability value. The method can improve the risk assessment accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer information processing, and in particular relates to a method, system, device and medium for osteoporosis risk assessment based on machine learning. Background Technology

[0002] With the development of computer information processing technology, it has been applied to osteoporosis risk prediction, resulting in risk prediction technology based on bone mineral density measurement and clinical risk factor assessment. Its characteristic is to judge fracture risk by quantifying bone mineral density and combining it with personal medical history. This has led to the formation of traditional risk assessment methods with dual-energy X-ray absorptiometry (DXA) as the gold standard and fracture risk assessment tools (FRAX®) as typical representatives.

[0003] Traditional methods typically rely on specific imaging equipment (such as DXA) to obtain bone mineral density (BMD) values ​​for the lumbar spine or hip, and then combine these values ​​with a limited set of clinical risk factors such as age, sex, weight, and history of fractures. A linear mathematical model, employing information processing techniques like logistic regression, is then used to calculate the probability of an individual developing an osteoporotic fracture within the next ten years. The core of this process lies in weighting and integrating this key indicator of BMD with several empirical risk factors to output a quantified risk level or probability value.

[0004] However, current traditional methods have obvious limitations: their assessment effectiveness is highly dependent on the availability and accessibility of DXA testing. This equipment is expensive, has radiation exposure, and requires professional operation, making it difficult to widely apply in primary healthcare or large-scale population screening. At the same time, the linear model used cannot fully explore and utilize multi-dimensional and easily accessible physiological and pathological information such as blood biochemical indicators and cytokines, resulting in a ceiling on prediction accuracy. This makes it impossible to achieve early, universal, and accurate dynamic risk assessment, leading to insufficient accuracy in risk assessment. Summary of the Invention

[0005] Therefore, it is necessary to provide a machine learning-based osteoporosis risk assessment method, system, device, and medium that can improve the accuracy of risk assessment in response to the above-mentioned technical problems.

[0006] Firstly, this application provides a machine learning-based method for osteoporosis risk assessment, including:

[0007] Obtain blood test data and age data of the target being evaluated; the blood test data should include at least one blood component content parameter;

[0008] Based on preset feature selection rules, the content parameters of each blood component in the blood test data are selected to obtain a predicted feature subset;

[0009] Input the predicted feature subset and age data into the preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target;

[0010] Based on the risk assessment model and the predicted feature subset, feature contribution data is calculated; and based on the feature contribution data and the osteoporosis risk probability value, the risk assessment result is composed; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

[0011] Furthermore, the feature selection rules are obtained through the following method:

[0012] Acquire preset historical patient test data; the historical patient test data includes the initial blood test dataset of historical patients and the bone health status label data corresponding to the initial blood test dataset; the initial blood test dataset includes at least one blood component content parameter;

[0013] Randomly perturb the blood component content parameters in historical patient test data to obtain random shadow feature vectors corresponding to each blood component content parameter;

[0014] Based on the random forest algorithm, random shadow feature vectors and historical patient detection data, the importance scores of blood component content parameters and the importance scores of random shadow feature vectors corresponding to blood component content parameters are calculated.

[0015] For each blood component content parameter, the importance score is compared with the importance score of the random shadow feature corresponding to the blood component content parameter to obtain the comparison result of the blood component content parameter. Based on the comparison result, the blood component content parameters are selected to form a key prediction feature set. And based on the key prediction feature set, feature selection rules are constructed.

[0016] Furthermore, based on preset feature selection rules, the content parameters of each blood component in the blood test data are selected to obtain a predicted feature subset, including:

[0017] Identify missing values ​​in blood test data and fill in the missing values ​​based on historical patient test data to obtain intermediate processed data;

[0018] Based on historical patient testing data, intermediate processing data is standardized to obtain standardized blood test data.

[0019] Based on feature selection rules, the content parameters of each blood component in standardized blood test data are selected to obtain a predicted feature subset.

[0020] Furthermore, the historical patient testing data also includes the historical age data of historical patients. The risk assessment model was obtained through the following methods:

[0021] Historical patient test data is obtained, and based on feature selection rules, the blood component content parameters in the initial blood test dataset of historical patients are selected to obtain a subset of historical predicted features for historical patients.

[0022] Using historical prediction feature subsets and historical age data as feature values, and bone health status label data corresponding to the historical prediction feature subsets as prediction targets corresponding to the feature values, a training dataset and a model test set are constructed.

[0023] An initial risk assessment model is constructed based on the gradient boosting algorithm; and based on the training dataset, feature values ​​are input into the initial risk assessment model to obtain the training prediction values ​​corresponding to the feature values.

[0024] The model prediction loss is calculated based on the training prediction values ​​corresponding to the feature values ​​and the bone health status label data corresponding to the feature values.

[0025] Based on the model's predicted loss, the risk assessment model is iteratively optimized until the preset convergence condition is met, thus obtaining a preliminary risk assessment model.

[0026] The preliminary risk assessment model is validated using a model test set until it meets the preset accuracy requirements, thus obtaining a well-trained risk assessment model.

[0027] Furthermore, based on the risk assessment model and the predicted feature subset, feature contribution data is calculated, including:

[0028] Based on the risk assessment model, for each blood component content parameter in the predicted feature subset, the contribution value of the blood component content parameter is calculated. The expression for the contribution value is:

[0029]

[0030] in, It is an index to the content parameter of any blood component. It is the first The contribution value of each blood component content parameter, It is a subset of predicted features. yes None of them contain the first A subset of blood component content parameters, It is a risk assessment model;

[0031] Based on the contribution values ​​of each blood component content parameter, characteristic contribution data are obtained.

[0032] Secondly, this application also provides a machine learning-based osteoporosis risk assessment system, including:

[0033] The data acquisition module is used to acquire blood test data and age data of the target being evaluated; the blood test data includes at least one blood component content parameter;

[0034] The data extraction module is used to filter the content parameters of each blood component in the blood test data based on preset feature filtering rules to obtain a predicted feature subset;

[0035] The risk analysis module is used to input the predicted feature subset and age data into the preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target;

[0036] The contribution calculation module is used to calculate the feature contribution data based on the risk assessment model and the predicted feature subset; and to form the risk assessment result based on the feature contribution data and the osteoporosis risk probability value; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the machine learning-based osteoporosis risk assessment methods described in the first aspect of this application.

[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the machine learning-based osteoporosis risk assessment methods described in the first aspect of this application.

[0039] The aforementioned machine learning-based osteoporosis risk assessment method, system, equipment, and medium acquire blood test data and age data of the target being assessed. The blood test data includes at least one blood component content parameter. Based on preset feature selection rules, each blood component content parameter in the blood test data is selected to obtain a predicted feature subset. The predicted feature subset and age data are input into a preset risk assessment model to obtain the osteoporosis risk probability value of the target being assessed. Based on the risk assessment model and the predicted feature subset, feature contribution data is calculated. The risk assessment result is then composed of the feature contribution data and the osteoporosis risk probability value. The feature contribution data characterizes the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value. Without relying on DXA examination, this method achieves efficient, low-cost, high-precision, and understandable osteoporosis risk screening, effectively improving the accuracy, universality, and clinical acceptability of risk assessment. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying 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.

[0041] Figure 1 A flowchart illustrating a machine learning-based osteoporosis risk assessment method provided in one embodiment of this application;

[0042] Figure 2 A schematic diagram of the structure of a machine learning-based osteoporosis risk assessment system provided in one embodiment of this application;

[0043] Figure 3 This is a schematic diagram of the structure of a computer device for an osteoporosis risk assessment method based on machine learning, provided in one embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0045] In one embodiment, such as Figure 1 As shown, a machine learning-based osteoporosis risk assessment method is provided. This embodiment illustrates the application of this method to an assessment terminal. It is understood that this method can also be applied to a server, or to a system including both an assessment terminal and a server, and is implemented through the interaction between the assessment terminal and the server. In this embodiment, the method includes the following steps S101-S104, wherein:

[0046] S101, Obtain blood test data and age data of the target being evaluated; the blood test data includes at least one blood component content parameter.

[0047] Specifically, the assessment terminal acquires the target's blood test data and age data. The age data is a scalar value in years, representing the target's actual age. The blood test data is a feature vector containing at least one blood component content parameter, which can be denoted as... ,in Every element in the blood test data ( This corresponds to the real-time sampling value of a specific blood component content parameter, which can be the serum or plasma concentration value of blood biochemical markers such as osteocalcin (BGP), type I collagen cross-linked C-terminal peptide (CTx), and interleukin-8 (IL-8). Blood test data can be obtained from the venous blood sample of the target being evaluated using routine clinical testing methods such as biochemical analyzers and enzyme-linked immunosorbent assays.

[0048] S102, based on preset feature selection rules, the content parameters of each blood component in the blood test data are selected to obtain a predicted feature subset.

[0049] Specifically, the preset feature selection rules are a defined lookup table used to select blood component content parameters that are significantly associated with osteoporosis risk from a large number of blood component content parameters. This table can be constructed based on practical analysis of the relationship between various blood component content parameters and osteoporosis risk. The evaluation terminal uses the blood component content parameter lookup table (e.g., a specific set of feature indices) within the preset feature selection rules to evaluate the blood test data vector. The system retains or extracts real-time sampled values ​​of the corresponding blood component content parameters to obtain a predicted feature subset, which can be denoted as... ,in ,and This predicted feature subset Redundant or irrelevant features were removed from the blood test data.

[0050] S103, input the predicted feature subset and age data into the preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target.

[0051] Specifically, the assessment terminal inputs a predicted feature subset and age data into a pre-set risk assessment model to obtain the osteoporosis risk probability value of the assessment target. The pre-set risk assessment model is a pre-trained machine learning classifier, whose mathematical form can be a mapping function. The pre-set risk assessment model is received. The feature input is 3D, and after complex internal nonlinear calculations, the final output is an osteoporosis risk probability value, which can be denoted as: The osteoporosis risk probability value is a scalar value between 0 and 1, quantifying the likelihood that the assessed person has osteoporosis. The closer the value is to 1, the higher the risk. For example, the pre-defined risk assessment model can be obtained by supervised training and optimization using algorithms such as gradient boosting, based on a large-scale dataset containing historical patient key feature data and their diagnostic labels, to learn a non-linear mapping relationship from blood component content parameters and age data to the osteoporosis risk probability.

[0052] S104. Based on the risk assessment model and the predicted feature subset, the feature contribution data is calculated; and based on the feature contribution data and the osteoporosis risk probability value, the risk assessment result is composed; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

[0053] Specifically, after obtaining the probability value of osteoporosis risk Subsequently, the assessment terminal performs an interpretability analysis. This analysis is based on the preset risk assessment model used in step S103. and the predicted feature subset obtained in step S102 Based on age data, the evaluation terminal calculates feature contribution data using a specific model interpretation algorithm (such as SHAP). Feature contribution data is a vector corresponding to the dimension of the predicted feature subset. Each element It corresponds to the first in the predicted feature subset. The contribution score of each blood component content parameter. The absolute value indicates the impact of the blood component content parameter on the final risk probability value. The strength of the influence, indicated by its sign (positive or negative), represents the direction of the characteristic's impact on risk (e.g., a positive sign indicates that an increase in the characteristic value will increase the risk, while a negative sign indicates that the risk will decrease). Finally, the assessment terminal will assign an osteoporosis risk probability value. With feature contribution data The data is then integrated to generate a structured risk assessment result. This result can be a comprehensive report that includes risk probability values, key impact characteristics, and their contribution directions.

[0054] This embodiment provides a machine learning-based osteoporosis risk assessment method. By acquiring blood test data and age data of the target individual, key risk features are selected using pre-defined feature screening rules to obtain a predicted feature subset. This subset is then accurately predicted using a pre-defined risk assessment model to obtain the osteoporosis risk probability value of the target individual. Simultaneously, feature contribution data with clear clinical significance is generated, ultimately yielding a risk assessment result that combines quantitative risk values ​​with qualitative attribution analysis. Without relying on DXA examination, this method achieves efficient, low-cost, high-precision, and understandable osteoporosis risk screening, effectively improving the accuracy, universality, and clinical acceptability of risk assessment.

[0055] In one embodiment, the feature selection rules are obtained through the following method:

[0056] S201, Obtain preset historical patient test data; the historical patient test data includes the initial blood test dataset of historical patients and the bone health status label data corresponding to the initial blood test dataset; the initial blood test dataset includes at least one blood component content parameter.

[0057] Specifically, the assessment terminal acquires pre-defined historical patient testing data. This pre-defined historical patient testing data includes the initial blood test dataset of historical patients and corresponding bone health status label data for the initial blood test dataset; the initial blood test dataset includes at least one blood component content parameter. The pre-defined historical patient testing data can be obtained from a hospital's medical record database or a dedicated medical research data warehouse. The pre-defined historical patient testing data can be in the form of a feature matrix, denoted as... ,in It is the number of historical patients. It is the number of different types of blood component content parameters in the initial blood test dataset. The number of blood component content parameters in the initial blood test dataset is greater than the small number of key parameters ultimately used for prediction (e.g., 96 or more indicators may have been collected in the original study). Each row in the dataset represents the initial blood test data of a corresponding historical patient. The data in a row can be denoted as , is the The initial blood test dataset of a historical patient, where any element It is the first Initial blood test dataset of historical patients The Middle Historical test values ​​of blood component content parameters can include various serological indicators such as bone metabolism markers, inflammatory factors, blood lipids, and coagulation function. Bone health status label data is a label vector, the first... The bone health status tag data of a historical patient can be recorded as follows: , characterizing the Initial blood test dataset of historical patients The results represent the gold standard for diagnosing osteoporosis. Bone health status label data can be obtained through dual-energy X-ray absorptiometry (DXA). Individuals with a T-score ≤ -2.5 can be labeled as osteoporotic (positive class, label can be 1), while individuals with normal bone mass and no history of fractures can be labeled as non-osteoporotic or healthy (negative class, label can be 0).

[0058] S202, randomly perturb the blood component content parameters in the historical patient test data to obtain the random shadow feature vector corresponding to each blood component content parameter.

[0059] Specifically, the evaluation terminal evaluates the initial blood test dataset matrix obtained in step S201. Each column (i.e., each blood component content parameter) in the dataset is independently subjected to a random perturbation operation to create a corresponding random shadow feature vector for each blood component content parameter. The specific process is as follows: For the... Blood component content parameters ( Take its corresponding column vector. Generate a number from 1 to... random arrangement Then, according to this random arrangement... For vectors The order of the elements in the vector is completely shuffled to obtain a new vector. This new vector That is the first The random shadow feature vector corresponding to the blood component content parameter. For all After performing this operation on the blood component content parameter, you will get... A total of 10 random shadow feature vectors are used to construct a random shadow feature matrix. Each of its columns Characterized blood component content parameters and historical patient test data Corresponding column The parameters representing the blood component content correspond one-to-one.

[0060] S023, based on the random forest algorithm, random shadow feature vectors and historical patient detection data, calculates the importance score of the blood component content parameter and the importance score of the random shadow feature vector corresponding to the blood component content parameter.

[0061] Specifically, the evaluation terminal performs the following process to calculate the importance score of each blood component content parameter and the importance score of the random shadow feature vector corresponding to the blood component content parameter: First, historical patient test data... and random shadow feature matrix Concatenate the columns to form an extended feature matrix. .forward Listed as the original blood component content parameters, later The columns are random shadow feature vectors corresponding to the content parameters of each blood component. Next, this extended feature matrix... The feature input is the skeletal health status label vector for each historical patient. To predict the target, a random forest classifier is trained. The random forest algorithm constructs multiple decision trees using a bootstrap sampling method. At each node split in each tree, the contribution of all candidate features (including original features and random shadow features) to reducing node impurity (such as Gini impurity or information entropy) is evaluated. After training, the random forest algorithm aggregates the split contribution of each feature across all decision trees, expanding the feature matrix for each feature (i.e., ...). A quantified importance score is calculated for each feature. This score is typically based on the average of the total reduction in impurity brought by the feature across all trees or the increment of out-of-bag error. Finally, an importance score vector is output. , among which the former Each score The importance score corresponding to the original blood component content parameter, then Each score Importance scores corresponding to the random shadow feature vectors of each blood component content parameter.

[0062] S204. For each blood component content parameter, the importance score is compared with the importance score of the random shadow feature corresponding to the blood component content parameter to obtain the comparison result of the blood component content parameter. Based on the comparison result, the blood component content parameter is selected to form a key prediction feature set. Based on the key prediction feature set, the feature selection rule is constructed.

[0063] Specifically, for the first Original blood component content parameters ( The assessment terminal will score its importance. The importance score of the corresponding random shadow feature The comparison results for the blood component content parameter are obtained. The indices of the original blood component content parameters whose importance scores are greater than the importance scores of their corresponding random shadow features are combined to form a key prediction feature set, which can be denoted as... Finally, based on the key prediction feature set The feature selection rules are constructed as follows: For example, the rule can be defined as: for any new blood test data, only retain the feature whose index belongs to the set of key predicted features. The feature values ​​in those dimensions are selected, while other features are filtered out. For example, to ensure robustness, steps S202 and S203 can be iterated multiple times (e.g., 5 or more times). In each iteration, the random shadow feature vectors corresponding to each blood component content parameter are regenerated, and the random forest model is retrained, thus obtaining the comparison results of multiple importance scores for that blood component content parameter across multiple iterations. Specifically, the comparison process can be: requiring the... The importance score of the original blood component content parameter across all iteration rounds is compared as follows: Importance Score The importance score is greater than the corresponding random shadow feature. The number of times it appears is greater than the importance score. The importance score is less than the corresponding random shadow feature. The number of times the result is obtained is determined, and the indices of all blood component content parameters that meet the requirements are collected to form a key prediction feature set. .

[0064] This embodiment provides a machine learning-based osteoporosis risk assessment method. It acquires pre-set historical patient testing data and introduces random shadow features to obtain random shadow feature vectors corresponding to each blood component content parameter. Furthermore, it utilizes a random forest model to quantify and compare the importance of original features and noisy features in multiple iterations, obtaining importance scores for both blood component content parameters and their corresponding random shadow feature vectors. This allows for the selection of a set of key blood component content parameters with stable and significant correlations to osteoporosis risk, resulting in a key predictive feature set. Based on this set, feature selection rules are constructed. This method overcomes the subjectivity or overfitting risks of traditional feature selection methods, ensuring that the selected feature subset has strong predictive power and interpretability, laying a solid data foundation for subsequent risk assessment model construction.

[0065] In one embodiment, based on preset feature selection rules, the content parameters of each blood component in the blood test data are selected to obtain a predicted feature subset, including:

[0066] S301 identifies missing values ​​in blood test data and fills in the missing values ​​based on historical patient test data to obtain intermediate processed data.

[0067] Specifically, the assessment terminal receives blood test data from the assessment target. Next, a data quality check and repair is performed. The evaluation terminal scans each element in the blood test data item by item. ( ), and determine whether it is a valid value. If detected Values ​​that are null, undefined (NaN), or significantly outside the reasonable physiological range of the parameter (e.g., a threshold range set according to medical common sense) are marked as missing values. To handle these missing values, the evaluation terminal retrieves preset historical patient test data. For the first For any missing blood component content parameter, the assessment terminal calculates the corresponding column vector of that blood component content parameter in historical patient test data. The arithmetic mean of all non-missing values ​​in Then, use this historical average. Replace missing values ​​at corresponding locations in the blood test data. After performing the imputation operation on all parameters marked as missing, the intermediate processed data is obtained, which can be denoted as... .in, Equal to real-time sampled value (if (Non-missing) or filled values (if (Missing).

[0068] S302, based on historical patient test data, standardizes intermediate processing data to obtain standardized blood test data.

[0069] Specifically, the evaluation terminal assesses the intermediate processed data. Standardization is performed to eliminate the influence of differences in units of measurement and numerical magnitudes between different blood component content parameters, resulting in standardized blood test data. The specific processing procedure is as follows: For the first... For each blood component content parameter, the evaluation terminal calculates two statistics for the corresponding column from historical patient test data: the mean. and standard deviation The formula for calculating the standard deviation is: Then, the numerical values ​​of each blood component content parameter in the intermediate processed data of the evaluation target are... Applying the Z-score normalization formula: This transformation converts the original values ​​into a distribution with a mean of 0 and a standard deviation of 1. For all The blood component content parameters are calculated sequentially to obtain standardized blood test data. .

[0070] S303, based on feature selection rules, filters the content parameters of each blood component in standardized blood test data to obtain a predicted feature subset.

[0071] Specifically, the evaluation terminal first creates a new empty vector and applies the set of key predicted features from the feature selection rules. Traversing the indexes in standardized blood test data From 1 to If the index Belongs to the set of key predictive features This will standardize blood test data. The value at the corresponding position in the middle Add them to the new vector. After the traversal is complete, the new vector contains all the selected, standardized key parameter values. This new vector is the predicted feature subset, which can be denoted as... Its dimensions are (i.e., the number of key features), its mathematical form can be... ,in ,and .

[0072] This embodiment provides a machine learning-based osteoporosis risk assessment method. It standardizes and repairs missing data in blood test data using historical patient test data to obtain standardized blood test data. Furthermore, it applies feature selection rules to extract the most predictive blood component content parameters to form a key feature subset. This ensures the accuracy and stability of subsequent model predictions, and feature selection reduces data complexity, improving the computational efficiency and interpretability of the assessment process.

[0073] In one embodiment, the historical patient testing data also includes the historical age data of historical patients, and the risk assessment model is obtained through the following method:

[0074] S401. Obtain historical patient test data and, based on feature selection rules, filter the blood component content parameters in the initial blood test dataset of historical patients to obtain a subset of historical predicted features for historical patients.

[0075] Specifically, the assessment terminal acquires historical patient testing data, which also includes the historical age data for each historical patient, and can be denoted as... , It is the first Historical age data of individual patients. Evaluation of the set of key predictive features in the feature selection rules of the terminal application. traversing historical patient test data For each column (each blood component content parameter), only the column index is retained. Those columns. The specific operation is to first create a new matrix. , its first List( (equal to historical patient testing data) The Column, among which It is a set of key predictive features The first in Each index ultimately yields historical patient predictive feature data. any one The data in a row can be denoted as , is the A subset of historical predictive features of a historical patient, where any element It is the first A subset of historical predictive features of a historical patient The Middle Historical test values ​​of blood component content parameters.

[0076] S402 uses historical predicted feature subsets and historical age data as feature values, and bone health status label data corresponding to the historical predicted feature subsets as prediction targets corresponding to the feature values ​​to construct training datasets and model test sets.

[0077] Specifically, the evaluation terminal will evaluate the historical predictive feature subset matrix of each historical patient obtained in step S401. Compared with historical age data Column-wise merging is performed according to the sample dimensions to form a complete feature matrix. Each row of the matrix Is any of the first Feature values ​​of historical patients (including a subset of historical predictive features) and historical age data The prediction target is the bone health status label data corresponding to this historical patient. The evaluation terminal randomly partitions the feature matrix and corresponding skeletal health status label data according to a preset ratio, obtaining a training dataset and a model test set. Specifically, it generates a dataset ranging from 1 to... The random arrangement, according to a preset ratio, assigns the sample index corresponding to the preset ratio. Characteristic values ​​of patients with a history of illness Bone health status label data corresponding to this historical patient Extract the data to form the training dataset, which can be denoted as: ,in This is the training feature matrix; the remaining samples form the model test set, which can be denoted as... This division ensures the objectivity of model performance evaluation on unseen data. For example, the preset ratio is set by default to 8:2 (training dataset:model test set), and this embodiment does not further limit the setting of this preset ratio.

[0078] S403: Construct an initial risk assessment model based on the gradient boosting algorithm; and input the feature values ​​into the initial risk assessment model based on the training dataset to obtain the training prediction values ​​corresponding to the feature values.

[0079] Specifically, the evaluation terminal constructs an initial risk assessment model by initializing a gradient boosting model framework. The gradient boosting model framework defines the basic structure of the initial risk assessment model, including the type of base learner (decision tree), the loss function, and the learning rate. And the initial model predictions. Construct the initial risk assessment model. Then, the evaluation terminal is based on the training dataset, and the training dataset's... The characteristic values ​​of each historical patient Input into the initial risk assessment model In the initial risk assessment model, this characteristic value is calculated. Corresponding training prediction value Training predictions It is a probability value between 0 and 1, indicating that the initial risk assessment model considers this feature value to be... The probability of being classified as osteoporosis.

[0080] S404: Calculate the model prediction loss based on the training prediction values ​​corresponding to the feature values ​​and the bone health status label data corresponding to the feature values.

[0081] Specifically, for any one of the training datasets For each historical patient, the evaluation terminal compares their training predictions. and corresponding bone health status label data The model prediction loss is then calculated. Specifically, the logarithmic loss function can be used. The calculation formula is: .in, It is the first The model prediction loss corresponding to each feature value It is the first Historical patient bone health status label data, It is the first Characteristic values ​​of a historical patient The corresponding training prediction values. This loss function measures the difference between the predicted probability distribution and the true label distribution; the smaller the loss value, the more accurate the model prediction.

[0082] S405. Based on the model's predicted loss, the risk assessment model is iteratively optimized until the preset convergence condition is met, thus obtaining a preliminary risk assessment model.

[0083] Specifically, the evaluation terminal uses the backpropagation algorithm to calculate the gradient of the model's predicted loss relative to the parameters of each layer of the initial risk assessment model, and then uses an optimizer (such as Adam) to update the parameters of the initial risk assessment model based on the gradient. This process is iterative: each time, a feature value from the training dataset is used. The process involves forward propagation, loss calculation, backpropagation, and parameter updates. Iterative training continues until a pre-defined termination condition is met, resulting in a preliminary risk assessment model. For example, the preset iteration termination condition can be reaching a preset maximum number of iterations, or it can be set according to the actual work.

[0084] S406. The preliminary risk assessment model is validated using a model test set until it meets the preset accuracy requirements, thus obtaining a trained risk assessment model.

[0085] Specifically, the evaluation terminal tests the preliminary risk assessment model using a model test set until the preliminary risk assessment model meets the preset accuracy requirements, thus obtaining a trained risk assessment model. Optionally, the preset accuracy requirement can be an accuracy rate of 90%, or it can be set and adjusted according to the actual work.

[0086] This embodiment provides a machine learning-based osteoporosis risk assessment method. It acquires and integrates pre-defined historical patient testing data, extracts key features using established feature selection rules, and then rigorously divides the training dataset and model test set. An initial risk assessment model is constructed and iteratively optimized using a gradient boosting algorithm. This optimization is performed by minimizing the prediction loss function until a pre-defined accuracy requirement is met, resulting in a well-trained risk assessment model. This model can accurately extract complex nonlinear relationships between key blood indicators and age information and osteoporosis risk, providing a reliable and stable predictive model for real-time assessment.

[0087] In one embodiment, feature contribution data is calculated based on a risk assessment model and a predicted feature subset, including:

[0088] S501, based on the risk assessment model, calculates the contribution value of each blood component content parameter in the predicted feature subset. The expression for the contribution value is:

[0089]

[0090] in, It is an index to the content parameter of any blood component. It is the first The contribution value of each blood component content parameter, It is a subset of predicted features. yes None of them contain the first A subset of blood component content parameters, It is a risk assessment model.

[0091] Specifically, the assessment focuses on the impact of each blood component content parameter and age data in the terminal quantitative prediction feature subset on the probability of osteoporosis risk. Individualized contribution. This calculation process uses a risk assessment model. and predicted feature subset As the core input. For the predicted feature subset Each blood component content parameter in the data is denoted as the [number]. Calculate the contribution value of each blood component content parameter. This calculation strictly follows the Shapley value formula, the principle of which is: for the th The contribution of a blood component content parameter is equal to its addition to all possible feature subsets. The summation is a weighted average of the model prediction increments. A detailed explanation of the formula is as follows: The summation symbol is used to iterate through the subset of predicted features. All of the above does not contain the first A subset of blood component content parameters (Including the empty set). For each such subset Calculate the model's predictions under two different inputs: Indicates the use of subsets Add the current number Model output when the blood component content parameter is used; Indicates using only subsets The model output at that time. The difference between the two. That is, the first Blood component content parameters in subset Marginal contribution under weighting coefficients. This is used to ensure that contributions are fairly distributed across all possible subset orders, where It is a subset Size (number of blood component content parameters). This represents the total number of blood component content parameters included in the predicted feature subset. The exclamation mark (!) indicates a factorial operation. This weight is the [number]th [unit]. The blood component content parameter was randomly added to a subset. Of all possible orders, it appears exactly in the subset The probability of the subsequent positions. Finally, the probability of the... The blood component content parameter in all possible subsets The weighted marginal contribution summation yields its contribution value. .

[0092] S502, based on the contribution values ​​of each blood component content parameter, obtain characteristic contribution data.

[0093] Specifically, the evaluation terminal completes the evaluation of the predicted feature subset. Contribution value of each blood component content parameter After calculation, these contribution values ​​are aggregated and organized according to their corresponding parameter order to obtain feature contribution data. Each contribution value The symbol indicates the direction of influence of the corresponding blood component content parameter on the current target osteoporosis risk assessment—positive ( The sign () indicates that the blood component content parameter tends to increase the probability of risk. This indicates a tendency to reduce risk; its absolute value The magnitude of the value quantifies the influence of the blood component content parameter; the larger the absolute value, the greater the influence of the blood component content parameter on the final risk probability value. The greater the contribution.

[0094] This embodiment provides a machine learning-based osteoporosis risk assessment method. By introducing and applying the rigorous cooperative game theory concept of Shapley value, it calculates the fair contribution share of each blood component content parameter to the final output risk probability value, obtaining feature contribution data. This provides an intuitive and quantitative basis for risk assessment, clearly indicating which abnormal blood component content parameters (and their abnormal directions) dominate the current high-risk or low-risk judgment, enhancing the transparency and credibility of the model's prediction results.

[0095] The aforementioned machine learning-based osteoporosis risk assessment method acquires blood test data and age data of the target individual. The blood test data includes at least one blood component content parameter. Based on preset feature selection rules, each blood component content parameter in the blood test data is selected to obtain a predicted feature subset. The predicted feature subset and age data are input into a preset risk assessment model to obtain the osteoporosis risk probability value of the target individual. Based on the risk assessment model and the predicted feature subset, feature contribution data is calculated. The risk assessment result is then composed of the feature contribution data and the osteoporosis risk probability value. The feature contribution data characterizes the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value. This method achieves efficient, low-cost, high-precision, and understandable osteoporosis risk screening without relying on DXA examination, effectively improving the accuracy, universality, and clinical acceptability of risk assessment.

[0096] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0097] Based on the same inventive concept, this application also provides a machine learning-based osteoporosis risk assessment system for implementing the aforementioned machine learning-based osteoporosis risk assessment method. The solution provided by this system is similar to the implementation described in the above method. Therefore, the specific limitations of one or more machine learning-based osteoporosis risk assessment system embodiments provided below can be found in the limitations of the machine learning-based osteoporosis risk assessment method described above, and will not be repeated here.

[0098] In one exemplary embodiment, such as Figure 2 As shown, a machine learning-based osteoporosis risk assessment system 200 is provided, including:

[0099] The data acquisition module 201 is used to acquire blood test data and age data of the target being evaluated; the blood test data includes at least one blood component content parameter;

[0100] The data extraction module 202 is used to filter the content parameters of each blood component in the blood test data based on preset feature filtering rules to obtain a predicted feature subset;

[0101] The risk analysis module 203 is used to input the predicted feature subset and age data into the preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target;

[0102] The contribution calculation module 204 is used to calculate the feature contribution data based on the risk assessment model and the predicted feature subset; and to form the risk assessment result based on the feature contribution data and the osteoporosis risk probability value; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

[0103] Furthermore, the system also includes a feature selection rule construction module, which can be used for:

[0104] Acquire preset historical patient test data; the historical patient test data includes the initial blood test dataset of historical patients and the bone health status label data corresponding to the initial blood test dataset; the initial blood test dataset includes at least one blood component content parameter;

[0105] Randomly perturb the blood component content parameters in historical patient test data to obtain random shadow feature vectors corresponding to each blood component content parameter;

[0106] Based on the random forest algorithm, random shadow feature vectors and historical patient detection data, the importance scores of blood component content parameters and the importance scores of random shadow feature vectors corresponding to blood component content parameters are calculated.

[0107] For each blood component content parameter, the importance score is compared with the importance score of the random shadow feature corresponding to the blood component content parameter to obtain the comparison result of the blood component content parameter. Based on the comparison result, the blood component content parameters are selected to form a key prediction feature set. And based on the key prediction feature set, feature selection rules are constructed.

[0108] Furthermore, the data extraction module can also be used for:

[0109] Identify missing values ​​in blood test data and fill in the missing values ​​based on historical patient test data to obtain intermediate processed data;

[0110] Based on historical patient testing data, intermediate processing data is standardized to obtain standardized blood test data.

[0111] Based on feature selection rules, the content parameters of each blood component in standardized blood test data are selected to obtain a predicted feature subset.

[0112] Furthermore, the historical patient testing data also includes the historical age data of historical patients. The system also includes a risk assessment model building module, which can be used for:

[0113] Historical patient test data is obtained, and based on feature selection rules, the blood component content parameters in the initial blood test dataset of historical patients are selected to obtain a subset of historical predicted features for historical patients.

[0114] Using historical prediction feature subsets and historical age data as feature values, and bone health status label data corresponding to the historical prediction feature subsets as prediction targets corresponding to the feature values, a training dataset and a model test set are constructed.

[0115] An initial risk assessment model is constructed based on the gradient boosting algorithm; and based on the training dataset, feature values ​​are input into the initial risk assessment model to obtain the training prediction values ​​corresponding to the feature values.

[0116] The model prediction loss is calculated based on the training prediction values ​​corresponding to the feature values ​​and the bone health status label data corresponding to the feature values.

[0117] Based on the model's predicted loss, the risk assessment model is iteratively optimized until the preset convergence condition is met, thus obtaining a preliminary risk assessment model.

[0118] The preliminary risk assessment model is validated using a model test set until it meets the preset accuracy requirements, thus obtaining a well-trained risk assessment model.

[0119] Furthermore, the contribution calculation module can also be used for:

[0120] Based on the risk assessment model, for each blood component content parameter in the predicted feature subset, the contribution value of the blood component content parameter is calculated. The expression for the contribution value is:

[0121]

[0122] in, It is an index to the content parameter of any blood component. It is the first The contribution value of each blood component content parameter, It is a subset of predicted features. yes None of them contain the first A subset of blood component content parameters, It is a risk assessment model;

[0123] Based on the contribution values ​​of each blood component content parameter, characteristic contribution data are obtained.

[0124] In one embodiment, such as Figure 3 A computer device is provided, comprising:

[0125] At least one processor 301, and a memory 302 communicatively connected to at least one of the processors 301: the memory stores application code executable by at least one of the processors, the application code being executed by at least one of the processors to enable at least one of the processors to perform the machine learning-based osteoporosis risk assessment method as described above.

[0126] Computer equipment may also include: sensor 303.

[0127] The processor 301, memory 302 and sensor 303 can be connected via a bus or other means, with the bus being an example in the figure.

[0128] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.

[0129] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0130] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A machine learning-based method for assessing osteoporosis risk, characterized in that, The method includes: Obtain blood test data and age data of the target being evaluated; the blood test data includes at least one blood component content parameter; Based on preset feature filtering rules, the blood component content parameters in the blood test data are filtered to obtain a predicted feature subset; The predicted feature subset and the age data are input into a preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target; Based on the risk assessment model and the predicted feature subset, feature contribution data is calculated; and based on the feature contribution data and the osteoporosis risk probability value, a risk assessment result is formed; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

2. The method according to claim 1, characterized in that, The feature selection rules are obtained through the following method: Acquire preset historical patient test data; the historical patient test data includes the initial blood test dataset of historical patients and the bone health status label data corresponding to the initial blood test dataset; the initial blood test dataset includes at least one of the blood component content parameters; Randomly perturb the blood component content parameters in the historical patient test data to obtain random shadow feature vectors corresponding to each blood component content parameter; Based on the random forest algorithm, the random shadow feature vector, and the historical patient detection data, the importance score of the blood component content parameter and the importance score of the random shadow feature vector corresponding to the blood component content parameter are calculated. For each of the blood component content parameters, the importance score is compared with the importance score of the random shadow feature corresponding to the blood component content parameter to obtain the comparison result of the blood component content parameter. Based on the comparison result, the blood component content parameter is selected to form a key prediction feature set. The feature selection rule is then constructed based on the key prediction feature set.

3. The method according to claim 2, characterized in that, The method, based on preset feature filtering rules, filters the blood component content parameters in the blood test data to obtain a predicted feature subset, including: Identify missing values ​​in the blood test data and fill in the missing values ​​based on the historical patient test data to obtain intermediate processed data; Based on the historical patient test data, the intermediate processing data is standardized to obtain standardized blood test data; Based on the feature selection rules, the blood component content parameters in the standardized blood test data are selected to obtain the predicted feature subset.

4. The method according to claim 2, characterized in that, The historical patient testing data also includes the historical age data of the historical patients, and the risk assessment model is obtained through the following methods: The historical patient test data is obtained, and based on the feature filtering rules, the blood component content parameters in the initial blood test dataset of the historical patients are filtered to obtain the historical predicted feature subset of the historical patients; Using the historical prediction feature subset and the historical age data as feature values, and the bone health status label data corresponding to the historical prediction feature subset as the prediction target corresponding to the feature values, a training dataset and a model test set are constructed. An initial risk assessment model is constructed based on the gradient boosting algorithm; and based on the training dataset, the feature values ​​are input into the initial risk assessment model to obtain the training prediction values ​​corresponding to the feature values; Based on the training prediction value corresponding to the feature value and the bone health status label data corresponding to the feature value, calculate the model prediction loss; Based on the predicted loss from the model, the risk assessment model is iteratively optimized until the preset convergence condition is met, thus obtaining a preliminary risk assessment model. The preliminary risk assessment model is validated using the model test set until it meets the preset accuracy requirements, thus obtaining the trained risk assessment model.

5. The method according to claim 4, characterized in that, The feature contribution data calculated based on the risk assessment model and the predicted feature subset includes: Based on the risk assessment model, for each blood component content parameter in the predicted feature subset, the contribution value of the blood component content parameter is calculated, and the expression for the contribution value is: in, It is an index to the content parameter of any blood component. It is the first The contribution value of each blood component content parameter, It is a subset of predicted features. yes None of them contain the first A subset of blood component content parameters, It is a risk assessment model; The feature contribution data is obtained based on the contribution value of each of the blood component content parameters.

6. A machine learning-based osteoporosis risk assessment system, characterized in that, The system includes: The data acquisition module is used to acquire blood test data and age data of the target being evaluated; the blood test data includes at least one blood component content parameter; The data extraction module is used to filter the blood component content parameters in the blood test data based on preset feature filtering rules to obtain a predicted feature subset; The risk analysis module is used to input the predicted feature subset and the age data into a preset risk assessment model to obtain the osteoporosis risk probability value of the assessment target; The contribution calculation module is used to calculate feature contribution data based on the risk assessment model and the predicted feature subset; and to form a risk assessment result based on the feature contribution data and the osteoporosis risk probability value; the feature contribution data is used to characterize the contribution of each blood component content parameter in the predicted feature subset to the osteoporosis risk probability value.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.