Construction method and system of spine health state evaluation model
The construction of a spinal health assessment model through mobile phone sensors and machine learning solves the invasive and high-cost problems of spinal health monitoring in the existing technology, and achieves convenient and real-time spinal health assessment and risk prediction.
Patent Information
- Application Number
- CN202410225598.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-08-29
AI Technical Summary
In the prior art, spinal health monitoring pathways are mostly invasive and rely on professional equipment. They are poor in convenience and real-time, and are expensive, so they cannot track and determine the spinal health status in real time.
Based on the user's torso rotation angle (ATR) sequence data transmitted by mobile phone sensors, the position and direction of scoliosis are determined through machine learning, and a spinal health assessment model is constructed to reflect spinal health status in real time, and the risk of scoliosis worsens is speculated.
It achieves the convenience, real-time and personalization of spinal health monitoring under the premise of non-invasiveness, and reduces costs.
Smart Images

Figure CN120565040A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of the Internet of Things and intelligent processing of health data, and more specifically, to a method and system for constructing a spinal health status assessment model. Background Art
[0002] Scoliosis is a pathological condition characterized by spinal structural abnormalities, typically measured and assessed using the Cobb angle. The Cobb angle (scoliotic curvature angle) refers to the maximum angle between two vertebrae in cases of scoliosis. By measuring the Cobb angle, the degree of spinal deviation can be determined and the patient's spinal health can be further assessed.
[0003] By using advanced sensors built into smartphones to measure the user's trunk rotation angle (ATR), and combining it with the user's lifestyle and environmental factors, as well as imaging examinations, we can accurately infer key information such as the location and direction of scoliosis, as well as the related Cobb angle in real time, thereby constructing a comprehensive spinal health score.
[0004] The measurement of torso rotation angle relies on sensors such as the mobile phone's built-in gyroscope and accelerometer. These sensors can capture tiny rotation changes of the user's torso in three-dimensional space with high precision, providing strong data support for further analysis.
[0005] When inferring scoliosis, we focus on the temporal changes in trunk rotation angle. By analyzing this data, we can determine the location and direction of the curve. Furthermore, by combining Cobb angles inferred using machine learning and other methods, we can quantify the degree of spinal curvature and define information such as spinal health scores, providing a more intuitive description of spinal health status.
[0006] However, there is currently a lack of technology that can capture tiny rotational changes in the user's torso in three-dimensional space through sensors such as the gyroscope and accelerometer built into the mobile phone. Existing technologies for monitoring spinal health are mostly invasive and rely on professional equipment. They are very inconvenient and unrealistic, and are costly. They also cannot track and determine spinal health status in real time.
[0007] Based on this, it is necessary to provide a method and system to infer the position and direction of scoliosis based on the user's trunk rotation angle (ATR) sequence data transmitted by the mobile phone sensor, and determine the optimal scoliosis angle through machine learning. Finally, a spinal health assessment model that can reflect the health status of the spine in real time is constructed to solve the technical problems in the existing technology that spinal health monitoring methods are mostly invasive and rely on professional equipment, have poor convenience and real-time performance, are expensive, and cannot track and determine the health status of the spine in real time. This can improve the convenience, real-time nature and personalization of spinal health status monitoring and assessment, and reduce costs without being invasive. Summary of the Invention
[0008] In response to the technical problems mentioned above, the present invention provides a method and system for constructing a spinal health status assessment model. Based on the user's trunk rotation angle (ATR) sequence data transmitted by the mobile phone sensor, the method infers the position and direction of scoliosis, and determines the optimal scoliosis angle through machine learning. Finally, a spinal health assessment model that can reflect the spinal health status in real time is constructed to solve the technical problems in the existing technology that most spinal health monitoring methods are invasive and rely on professional equipment, have poor convenience and real-time performance, are costly, and cannot track and determine the spinal health status in real time.
[0009] The present invention provides a method for constructing a spinal health status assessment model, the method comprising:
[0010] S1. Define the spinal health status data structure and the spinal health status assessment model structure based on the spinal health status impression factors and the scoliosis situation; S2. Acquire spinal health status assessment data based on the spinal health status data structure, and serialize the spinal health status assessment data to obtain spinal health status assessment sequence data; S3. Use a regularized regression model to perform regularized iterative processing on the spinal health status assessment sequence data based on the spinal health status assessment model structure to determine the optimal scoliosis angle; S4. Construct a spinal health status assessment model based on the optimal scoliosis angle and the spinal health status assessment model structure.
[0011] Preferably, in step S2, the step of obtaining spinal health status assessment data according to the spinal health status data structure and serializing the spinal health status assessment data further includes: S21, obtaining basic information data of spinal health status containing timestamps in chronological order according to the spinal health status data structure; S22, converting the basic information data into uniform speed sequence data in chronological order based on the timestamp; S23, extracting the trunk rotation angle from the uniform speed sequence data, and cleaning the abnormal values in the trunk rotation angle to obtain the cleaned trunk rotation angle; S24, analyzing the basic information data and the cleaned trunk rotation angle to determine the scoliosis position and scoliosis direction, and generating the spinal health status assessment sequence data; wherein, the basic information data includes: the trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index (BMI), indoor exercise time, outdoor exercise time and sole wear data.
[0012] Preferably, in step S23, the step of extracting the trunk rotation angle from the uniform speed sequence data and cleaning the abnormal values in the trunk rotation angle to obtain the cleaned trunk rotation angle further includes: S23-1, abnormal value processing: traversing all the values of the trunk rotation angle, calculating the difference between two adjacent trunk rotation angles based on the timestamp, comparing the difference with the preset difference, and determining the value of the latter trunk rotation angle of the two adjacent trunk rotation angles according to the comparison result; S23-2, generating sublists and adding marks: dividing the values of the trunk rotation angle after abnormal value processing into two sequences according to positive and negative values to form corresponding sub-columns and sub-lists, and adding symbol marks to each sub-list respectively; S23-3, filtering insignificant sub-lists: extracting the value of the largest trunk rotation angle in the sub-list, and adding the largest trunk The value of the trunk rotation angle is compared with the preset difference. If the value of the maximum trunk rotation angle is less than the preset difference, the corresponding sublist is a sublist with insignificant spinal curvature, and the sublist is deleted; S23-4, constructing a sublist index: reordering all the sublists after deleting the insignificant sublist according to the value of the maximum trunk rotation angle and constructing an index; S23-5, deleting sublists with the same slope: obtaining the slopes corresponding to all the sublists after constructing the index. If there are two equal sublists, deleting the sublist with the smaller value of the maximum trunk rotation angle in the two sublists to obtain a cleaned sublist, and deleting the corresponding index; S23-6, obtaining the cleaned trunk rotation angle based on the index and the cleaned sublist; wherein the preset difference is set according to the actual evaluation standard of the trunk rotation angle.
[0013] Preferably, the step S23-1 further includes: S23-11, if the difference is greater than the preset difference, then the value of the latter of the two adjacent trunk rotation angles is determined to be an abnormal value, and the value of the latter trunk rotation angle is set to the value of the previous trunk rotation angle; if the difference is less than or equal to the preset difference, then retaining the original values corresponding to the two adjacent trunk rotation angles; S23-12, continuing to calculate and compare the difference between the next two adjacent trunk rotation angles, and repeating step S23-11 until all abnormal values in the trunk rotation angles are processed, and jumping to step S23-2;
[0014] Among them, the step S24 further includes: determining the scoliosis position and the scoliosis direction based on the value of the maximum trunk rotation angle and the corresponding index in the cleaned sublist; generating the spinal health status assessment sequence data based on the basic information data, the scoliosis position and the scoliosis direction.
[0015] Preferably, in step S3, the step of using a regularized regression model to perform regularized iterative processing on the spinal health status assessment sequence data includes a step of classification missing processing, specifically: S311, data classification conversion: classifying the spinal health status assessment sequence data according to the data type, and obtaining first numerical sequence data and non-numerical sequence data respectively; S312, missing value filling: traversing the first numerical sequence data and the non-numerical sequence data, and filling in the missing values, wherein, if there are missing values in the first numerical sequence data, the missing values are assigned to the average value of the value of the previous first numerical sequence data and the value of the next first numerical sequence data of the missing value, and if there are missing values in the non-numerical sequence data, the missing values are marked as null values; S313, adding label coding: adding label coding to the first numerical sequence data and the non-numerical sequence data respectively, and mapping the non-numerical sequence data to the second numerical sequence data according to the label coding.
[0016] Preferably, in step S3, the step of using the regularized regression model to perform regularized iterative processing on the spinal health status assessment sequence data also includes the step of data regularization processing, specifically: S321, based on the spinal health status assessment data structure, constructing a decision tree, and obtaining the number and depth of the decision tree, and determining the iteration type; S322, based on the decision tree and the iteration type, using the spinal health status assessment sequence data as regression model parameters and sample data, using the regularized regression model for iterative training, and respectively determining the maximum depth, learning rate, number of iterations, minimum leaf node weight, first regularization weight coefficient, second regularization weight coefficient and regularization term of the decision tree, as well as the difference between the predicted value and the actual value, and the optimal scoliosis angle.
[0017] Preferably, the regularized regression model includes two parts: a loss function and a regularization term; wherein the regularized regression model is:
[0018] is the loss function used to measure the actual value y i and predicted value the differences between;
[0019] Ω(fk ) is the regularization term, used to control the complexity of the regularized regression model;
[0020] Θ is the regression model parameter, n is the number of samples of the spinal health status assessment sequence data, and k is the number of decision trees;
[0021] is the predicted value of the regularized regression model,
[0022] X i is the sample data, f k (X i ) is the kth decision tree for the sample data X i The predicted value of .
[0023] Preferably, in step S4, the step of constructing a spinal health status assessment model based on the optimal scoliosis angle and the spinal health status assessment model structure further includes: S41, based on the age in the spinal health status assessment sequence data, and determining the bone age according to the bone age estimation rule; S42, using the age, the optimal scoliosis angle, the optimal scoliosis angle, the skeletal maturity assessment index and the intermediate variable calculation formula to determine the intermediate variable X that affects the risk rate of scoliosis worsening; S43, according to the spinal health status assessment model structure, using the age, the bone age and the intermediate variable X to construct a spinal health status assessment model;
[0024] The calculation formula of the intermediate variable is:
[0025] Cobb is the optimal scoliosis angle, age is the age, and Risser sign is the skeletal maturity assessment index;
[0026] The spinal health status assessment model is:
[0027] ROD is the risk percentage of worsening scoliosis, and X is the intermediate variable.
[0028] Preferably, the spinal health status assessment data structure includes: basic information data and analysis and evaluation data; the spinal health status assessment model structure includes: node number, node, weight, depth, number of iterations, and regularization penalty coefficient; wherein, the basic information data includes: trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index BMI, indoor exercise time, outdoor exercise time and sole wear data; the analysis and evaluation data includes: scoliosis position and scoliosis direction; the sole wear data includes: left sole wear data, right sole wear data, inner sole wear data and outer sole wear data.
[0029] Correspondingly, the present invention also provides a system for constructing a spinal health status assessment model, the system comprising a model structure initialization module, a data sequence processing module, a data regularization processing module and an assessment model construction module; wherein the model structure initialization module is used to define the spinal health status data structure and the spinal health status assessment model structure according to the spinal health status impression factors and the scoliosis situation; the data sequence processing module is used to obtain spinal health status assessment data according to the spinal health status data structure, and serialize the spinal health status assessment data to obtain spinal health status assessment sequence data; the data regularization processing module uses a regularized regression model to perform regularized iterative processing on the spinal health status assessment sequence data according to the spinal health status assessment model structure to determine the optimal scoliosis angle; the assessment model construction module is used to construct a spinal health status assessment model according to the optimal scoliosis angle and the spinal health status assessment model structure.
[0030] By applying the above technical solutions, the present invention realizes the inference of the position and direction of scoliosis based on the user's trunk rotation angle (ATR) sequence data transmitted by the mobile phone sensor, and determines the optimal scoliosis angle through machine learning. Finally, a spinal health assessment model that can reflect the health status of the spine in real time is constructed, and the risk percentage of scoliosis worsening is quickly obtained based on the spinal health assessment model. This solves the technical problems in the existing technology that most spinal health monitoring methods are invasive and rely on professional equipment, have poor convenience and real-time performance, are costly, and cannot track and determine the health status of the spine in real time. Therefore, under the premise of non-invasiveness, the convenience, real-time performance and personalization of spinal health status monitoring and assessment are improved, and the cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0032] Figure 1 A schematic diagram showing a flow chart of a method for constructing a spinal health status assessment model proposed in an embodiment of the present invention;
[0033] Figure 2 A structural diagram of a system for constructing a spinal health status assessment model proposed in an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0035] The present invention provides a method for constructing a spinal health status assessment model, such as Figure 1 As shown, the method includes the following steps:
[0036] S1, based on the spinal health status impression factors and scoliosis conditions, define the spinal health status data structure and the spinal health status assessment model structure.
[0037] In this embodiment, the spinal health status assessment data structure includes: basic information data and analysis and assessment data;
[0038] The spinal health status assessment model structure includes: node number, node, weight, depth, number of iterations, and regularization penalty coefficient;
[0039] in,
[0040] The basic information data includes: trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index (BMI), indoor exercise time, outdoor exercise time, and shoe wear data;
[0041] The analysis and evaluation data include: scoliosis location and scoliosis direction;
[0042] The sole wear data includes: left sole wear data, right sole wear data, inner sole wear data and outer sole wear data.
[0043] S2. Acquire spinal health status assessment data according to the spinal health status data structure, and perform serialization processing on the spinal health status assessment data to obtain spinal health status assessment sequence data.
[0044] In this embodiment, in step S2, the step of obtaining spinal health status assessment data according to the spinal health status data structure and serializing the spinal health status assessment data further includes:
[0045] S21, acquiring basic information data of the spinal health status including a timestamp in chronological order according to the spinal health status data structure;
[0046] S22, converting the basic information data into uniform speed sequence data in chronological order according to the timestamp;
[0047] S23, extracting a trunk rotation angle from the uniform speed sequence data, and cleaning abnormal values in the trunk rotation angle to obtain a cleaned trunk rotation angle;
[0048] S24, analyzing the basic information data and the cleaned trunk rotation angle to determine the scoliosis position and scoliosis direction, and generating the spinal health status assessment sequence data;
[0049] in,
[0050] The basic information data includes: the trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index (BMI), indoor exercise time, outdoor exercise time and sole wear data.
[0051] In this embodiment, in step S23, the step of extracting the trunk rotation angle from the uniform speed sequence data and cleaning abnormal values in the trunk rotation angle to obtain the cleaned trunk rotation angle further includes:
[0052] S23-1, outlier processing: traversing all the values of the trunk rotation angles, calculating the difference between two adjacent trunk rotation angles based on the timestamp, comparing the difference with a preset difference, and determining the value of the latter of the two adjacent trunk rotation angles based on the comparison result;
[0053] S23-2, generating sublists and adding markers: dividing the values of the trunk rotation angle after outlier processing into two sequences according to positive and negative values, forming corresponding sublists and subcolumns, and adding a symbol to each sublist;
[0054] S23-3, filtering the insignificant sublist: extracting the maximum trunk rotation angle value in the sublist, and comparing the maximum trunk rotation angle value with the preset difference value; if the maximum trunk rotation angle value is less than the preset difference value, the corresponding sublist is an insignificant spinal curvature sublist, and the sublist is deleted;
[0055] S23-4, constructing a sublist index: reordering all the sublists after deleting the insignificant sublists according to the value of the largest trunk rotation angle and constructing an index;
[0056] S23-5, deleting sublists with the same slope: Obtain the slopes corresponding to all sublists after indexing. If there are two equal sublists, delete the sublist with the smaller maximum trunk rotation angle between the two sublists to obtain a cleaned sublist and delete the corresponding index.
[0057] S23-6, acquiring the cleaned torso rotation angle based on the index and the cleaned sublist;
[0058] The preset difference is set according to the actual evaluation standard of the trunk rotation angle.
[0059] In this embodiment, the step S23-1 further includes:
[0060] S23-11, if the difference is greater than the preset difference, the value of the latter of the two adjacent trunk rotation angles is determined to be an abnormal value, and the value of the latter trunk rotation angle is set to the value of the former trunk rotation angle; if the difference is less than or equal to the preset difference, the original values corresponding to the two adjacent trunk rotation angles are retained;
[0061] S23-12, continue calculating and comparing the difference between the next two adjacent trunk rotation angles, and repeat step S23-11 until all abnormal values in the trunk rotation angles are processed, and then jump to step S23-2;
[0062] The step S24 further includes:
[0063] determining the scoliosis position and the scoliosis direction according to the maximum trunk rotation angle value and the corresponding index in the cleaned sublist;
[0064] The spinal health status assessment sequence data is generated based on the basic information data, the scoliosis position and the scoliosis direction.
[0065] S3. According to the spinal health status assessment model structure, a regularized regression model is used to perform regularized iterative processing on the spinal health status assessment sequence data to determine the optimal scoliosis angle.
[0066] In this embodiment, in step S3, the step of performing regularized iterative processing on the spinal health status assessment sequence data using a regularized regression model includes a step of classification missing processing, specifically:
[0067] S311, data classification conversion: classifying the spinal health status assessment sequence data according to the data type to obtain first numerical sequence data and non-numerical sequence data respectively;
[0068] S312, filling missing values: traverse the first numerical sequence data and the non-numerical sequence data, and fill missing values, wherein, if there is a missing value in the first numerical sequence data, the missing value is assigned to the average value of the value of the first numerical sequence data before the missing value and the value of the first numerical sequence data after the missing value; if there is a missing value in the non-numerical sequence data, the missing value is marked as a null value;
[0069] S313, adding label codes: adding label codes to the first numerical sequence data and the non-numerical sequence data respectively, and mapping the non-numerical sequence data into second numerical sequence data according to the label codes.
[0070] In this embodiment, in step S3, the step of performing regularized iterative processing on the spinal health status assessment sequence data using a regularized regression model also includes a data regularization step, specifically:
[0071] S321, constructing a decision tree based on the spinal health status assessment data structure, obtaining the number and depth of the decision tree, and determining an iteration type;
[0072] S322, based on the decision tree and the iteration type, the spinal health status assessment sequence data is used as the regression model parameters and sample data, and the regularized regression model is used for iterative training to respectively determine the maximum depth, learning rate, number of iterations, minimum leaf node weight, first regularization weight coefficient, second regularization weight coefficient and regularization term of the decision tree, as well as the difference between the predicted value and the actual value, and the optimal scoliosis angle.
[0073] In this embodiment, the regularized regression model includes two parts: a loss function and a regularization term;
[0074] in,
[0075] The regularized regression model is:
[0076] is the loss function used to measure the actual value y i and predicted value the differences between;
[0077] Ω(f k ) is the regularization term, used to control the complexity of the regularized regression model;
[0078] Θ is the regression model parameter, n is the number of samples of the spinal health status assessment sequence data, and k is the number of decision trees;
[0079] is the predicted value of the regularized regression model,
[0080] X i is the sample data, f k (X i ) is the kth decision tree for the sample data X i The predicted value of .
[0081] S4, constructing a spinal health status assessment model according to the optimal scoliosis angle and the spinal health status assessment model structure.
[0082] In this embodiment, in step S4, the step of constructing a spinal health status assessment model based on the optimal scoliosis angle and the spinal health status assessment model structure further includes:
[0083] S41, based on the age in the spinal health status assessment sequence data, and determining the bone age according to the bone age estimation rule;
[0084] S42, using the age, the optimal scoliosis angle, the optimal scoliosis angle, the skeletal maturity assessment index, and the intermediate variable calculation formula to determine the intermediate variable X that affects the risk rate of scoliosis worsening;
[0085] S43, constructing a spinal health status assessment model according to the spinal health status assessment model structure using the age, the bone age and the intermediate variable X;
[0086] in,
[0087] The intermediate variable calculation formula is:
[0088] Cobb is the optimal scoliosis angle, age is the age, and Risser sign is the skeletal maturity assessment index;
[0089] The spinal health status assessment model is:
[0090] ROD is the risk percentage of worsening scoliosis, and X is the intermediate variable.
[0091] In order to facilitate those skilled in the art to better understand the method for constructing the spinal health status assessment model provided by the present invention, this step is now given as an example for further explanation. The specific contents are as follows:
[0092] Scoliosis is a pathological condition characterized by spinal structural abnormalities, typically measured and assessed using the Cobb angle. The Cobb angle refers to the maximum angle between two vertebrae in scoliosis. By measuring the Cobb angle, the degree of spinal deviation can be determined and the patient's spinal health can be further assessed.
[0093] The establishment of the spinal health status model is based on the user's trunk rotation angle (ATR) sequence transmitted by the mobile phone sensor. It aims to infer the location and direction of scoliosis through this sequence, and provide patients with more detailed spinal health status information by inferring the Cobb angle, the golden indicator of scoliosis, through machine learning methods.
[0094] In actual application scenarios, the following process may be used to infer the location and direction of scoliosis based on the user's torso rotation angle (ATR) sequence transmitted by the mobile phone sensor:
[0095] First, the ATR sequence transmitted by the mobile phone is converted into a uniform speed sequence based on timestamps and other factors to ensure temporal uniformity and consistency in the subsequent analysis process. Next, for patients with a maximum trunk rotation angle (ATR) less than 5, according to official documents from the National Health Commission, these patients are considered to have no scoliosis. However, since we will subsequently provide personalized treatment plans for these patients, we will classify these patients as a separate category and not conflate them with patients who have no scoliosis at all.
[0096] For cases where the maximum trunk rotation angle (ATR) is greater than or equal to 5, we perform data cleaning. The specific process is as follows:
[0097] 1) Handling outliers: By detecting the ATR difference between adjacent times, any difference greater than 5 is corrected to the angle of the previous moment to eliminate anomalies caused by user hand shaking or other misoperations.
[0098] 2) Split the sequence into different sublists according to the sign of the angle and record the sign of each sublist.
[0099] 3) If the maximum ATR in the sublist is less than 5, the curvature in the current sublist is probably not significant, so the current sublist is filtered.
[0100] 4) Find the maximum value in each sublist and its corresponding index in the entire sequence.
[0101] 5) Ensure that the slope signs of adjacent sublists are different. If they are the same, keep the sublist with the larger ATR in the adjacent lists with the same sign and delete the other one.
[0102] Finally, by cleaning the data, the maximum angle and corresponding index in the list of the same symbol were obtained, thereby determining the bending position and bending direction of the spine.
[0103] Scoliosis can be divided into many situations, including single curvature, double curvature, triple curvature and no curvature. The speculation of the specific scoliosis type takes into account the relative relationship between the thoracic and lumbar segments, whether the thoracic segment is the main curvature site, whether there is a double curvature balance and other factors. Among them, the thoracic segment is mainly means that if both the thoracic and lumbar segments are curved, the curvature angle of the thoracic segment is greater than the curvature angle of the lumbar segment. Double curvature balance means that the Cobb angles of the thoracic and lumbar segments are within 10 degrees. When there is no curvature in the thoracic segment, and both the thoracolumbar and lumbar segments are curved, we speculate whether the position is in the thoracolumbar or lumbar segment through the maximum trunk rotation angle (ATR). The specific scoliosis types are shown in Table 1.
[0104] Table 1
[0105]
[0106]
[0107] Machine Learning Predicts Cobb:
[0108] The machine learning method is applied to predict the Cobb angle of scoliosis by analyzing the patient's basic information and living conditions. A series of variables are selected as input features, which cover multiple aspects, including physiological characteristics, lifestyle, and gait information. Among them,
[0109] 1) Gender: The patient's gender may be related to spinal health because men and women have different physiological structures.
[0110] 2) Age: The patient's age is a key factor, as spinal problems may occur or worsen with age.
[0111] 3) Height: Height may be related to the length and curvature of the spine and is therefore also an important input feature.
[0112] 4) Weight: Weight has an impact on the load on the spine and is therefore also taken into consideration.
[0113] 5) (Body Mass Index): BMI is a function of height and weight and reflects a person's overall health and is also related to spinal health.
[0114] 6) Daily indoor and outdoor exercise time: Exercise habits may affect the development and maintenance of the spine.
[0115] 7) Wear of soles of left and right feet: Sole wear can provide information about gait and foot support, which is related to spinal health.
[0116] 8) Wear of the inner and outer sides of the soles: This is also a variable related to gait and foot support, and has a certain indicative effect on spinal health.
[0117] 9) Bone age: Bone age is an indicator of the patient's bone development and is important for assessing spinal health.
[0118] For machine learning analysis, non-numeric features are labeled and mapped to integers for subsequent use in the model. The purpose of label encoding is to convert categorical data into numerical data to facilitate the application of machine learning algorithms.
[0119] For missing values of numerical features, the mean is used to replace them to maintain data integrity and consistency. For missing values of non-numeric features, the string "NONE" is used to identify these missing values in subsequent processing.
[0120] Use the XGBRegressor regression model based on the gradient boosting framework, which uses an algorithm called Extreme Gradient Boosting (XGBoost). XGBoost is a powerful and efficient machine learning algorithm widely used for regression and classification problems. It improves model performance by integrating the prediction results of multiple weak learners (usually decision trees).
[0121] The basic idea of XGBoost is to add a new model in each round of iteration, which focuses on the errors of the previous model. Through iteration, the model is continuously improved, and finally a powerful ensemble model is obtained.
[0122] The objective function of XGBoost consists of two parts: the loss function of the training data and the regularization term (to prevent overfitting).
[0123] The objective function is:
[0124] in:
[0125] Θ represents the model parameters.
[0126] n is the number of training samples.
[0127] Is the loss function, measuring the actual value y i and predicted value The difference between.
[0128] K is the number of trees.
[0129] Ω(f k ) is a regularization term used to control the complexity of the model.
[0130] XGBoost model prediction:
[0131] The prediction value of the XGBoost model is the weighted sum of multiple weak learners and is calculated using the following formula:
[0132]
[0133] in:
[0134] is the predicted value of the model.
[0135] K is the number of trees.
[0136] f k (X i ) is the k-th tree for sample X i The predicted value of .
[0137] Below is a detailed description of each parameter used in the process:
[0138] 1. max_depth (maximum depth of the tree):
[0139] Parameter Description: The maximum depth of the tree, used to control the complexity of the tree. A larger value can increase the complexity of the model, but it is also prone to overfitting.
[0140] Here, max_depth is the maximum depth of the tree.
[0141] 2. learning_rate (learning rate):
[0142] Parameter Description: Learning rate, used to control the update amplitude of weights in each iteration. A smaller learning rate makes the model more stable, but requires more iterations.
[0143] Among them, Gradient is the gradient of the loss function with respect to the current weight.
[0144] 3.n_estimators (number of weak learners):
[0145] Parameter Description: The number of weak learners, that is, the number of iterations. Increasing this value usually improves model performance, but also increases training time.
[0146] 4. objective (learning task and loss function):
[0147] Parameter Description: Defines the learning task and the corresponding loss function. Here, "reg:squarederror" represents the regression task and uses the mean squared error (MSE) as the loss function.
[0148] 5. Booster (type of weak learner):
[0149] Parameter Description: Type of weak learner. "gbtree" means using a tree model as a weak learner.
[0150] 6.gamma (controls tree splitting):
[0151] Parameter Description: Controls the splitting of the tree. A split will only occur if the split gain is greater than gamma. A larger gamma can prevent overfitting.
[0152] Split only occurs when Split Gain > gamma, where current_loss is the loss of the current node and new_loss is the sum of the losses of the two child nodes of the new split.
[0153] 7.min_child_weight (minimum leaf node weight sum):
[0154] Parameter Description: If the sum of the weights of a leaf node is less than min_child_weight, consider stopping the split. Used to prevent overfitting.
[0155] LeafWeight = min_child_weight
[0156] 8.reg_alpha (penalty coefficient for L1 regularization):
[0157] Parameter Description: Increasing this value will increase sparsity and reduce the number of features.
[0158] Among them, is the weight of the i-th feature.
[0159] 9.reg_lambda (penalty coefficient of L2 regularization):
[0160] Parameter Description: Increasing this value will increase the stability of the model.
[0161] Among them, is the weight of the i-th feature.
[0162] By continuously training the model and adjusting its parameters to optimal levels, we can better predict a patient's Cobb angle. Combined with information from the phone's sensors about the location and direction of the scoliosis, we can create a comprehensive spinal health score for each patient, enabling personalized treatment and rehabilitation plans. This scoring system helps better understand a patient's spinal health and provides guidance to medical professionals to optimize treatment outcomes.
[0163] Risk of scoliosis worsening:
[0164] Using the Python libraries NumPy and SciPy, we compared known curve patterns with commonly used models and found that the curve resembled the logistic function. We then selected a certain number of x and y data points from the curve to further fit the function parameters and verified whether the parameters were offset by randomly selecting points.
[0165] Ultimately, the scoliosis progression risk model we obtained involved comprehensive information such as Cobb angle, bone age, and individual age. The following are the detailed model calculation steps:
[0166] 1. Calculation of bone age
[0167] Bone age is an indicator of individual skeletal maturity and is crucial for calculating the risk of scoliosis progression. If direct bone age data is unavailable, we have learned from literature that it can be estimated based on the time of menarche or voice change. The specific rules are as follows:
[0168] - No menarche or voice change: bone age is 0.
[0169] - Occurs and occurs before 6 months: bone age is 1.
[0170] - Occurring within 6 months and less than 1 year: bone age is 2.
[0171] - Occurrence is more than one year but less than two years: bone age is 3.
[0172] - Occurrence is more than two years and less than three years: bone age is 4.
[0173] - Occurrence is greater than or equal to 3 years: bone age is 5.
[0174] 2. Calculation of intermediate variable x:
[0175] The intermediate variable x is a key step in calculating the risk rate of scoliosis worsening and is calculated using the following formula:
[0176]
[0177] in:
[0178] The Cobb angle is the degree obtained through imaging examinations (such as X-rays) or predictions by machine learning methods, Rissersign is an indicator for evaluating the degree of skeletal maturity, and age is the individual's age.
[0179] 3. Deterioration risk rate
[0180] The intermediate variable x is a key step in calculating the risk rate of scoliosis worsening and is calculated using the following formula:
[0181]
[0182] The "Risk of Deterioration" model comprehensively considers Cobb angle, individual age, and bone age, calculating the risk of scoliosis progression using a logistic function. This comprehensive calculation method more accurately reflects individual differences and risk levels in scoliosis progression.
[0183] By applying the above technical solutions, the user's trunk rotation angle (ATR) sequence data transmitted by the mobile phone sensor is used to infer the position and direction of scoliosis, and the optimal scoliosis angle is determined through machine learning. Finally, a spinal health assessment model that can reflect the health status of the spine in real time is constructed, and the risk percentage of scoliosis worsening is quickly obtained based on the spinal health assessment model. This solves the technical problems in the existing technology that spinal health monitoring methods are mostly invasive and rely on professional equipment, have poor convenience and real-time performance, are expensive, and cannot track and determine the health status of the spine in real time. Therefore, under the premise of non-invasiveness, the convenience, real-time performance and personalization of spinal health status monitoring and assessment are improved, and the cost is reduced.
[0184] Corresponding to the method for constructing a spinal health status assessment model in one embodiment of the present invention, the present invention also discloses a system for constructing a spinal health status assessment model, such as Figure 2 As shown, the system includes a model structure initialization module, a data sequence processing module, a data regularization processing module and an evaluation model construction module;
[0185] in,
[0186] The model structure initialization module is used to define the spinal health status data structure and the spinal health status assessment model structure according to the spinal health status impression factors and the scoliosis situation;
[0187] The data sequence processing module is used to obtain spinal health status assessment data according to the spinal health status data structure, and perform serialization processing on the spinal health status assessment data to obtain spinal health status assessment sequence data;
[0188] The data regularization processing module performs regularization iterative processing on the spinal health status assessment sequence data using a regularized regression model according to the spinal health status assessment model structure to determine an optimal scoliosis angle;
[0189] The evaluation model construction module is used to construct a spinal health status evaluation model based on the optimal scoliosis angle and the spinal health status evaluation model structure.
[0190] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0191] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.
Claims
1. A method for constructing a spinal health status assessment model, characterized in that: The method comprises: S1, based on the spinal health status impression factors and scoliosis conditions, define the spinal health status data structure and spinal health status assessment model structure; S2, acquiring spinal health status assessment data according to the spinal health status data structure, and performing serialization processing on the spinal health status assessment data to obtain spinal health status assessment sequence data; S3, performing regularized iterative processing on the spinal health status assessment sequence data using a regularized regression model according to the spinal health status assessment model structure to determine an optimal scoliosis angle; S4, constructing a spinal health status assessment model according to the optimal scoliosis angle and the spinal health status assessment model structure.
2. The method according to claim 1, wherein In step S2, the step of obtaining spinal health status assessment data according to the spinal health status data structure and serializing the spinal health status assessment data further includes: S21, acquiring basic information data of the spinal health status including a timestamp in chronological order according to the spinal health status data structure; S22, converting the basic information data into uniform speed sequence data in chronological order according to the timestamp; S23, extracting a trunk rotation angle from the uniform speed sequence data, and cleaning abnormal values in the trunk rotation angle to obtain a cleaned trunk rotation angle; S24, analyzing the basic information data and the cleaned trunk rotation angle to determine the scoliosis position and scoliosis direction, and generating the spinal health status assessment sequence data; in, The basic information data includes: the trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index (BMI), indoor exercise time, outdoor exercise time and sole wear data.
3. The method according to claim 2, wherein In step S23, the step of extracting the trunk rotation angle from the uniform speed sequence data and cleaning abnormal values in the trunk rotation angle to obtain the cleaned trunk rotation angle further includes: S23-1, outlier processing: traversing all the values of the trunk rotation angles, calculating the difference between two adjacent trunk rotation angles based on the timestamp, comparing the difference with a preset difference, and determining the value of the latter of the two adjacent trunk rotation angles based on the comparison result; S23-2, generating sublists and adding markers: dividing the values of the trunk rotation angle after outlier processing into two sequences according to positive and negative values, forming corresponding sublists and subcolumns, and adding a symbol to each sublist; S23-3, filtering the insignificant sublist: extracting the maximum trunk rotation angle value in the sublist, and comparing the maximum trunk rotation angle value with the preset difference value; if the maximum trunk rotation angle value is less than the preset difference value, the corresponding sublist is an insignificant spinal curvature sublist, and the sublist is deleted; S23-4, constructing a sublist index: reordering all the sublists after deleting the insignificant sublists according to the value of the largest trunk rotation angle and constructing an index; S23-5, deleting sublists with the same slope: Obtain the slopes corresponding to all sublists after indexing. If there are two equal sublists, delete the sublist with the smaller maximum trunk rotation angle between the two sublists to obtain a cleaned sublist and delete the corresponding index. S23-6, acquiring the cleaned torso rotation angle based on the index and the cleaned sublist; The preset difference is set according to the actual evaluation standard of the trunk rotation angle.
4. The method according to claim 3, wherein The step S23-1 further includes: S23-11, if the difference is greater than the preset difference, the value of the latter of the two adjacent trunk rotation angles is determined to be an abnormal value, and the value of the latter trunk rotation angle is set to the value of the former trunk rotation angle; if the difference is less than or equal to the preset difference, the original values corresponding to the two adjacent trunk rotation angles are retained; S23-12, continue calculating and comparing the difference between the next two adjacent trunk rotation angles, and repeat step S23-11 until all abnormal values in the trunk rotation angles are processed, and then jump to step S23-2; The step S24 further includes: determining the scoliosis position and the scoliosis direction according to the maximum trunk rotation angle value and the corresponding index in the cleaned sublist; The spinal health status assessment sequence data is generated based on the basic information data, the scoliosis position and the scoliosis direction.
5. The method according to claim 1, wherein In step S3, the step of performing regularized iterative processing on the spinal health status assessment sequence data using a regularized regression model includes a step of classification missing processing, specifically: S311, data classification conversion: classifying the spinal health status assessment sequence data according to the data type to obtain first numerical sequence data and non-numerical sequence data respectively; S312, filling missing values: traverse the first numerical sequence data and the non-numerical sequence data, and fill missing values, wherein, if there is a missing value in the first numerical sequence data, the missing value is assigned to the average value of the value of the first numerical sequence data before the missing value and the value of the first numerical sequence data after the missing value; if there is a missing value in the non-numerical sequence data, the missing value is marked as a null value; S313, adding label codes: adding label codes to the first numerical sequence data and the non-numerical sequence data respectively, and mapping the non-numerical sequence data into second numerical sequence data according to the label codes.
6. The method according to claim 1, wherein In step S3, the step of performing regularized iterative processing on the spinal health status assessment sequence data using a regularized regression model also includes a data regularization processing step, specifically: S321, constructing a decision tree based on the spinal health status assessment data structure, obtaining the number and depth of the decision tree, and determining an iteration type; S322, based on the decision tree and the iteration type, the spinal health status assessment sequence data is used as the regression model parameters and sample data, and the regularized regression model is used for iterative training to respectively determine the maximum depth, learning rate, number of iterations, minimum leaf node weight, first regularization weight coefficient, second regularization weight coefficient and regularization term of the decision tree, as well as the difference between the predicted value and the actual value, and the optimal scoliosis angle.
7. The method according to claim 6, wherein The regularized regression model consists of two parts: loss function and regularization term; in, The regularized regression model is: is the loss function used to measure the actual value y i and predicted value the differences between; Ω(f k ) is the regularization term, used to control the complexity of the regularized regression model; Θ is the regression model parameter, n is the number of samples of the spinal health status assessment sequence data, and k is the number of decision trees; is the predicted value of the regularized regression model, X i is the sample data, f k (X i ) is the kth decision tree for the sample data X i The predicted value of .
8. The method according to claim 1, wherein In step S4, the step of constructing a spinal health status assessment model according to the optimal scoliosis angle and the spinal health status assessment model structure further includes: S41, based on the age in the spinal health status assessment sequence data, and determining the bone age according to the bone age estimation rule; S42, using the age, the optimal scoliosis angle, the optimal scoliosis angle, the skeletal maturity assessment index, and the intermediate variable calculation formula to determine the intermediate variable X that affects the risk rate of scoliosis worsening; S43, constructing a spinal health status assessment model according to the spinal health status assessment model structure using the age, the bone age and the intermediate variable X; in, The intermediate variable calculation formula is: Cobb is the optimal scoliosis angle, age is the age, and Risser sign is the skeletal maturity assessment index; The spinal health status assessment model is: ROD is the risk percentage of worsening scoliosis, and X is the intermediate variable.
9. The method according to claim 1, wherein The spinal health status assessment data structure includes: basic information data and analysis and assessment data; The spinal health status assessment model structure includes: node number, node, weight, depth, number of iterations, and regularization penalty coefficient; in, The basic information data includes: trunk rotation angle, scoliosis angle, age, bone age, gender, height, weight, body mass index (BMI), indoor exercise time, outdoor exercise time, and shoe wear data; The analysis and evaluation data include: scoliosis location and scoliosis direction; The sole wear data includes: left sole wear data, right sole wear data, inner sole wear data and outer sole wear data.
10. A system for implementing the method for constructing a spinal health status assessment model according to claim 1, characterized in that: The system includes a model structure initialization module, a data sequence processing module, a data regularization processing module and an evaluation model construction module; in, The model structure initialization module is used to define the spinal health status data structure and the spinal health status assessment model structure according to the spinal health status impression factors and the scoliosis situation; The data sequence processing module is used to obtain spinal health status assessment data according to the spinal health status data structure, and perform serialization processing on the spinal health status assessment data to obtain spinal health status assessment sequence data; The data regularization processing module performs regularization iterative processing on the spinal health status assessment sequence data using a regularized regression model according to the spinal health status assessment model structure to determine an optimal scoliosis angle; The evaluation model construction module is used to construct a spinal health status evaluation model based on the optimal scoliosis angle and the spinal health status evaluation model structure.
Citation Information
Cited By
Gradient fuzzy decision tree-based Rigo typing prediction model construction method and system
CN121582144A