Design method of personalized gradient porous bone scaffold based on apparent bone mineral density of patient
By constructing a variable density gradient porous structure based on the TPMS function and using the BP neural network model, the problem of insufficient stress shielding effect and bionic structure design of traditional titanium alloy bone stents is solved, and the efficient design of personalized bone stents is achieved to meet the needs of rapid bone defect repair.
Patent Information
- Application Number
- CN202510635899.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-09-05
AI Technical Summary
Traditional titanium alloy bone stents face stress shielding effects caused by mismatch of elastic modulus and host bone tissue, insufficient refinement of bionic structural design, and limited personalized adaptation capabilities, which cannot meet the needs of rapid bone defect repair.
Based on the patient's apparent bone density, a variable density gradient porous structure is constructed through the TPMS function combined with a quadratic function. The elastic modulus and permeability of the gradient porous structure are predicted using the BP neural network model to build a personalized gradient porous bone stent design platform to achieve coordination of mechanics and permeability.
The design of a personalized gradient porous bone stent is realized, matching the patient's elastic modulus and permeability needs, improving the efficiency of bone stent design, and meeting the needs of rapid bone defect repair.
Smart Images

Figure CN120597686A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of bone scaffolds, and in particular relates to a design method of a personalized gradient porous bone scaffold based on the apparent bone density of a patient. Background Art
[0002] Natural bone is a multi-layered composite tissue that has important functions such as protecting internal organs and supporting muscle movement. It is one of the core structures that maintain human physiological activities. However, problems such as traffic accidents, pathological bone defects, and aging-related osteoporosis often lead to bone injuries that are difficult to heal on their own, seriously threatening patients' health and quality of life.
[0003] Titanium alloys are an ideal choice for bone defect repair implants due to their excellent biocompatibility and mechanical properties. However, the elastic modulus of traditional solid titanium alloy implants (about 110GPa) is significantly higher than that of natural bone tissue (0.1-30GPa). After implantation, the stress shielding effect is caused due to insufficient mechanical adaptability. According to Wolff's law, stress shielding reduces the stress stimulation of the bone, that is, the bone scaffold bears excessive load due to its high stiffness, resulting in adaptive bone absorption of the surrounding bone tissue due to insufficient stress stimulation. Under long-term action, the bonding strength of the bone-implant interface may decrease, eventually causing loosening and hindering the bone repair process. Studies have shown that the elastic modulus can be effectively reduced and the stress shielding effect can be alleviated through the design of porous structures. At the same time, in order to meet the needs of cell activity, material exchange and blood vessel growth during bone tissue repair, the porous structure needs to have excellent permeability. The excellent permeability directly determines whether the porous scaffold can become a qualified artificial implant.
[0004] An ideal bone implant must meet the following requirements: ① Provide mechanical support that matches natural bone, avoiding stress shielding; ② Have a porous structure that facilitates nutrient transport, cell migration, and vascular ingrowth. Porous scaffolds with variable density gradients can synergistically optimize mechanical and permeability properties: high-density regions provide structural strength, while low-density regions promote bone tissue ingrowth.
[0005] Triple Periodic Minimal Surfaces (TPMS) are a class of periodic surface structures that extend infinitely in three-dimensional space, are smooth and continuous, and have zero mean curvature. Their interconnected three-dimensional pores and controllable topology make them ideal for simulating bone structure. Recent breakthroughs in additive manufacturing technology have provided new avenues for the fabrication of porous bone implants. The TPMS structure, due to its self-supporting nature (it can be formed without the need for additional support), significantly reduces the difficulty of manufacturing complex porous scaffolds.
[0006] Despite significant advances in materials and forming technology, traditional titanium alloy bone scaffolds still face three major challenges in current clinical applications: stress shielding effect caused by the mismatch between the elastic modulus and the host bone tissue; insufficient refinement of bionic structural design, making it difficult to achieve the synergy between mechanical properties and permeability; and limited personalized adaptation capabilities, which cannot meet the needs of rapid repair of bone defects. Summary of the Invention
[0007] In view of this, the present invention aims to propose a design method for a personalized gradient porous bone scaffold based on the patient's apparent bone density to solve the following problems faced by traditional titanium alloy bone scaffolds: stress shielding effect caused by the mismatch between the elastic modulus and the host bone tissue; insufficient refinement of the bionic structure design, making it difficult to meet the synergy between mechanical properties and permeability; and limited personalized adaptation capabilities, which cannot meet the needs of rapid repair of bone defects.
[0008] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0009] A method for designing a personalized gradient porous bone scaffold based on a patient's apparent bone density comprises the following steps:
[0010] S1. Introduce a quadratic function based on the TPMS function, and control the bias C in the function under different average porosity conditions. in 、C out , constructing a variable density gradient porous structure of bone scaffold, using the offset parameter C in Control the porosity at the center of the gradient porous structure, the offset parameter C out Controlling the porosity at the edge of gradient porous structures;
[0011] S2, obtain "C in 、C out -EK" sample data, the gradient porous structure is subjected to compression mechanics simulation to obtain the elastic modulus E of the gradient porous structure, and the gradient porous structure is subjected to fluid simulation to obtain the permeability K of the gradient porous structure;
[0012] S3. Construct a BP neural network model. The BP neural network model includes an input layer, an output layer, and a hidden layer. The input layer contains two neurons, which are elastic modulus E and permeability K. The output layer contains two neurons, which are bias parameter C. in 、C out , adjust the number of hidden layers and neurons in the hidden layer, analyze the structure-performance data of step S1 and step S2 through the BP neural network model, and improve the accuracy through model training;
[0013] S4. Obtain the patient's apparent bone density through testing, calculate the theoretical elastic modulus E1, and predict the gradient bone scaffold structural parameter C with coordinated mechanical and permeability properties through the BP neural network model. in 、C out ;
[0014] S5. Based on step S4, an intelligent platform for the design of personalized gradient porous bone scaffold structures is constructed, the patient's apparent bone density is input, and the structural parameters and corresponding performance are output.
[0015] Furthermore, in step S1, constructing a variable density gradient porous structure of a bone scaffold includes:
[0016] S11. Combining the quadratic function with the TPMS function to realize the design of the parameterized gradient porous structure. The quadratic function converts the bias parameter C in the gradient porous structure TPMS function into the bias parameter C that controls r=0. in and r = r's bias parameter C out , the implicit expression of TPMS function is as follows:
[0017] Type G:
[0018] Type D:
[0019] P-type:
[0020] I-WP type:
[0021]
[0022] Where C is the offset parameter value of the TPMS function, ranging from (-1, 1);
[0023] The quadratic function expression is as follows:
[0024] y=x 2 ;
[0025] Where x and y represent the coordinate axes of the XY plane in three-dimensional space;
[0026] S12. Through the full factor sampling method, the radial gradient porous structure design parameter C is randomly selected under different average porosity conditions. in 、C out , in order to construct the variable density simulation structure of the bone scaffold.
[0027] Furthermore, in step S2, the “C in 、C out -EK" sample data, including:
[0028] Establish a gradient porous structure model in the modeling software: import the .cdb and .msh formats of the gradient porous structure model into Ansys for compression mechanics simulation and fluid simulation respectively, so as to calculate the elastic modulus E and permeability K of the gradient porous structure, and construct a database of the gradient porous structure bias parameters and the corresponding elastic modulus E and permeability K.
[0029] Furthermore, in step S3, a BP neural network model is constructed to analyze the structure-performance data of steps S1 and S2, and the accuracy is improved through model training, including:
[0030] S31. Construct a BP neural network model and determine the input layer, hidden layer, and output layer;
[0031] S32, training a BP neural network model based on structural parameters and performance data;
[0032] S33. If the error between the simulation value and the error value is small, the training is completed.
[0033] Furthermore, in step S4, the BP neural network model is used to predict the gradient bone scaffold structure parameters C with coordinated mechanical and permeability properties. in 、C out ,include:
[0034] S41. Obtain the patient's apparent bone density through medical means;
[0035] First, a specific bone ROI is scanned accurately using QCT technology to obtain the threshold value TH for the area. Then, the QCT# value is calculated using the formula QCT#=TH-1024. Finally, the QCT# value is converted to the apparent bone density ρ of the ROI area according to the empirical formula. The formula for converting the QCT# value to the apparent bone density of the bone is as follows:
[0036]
[0037] Where ρ is the apparent bone density, and the QCT# value is calculated using the threshold TH-1024;
[0038] S42. The theoretical elastic modulus E1 of the patient's bone defect is obtained using the conversion formula between bone apparent bone density and elastic modulus. The relationship between elastic modulus E and permeability K is fitted using a BP neural network model to screen out the maximum permeability K1. The conversion formula between bone apparent bone density and elastic modulus is as follows:
[0039]
[0040] In the formula, ρ1-ρ4 represent the apparent bone density in different intervals;
[0041] S43. Taking the theoretical elastic modulus E1 and the maximum permeability K1 as the target, predict the corresponding gradient porous structure bias parameter C in 、C out .
[0042] Furthermore, in step S5, an intelligent platform for designing a personalized gradient porous bone scaffold structure is constructed, including:
[0043] Use Python language to build a bone scaffold modeling parameter prediction platform and realize human-computer interaction functions:
[0044] S51, adopts a three-tier architecture design: the presentation layer implements user interaction through the QLineEdit control, the logic layer integrates the BP neural network model trained by PyTorch for parameter prediction, and the data layer uses SQL data sets to manage the prediction training model and calculation results;
[0045] S52. Multiple optimization measures were implemented: using a preloading mechanism to reduce model loading time, using torch.jit.script to accelerate the inference process and control the single prediction time, and implementing the PyQt5 framework from apparent bone density input to 3D visualization output. The visualization module adopted a three-stage pipeline architecture of "generate-cache-display". Matplotlib rendered the 3D surface offline on the Agg backend, then cached it in the video memory using QPixmap and displayed it with adaptive scaling.
[0046] S53, implement real-time input verification, status prompts and exception handling interactive functions, and provide friendly error feedback through QMessageBox;
[0047] S54. Implement the interaction between the GUI page and the BP neural network model.
[0048] Furthermore, in step S31, a BP neural network model is constructed, including:
[0049] S311. Clarify key parameters: Select the elastic modulus E and permeability K of the porous structure as input parameters, and select the bias parameter C that controls the pore structure. in and C out is the output parameter;
[0050] S312. Use four hidden layers to collaborate and complete the nonlinear mapping from input to output: the first hidden layer is designed to have 128 neurons, expanding the 2-dimensional input E and K to 128 dimensions; the second hidden layer is designed to have 256 neurons, increasing the dimension from 128 to 256 dimensions; the third hidden layer is designed to have 128 neurons, reducing the dimension from 256 to 128 dimensions; the fourth hidden layer is designed to have 64 neurons, further compressing the dimension from 128 to 64 dimensions;
[0051] S313. Each hidden layer introduces an activation function, and the activation function uses the positive linear unit ReLU function;
[0052] S314. Innovative improvements were made to key optimization issues in the backpropagation process: a dynamic learning rate strategy was adopted, with the initial learning rate set to 0.001, and the Adam optimization algorithm was introduced to establish a dynamic balance mechanism between the learning rate and model performance.
[0053] S315. Further improve the generalization ability of the model: Introduce the Dropout regularization layer, randomly block some neuron connections with a preset probability during the training phase, and the random inactivation mechanism forms an effective synergy with the ReLU activation function.
[0054] Furthermore, in step S32, a BP neural network model is trained based on the structural parameters and performance data, including:
[0055] S321. Initialization: According to the needs of the prediction task, a feedforward neural network model with a six-layer fully connected structure is constructed. The number of neurons in the input layer of the feedforward neural network model is 2, and the number of neurons in the output layer is 2, corresponding to the input vector elastic modulus E and permeability K and the output vector bias parameter C respectively. in and C out , the four hidden layers contain 128, 256, 128 and 64 neurons respectively. The activation function uses ReLU, and the Dropout mechanism is introduced to prevent overfitting. The weight parameters are randomly initialized at the beginning of training;
[0056] S322, Forward propagation: Input the input features [E, K] of each group of samples in the training set into the BP neural network model, complete the linear transformation and nonlinear activation operations layer by layer, and finally generate the predicted value [C in , C out ], the output formula of the hidden layer node is as follows:
[0057] x (l) =f(W (l-1) x (l-1) +θ (l-1) );
[0058] Where x (l) is the output vector of the l-th layer neuron, W (l-1) is the weight matrix from layer l-1 to layer l, θ (l-1) is the bias vector of the lth layer, and f is the activation function ReLU;
[0059] The output formula of the output layer node is as follows:
[0060]
[0061] Where, is the predicted value output by the BP neural network model, W (L) is the weight matrix of the output layer, x (L) is the output vector of the Lth layer, θ (L) is the bias vector of the output layer;
[0062] S323. Loss calculation: The mean square error is used as the loss function, and the function expression is as follows:
[0063]
[0064] Where, is the predicted value output by the BP neural network model, W (L) is the weight matrix of the output layer, x (L) is the output vector of the Lth layer, θ (L) is the bias vector of the output layer;
[0065] S324, Back Propagation: Use the error back propagation algorithm to train the BP neural network model, calculate the partial derivatives of the loss function with respect to the parameters of each layer of the network, and adjust the weights and biases of the network in the direction of the loss function. The weight update follows the following formula:
[0066]
[0067] Where η is the learning rate; represents the connection weight between the i-th neuron and the j-th neuron in the l-th layer;
[0068] S325, parameter update: In each round of iteration, the Adam optimization algorithm is used to update the BP neural network model parameters. The momentum term update method follows the following formula:
[0069] m t =β1m t-1 +(1-β1)g t ;
[0070] Where m t represents the momentum term at step t, β1 represents the momentum decay coefficient, m t-1 represents the momentum term at step t-1, g t represents the gradient of the t-th step;
[0071] The RMSProp item update method follows the following formula:
[0072] v t =β2×v t-1 +(1-β2)×g t 2 ;
[0073] Where, v t represents the RMSProp term at step t, β2 represents the attenuation coefficient of RMSProp, and v t-1 represents the RMSProp term at step t-1;
[0074] The deviation correction formula is as follows:
[0075]
[0076] The parameter update formula is as follows:
[0077]
[0078] Where θ t represents the model parameters at step t, θ t-1 represents the model parameters at step t-1, α represents the learning rate, and ε is a small constant added for numerical stability;
[0079] S326, iterative training: iteratively train the BP neural network model for 2000 rounds through steps S321 to S326, record the training loss every 200 rounds, and save the model weights to the local path after the training is completed.
[0080] Furthermore, in step S33, if the error between the simulation value and the error value is small, the training is completed, including:
[0081] The structure-performance data are nonlinearly fitted through the BP neural network model, the prediction accuracy of the BP neural network model is evaluated using the mean square error, the parameters of the BP neural network model are optimized, and the elastic modulus E, permeability K and bias parameter C are established. in 、C out The nonlinear relationship between them.
[0082] Compared with the prior art, the design method of a personalized gradient porous bone scaffold based on the patient's apparent bone density described in the present invention has the following beneficial effects:
[0083] (1) Based on the TPMS function, the present invention innovatively applies a quadratic function to achieve a gradient change in the porosity of the TPMS structure. Furthermore, by adjusting the value of the bias parameter, the gradient variation range of the structure can be changed according to demand, thereby constructing a variety of gradient porous structure models.
[0084] (2) The present invention constructs a bone scaffold parameter prediction model based on BP neural network, and realizes high-precision prediction of performance parameters by establishing a nonlinear mapping relationship between multiple physical quantities. A BP neural network with a 6-layer fully connected architecture is constructed, and the hidden layer integrates the ReLU activation function and the Dropout regularization method (deactivation rate 0.2), which effectively enhances the nonlinear characterization ability and controls the complexity of the neural network model. During the training process, the Adam optimization algorithm with adaptive learning rate (initial learning rate 0.001) is adopted, which integrates the gradient direction memory characteristics of the momentum method and the parameter-by-parameter learning rate adjustment mechanism of RMSProp, which significantly accelerates the training process while ensuring convergence stability. After 2000 iterative training, the loss function converged, and the mean square error (MSE) reached 7×10 -6 This lays the foundation for the prediction of design parameters of porous structures.
[0085] (3) The present invention utilizes data to drive personalized design of gradient porous structures. Based on the neural network, personalized design of gradient porous structures and trained neural network prediction models are performed. The patient's apparent bone density is used as input to match the elastic modulus and permeability required by the patient. The bias value C of the gradient porous structure is used as the input. in 、C out For output, a neural network is trained using simulated data to input the patient's apparent bone density and output porous bone scaffold design parameters that match the patient's performance. This platform builds an intelligent platform for personalized gradient porous bone scaffold structural design, enabling human-computer interaction. By inputting the patient's apparent bone density, it outputs structural parameters and corresponding performance, greatly improving the efficiency of bone scaffold design.
[0086] (4) This invention proposes a modeling system for a personalized gradient porous bone scaffold based on the patient's apparent bone density for titanium alloy bone scaffolds used in large-area bone repair medical treatment. By controlling the offset C in the TPMS function in 、C out , construct a gradient porous structure, and through performance simulation and neural network data processing, achieve a gradient porous structure of bone scaffold with coordinated mechanical and permeability properties that matches the patient's apparent bone density, and establish a bone scaffold parameter prediction platform to provide personalized bone scaffold structure design solutions for convenient and efficient bone repair medical treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] The accompanying drawings, which constitute part of the present invention, are provided to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are provided to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0088] Figure 1 A schematic diagram of the technical route described in an embodiment of the present invention;
[0089] Figure 2This is a schematic diagram of a gradient porous structure model according to an embodiment of the present invention;
[0090] Figure 3 This is a schematic diagram of compression mechanics simulation according to an embodiment of the present invention;
[0091] Figure 4 This is a schematic diagram of fluid simulation according to an embodiment of the present invention;
[0092] Figure 5 A schematic diagram of a neural network model according to an embodiment of the present invention;
[0093] Figure 6 Schematic diagram of a neural network training process according to an embodiment of the present invention;
[0094] Figure 7 This is a schematic diagram of the neural network training results according to an embodiment of the present invention;
[0095] Figure 8 Schematic diagram of the bone scaffold modeling parameter prediction platform according to an embodiment of the present invention. DETAILED DESCRIPTION
[0096] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0097] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0098] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0099] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0100] like Figures 1 to 8 As shown, a method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density includes the following steps:
[0101] 1. Introduce a quadratic function based on the G function in TPMS, and control the bias C under different average porosity conditions. in 、C out , constructing a variable density gradient porous structure of bone scaffold. The offset parameter C is used out Control the pore change of the outermost layer of the gradient porous structure, the offset parameter C in Control the pore changes in the innermost layer of the gradient porous structure;
[0102] 2. Based on 1, the “C in 、C out -EK" sample data. The radial gradient porous structure established in 1 was simulated by Ansys Workbench to obtain the elastic modulus of the gradient porous structure. The radial gradient porous structure established in 1 was imported into Ansys Fluent for fluid simulation, and the permeability of the gradient porous structure was derived and calculated numerically.
[0103] 3. Build a neural network model to analyze the above structure-performance data, and improve the prediction accuracy through model training;
[0104] 4. Obtain the patient's apparent bone density through testing, calculate the theoretical elastic modulus E1, and predict the gradient bone scaffold structural parameters (C in 、C out );
[0105] 5. Based on 4, an intelligent platform for the design of personalized gradient porous bone scaffold structures is built. The patient's apparent bone density is input and the structural parameters and corresponding performance are output.
[0106] Specifically, the implicit expression of the three-periodic minimal surface is:
[0107] Type G:
[0108] Wherein, C is the offset parameter value of the TPMS function, and its range is (-1, 1).
[0109] The quadratic function is used to achieve a gradient change in porosity from the center to the edge of the XY plane porous structure, which is specifically expressed as:
[0110] y=x2
[0111] Here, x and y represent the coordinate axes of the XY plane in three-dimensional space.
[0112] The quadratic function is combined with the TPMS function to realize the design of the parameterized gradient porous structure. The quadratic function converts the bias parameter C in the TPMS function of the gradient porous structure into the bias parameter C that controls r=0. in , r=r bias parameter C out , the gradient porous structure established is as Figure 2 shown.
[0113] Specifically, a gradient porous structure model was established in nTopology software. The .cdb and .msh formats of the gradient porous structure model were imported into Ansys for compression mechanics and fluid simulations. The elastic modulus and permeability of the radial gradient porous structure were calculated, and a database of gradient porous structure offset parameters and corresponding elastic moduli and permeabilities was constructed.
[0114] Figure 3 For mechanical simulation, the gradient porous structure scaffold model was imported into Ansys Workbench for compression analysis, and the elastic modulus of the G-type gradient porous structure was found to be in the range of 10-15 GPa, which is consistent with the elastic modulus of human bone tissue of 0.1-30 GPa.
[0115] Figure 4 For fluid simulation, the gradient porous structure scaffold model was imported into Ansys Fluent for fluid analysis to obtain the permeability of the G-type gradient porous structure. The flow of fluid inside the structure was analyzed and the permeability of the G-type gradient porous structure was obtained at 5×10 -8 m 2 -7.1×10 -8 m 2 The permeability range of human bone tissue is 2.56×10 -11 m 2 -7.43×10 -8 m 2 .
[0116] Specifically, in order to achieve the personalized GT porous structure design that meets individual performance requirements, a BP neural network prediction model is constructed. Figure 5 To construct the BP neural network model, Figure 6 is the neural network training process, Figure 7 is the neural network training result.
[0117] 1. Neural network model construction
[0118] When constructing the input and output variables of the model, it is necessary to clarify the key parameters of the research problem. In order to avoid the occurrence of stress shielding phenomenon and achieve coordinated optimization of the mechanics and permeability of the porous structure, the elastic modulus E and permeability K of the porous structure are selected as input parameters; the bias parameter C that controls the pore structure is selected. in and C out For output parameters.
[0119] The structural design of the hidden layer requires a balance between model accuracy and training efficiency. This paper uses four hidden layers in the neural network, each of which plays a different role and works together to complete the nonlinear mapping from input to output. The first hidden layer is designed to have 128 neurons, expanding the 2-dimensional input E and K to 128 dimensions in order to increase the expressive power of the model; to enhance the model capacity and make the input data more complex nonlinear pattern, the second hidden layer is designed to have 256 neurons, increasing the dimension from 128 to 256 dimensions; the third hidden layer is designed to have 128 neurons, reducing the dimension from 256 to 128 dimensions in order to remove redundant information and prevent model overfitting; the fourth hidden layer is designed to have 64 neurons, further compressing the dimension from 128 to 64 dimensions, providing a compact feature representation for the output layer and ensuring that the input to the output layer is highly accurate.
[0120] When designing the model, an activation function is introduced in each hidden layer. After the activation function is introduced, the simple superposition of multiple linear layers will break through the limitations of single-layer linear transformation, thereby effectively characterizing the elastic modulus E, permeability K and bias parameter C. in 、C out The activation function uses the positive linear unit (ReLU) function because it is much faster than the exponential operation of the Sigmoid and Tanh functions when comparing and maximizing. It outputs 0 for negative inputs, which can reduce parameter dependence and enhance generalization ability.
[0121] After completing the basic architecture design of the input layer, output layer, hidden layer and activation function, innovative improvements were made to the key optimization issues in the backpropagation process. First, considering the limitations of traditional fixed learning rates in complex feature mapping, this study adopted a dynamic learning rate strategy, with the initial learning rate set to 0.001, and introduced the Adam (Adaptive Moment Estimation, Adam) optimization algorithm to achieve adaptive adjustment of parameters. The Adam algorithm combines the gradient direction memory characteristics of the momentum term with the parameter-by-parameter learning rate adjustment mechanism of RMSProp, significantly accelerating the training process while ensuring convergence stability. By establishing a dynamic balance mechanism between the learning rate and model performance, the network automatically increases the step size in the early stages of training, and automatically reduces the step size when approaching the optimal solution, effectively resolving the contradiction between the oscillation divergence caused by a large learning rate and the slow convergence of a small learning rate.
[0122] To further enhance the model's generalization capabilities, the Dropout regularization layer was introduced. This addresses the common overfitting problem of neuronal co-adaptation in neural networks by randomly blocking some neuronal connections with a preset probability during training, forcing the network to develop multiple redundant feature representation capabilities. This random dropout mechanism effectively synergizes with the previously designed ReLU activation function. Non-discarded neurons maintain feature representation through nonlinear activation, while temporarily inactivated neurons avoid over-reliance on specific features through parameter freezing. Together, these two layers create a robust feature learning system.
[0123] 2. Neural Network Model Training Process
[0124] This study uses the BP neural network model. First, the weights of the neural network are randomly initialized, and the weights are continuously updated as the neural network is trained. In the forward propagation process, the samples of the training set are input into the neural network, the predicted value is calculated, and MSE is used as the loss function to quantify the deviation between the predicted value and the true value. In the backpropagation stage, the weights and biases of the neural network are adjusted to minimize the loss function, and the Adam optimization algorithm is used to adaptively adjust the learning rate. The entire training process is iterated 2000 times. By continuously optimizing the network parameters, the loss function is gradually converged, and finally a neural network model with good generalization ability is obtained. The training termination condition is set to the convergence of the loss function or the reaching of the set maximum number of iterations to ensure the adequacy and efficiency of the model training. The training process of the neural network in this study is as follows Figure 6 As shown, the specific steps are as follows:
[0125] (1) Initialization
[0126] According to the needs of the prediction task, a feedforward neural network model with a 6-layer fully connected structure was constructed. The number of neurons in the input layer of the model is 2, and the number of neurons in the output layer is 2, corresponding to the input vector elastic modulus E and permeability K and the output vector bias parameter C respectively. in 、C out The four hidden layers contain 128, 256, 128, and 64 neurons, respectively. ReLU is used as the activation function, and a dropout mechanism is introduced to prevent overfitting. Weight parameters are randomly initialized at the beginning of training.
[0127] (2) Forward propagation
[0128] The input features [E, K] of each group of samples in the training set are input into the neural network, and the linear transformation and nonlinear activation operations are completed layer by layer, and finally the predicted value [C in 、C out ], the output formula of the hidden layer node is as follows:
[0129] x (l) =f(W (l-1) x (l-1) +θ (l-1) )
[0130] Where x (l) is the output vector of the l-th layer neuron, W (l-1) is the weight matrix from layer l-1 to layer l, θ (l-1) is the bias vector of the lth layer, and f is the activation function ReLU.
[0131] The output formula of the output layer node is as follows:
[0132]
[0133] Where, is the predicted value output by the neural network, W (L) is the weight matrix of the output layer, x (L) is the output vector of the Lth layer, θ (L) is the bias vector of the output layer.
[0134] (3) Loss calculation
[0135] In order to measure the deviation between the predicted value of the neural network and the true value, the mean square error (MSE) is used as the loss function, and its mathematical expression is as follows:
[0136]
[0137] Where y i is the true value, is the predicted value and n is the number of samples.
[0138] (4) Backpropagation
[0139] The neural network is trained using the error backpropagation algorithm. Specifically, the partial derivatives of the loss function with respect to the parameters of each layer of the network are calculated, and the network weights and biases are adjusted in the direction of the decrease of the loss function. The essence of error backpropagation is the application of the chain rule to a multi-layer structure. The weight update follows the following formula:
[0140]
[0141] Where η is the learning rate; represents the connection weight between the i-th neuron and the j-th neuron in the l-th layer.
[0142] (5) Parameter update
[0143] In each iteration, the Adam optimization algorithm is used to update the neural network parameters. The Adam optimization algorithm combines the advantages of the momentum term (first-order moment estimation) and the RMSProp term (second-order moment estimation), which can achieve faster convergence and more stable training process. The update process is as follows:
[0144] The momentum term update method follows the following formula:
[0145] m t =β1m t-1 +(1-β1)g t
[0146] Where m t represents the momentum term at step t, β1 represents the momentum decay coefficient, m t-1 represents the momentum term at step t-1, g t Represents the gradient of step t. The RMSProp term update method follows the following formula:
[0147] v t =β2×v t-1 +(1-β2)×g t 2
[0148] Where, v t represents the RMSProp term at step t, β2 represents the attenuation coefficient of RMSProp, and v t-1 represents the RMSProp term at step t-1.
[0149] The deviation correction formula is as follows:
[0150]
[0151] The parameter update formula is as follows:
[0152]
[0153] Where θ t represents the model parameters at step t, θ t-1 represents the model parameters at step t-1, α represents the learning rate, and ε is a small constant added for numerical stability.
[0154] (6) Iterative training
[0155] Iterate the neural network through the above steps for 2000 rounds, recording the training loss every 200 rounds to monitor convergence. After training is complete, save the model weights to a local path for subsequent use and inference.
[0156] 3. Neural Network Training Results
[0157] This study uses 50 sets of simulation data to construct a training data set and optimize the parameters of the BP neural network model. Figure 7 The neural network training curve shows good stability characteristics. After completing 2000 full iterations, the training and test sets converge to 10 -6 The MSE error of the BP neural network is calculated to be 7×10 -6 , indicating that the model finally converges to the optimal solution. The convergence of the neural network indicates that the BP neural network can be used to establish the elastic modulus E, permeability K and bias parameter C in 、C out The trained neural network model is the porous structure bias parameter C in 、C out Provides a basis for forecasting.
[0158] Specifically, the patient's apparent bone density is obtained through medical means.
[0159] First, the ROI (Region of Interest) of a specific bone is precisely scanned using QCT technology to obtain the threshold value TH of the region. The QCT# value is then calculated using the formula QCT#=TH-1024. Finally, the QCT# value is converted to the apparent bone density ρ of the ROI region according to an empirical formula. The formula for converting the QCT# value to the apparent bone density of the bone is as follows:
[0160]
[0161] Where ρ is the apparent bone density, and the QCT# value is calculated using the threshold TH-1024.
[0162] The theoretical elastic modulus E1 of the patient's bone defect site is obtained using the formula, and the maximum permeability K1 is screened out by fitting the relationship between the elastic modulus E and K through a neural network. Taking E1 and K1 as targets, the corresponding gradient porous structure bias parameter C is reversely predicted. in 、C out , to achieve personalized matching needs of patients.
[0163] The formula between the apparent bone density and elastic modulus is:
[0164]
[0165] Where ρ1-ρ4 represent the apparent bone density in different intervals.
[0166] Among them, the input apparent bone density ρ is 1.737g / cm 3 The theoretical elastic modulus E1 is calculated to be 10.61 GPa, and the maximum permeability K1 is screened to be 7.03×10 -8 m 2 , the predicted gradient porous structure bias parameter C in 、C out -0.70 and -0.11.
[0167] The predicted gradient porous structure bias value C in 、C out The values of -0.70 and -0.11 were input into nTopology software for modeling. The elastic modulus E = 10.918 GPa and the permeability K = 7.0257×10 -8 m 2 The prediction value of BP neural network is very close to the simulation value. The prediction error of elastic modulus is 2.9% and the prediction error of permeability is 0.06%. The accuracy of the prediction results of neural network is verified by simulation experiments.
[0168] Specifically, such as Figure 8 The Python language is used to build a bone scaffold modeling parameter prediction platform to complete the human-computer interaction function, so as to achieve the purpose of inputting the patient's apparent bone density and outputting the structural parameters and corresponding performance. The output part shows the prediction results, including the bias parameter C out , offset parameter C in , permeability K and elastic modulus E, the output result parameters can facilitate the accuracy of the neural network prediction by simulation experiments. The output image shows the bias parameter C in and C out Distribution of predicted and true values over the range of elastic modulus E and permeability K.
[0169] The advantages and beneficial effects of the present invention are as follows:
[0170] (1) Based on the TPMS function, the present invention innovatively applies a quadratic function to achieve a gradient change in the porosity of the TPMS structure. Furthermore, by adjusting the value of the bias parameter, the gradient variation range of the structure can be changed according to demand, thereby constructing a variety of gradient porous structure models.
[0171] (2) The present invention constructs a bone scaffold parameter prediction model based on BP neural network, and realizes high-precision prediction of performance parameters by establishing a nonlinear mapping relationship between multiple physical quantities. A BP neural network with a 6-layer fully connected architecture is constructed, and the hidden layer integrates the ReLU activation function and the Dropout regularization method (deactivation rate 0.2), which effectively enhances the nonlinear characterization ability and controls the complexity of the neural network model. During the training process, the Adam optimization algorithm with adaptive learning rate (initial learning rate 0.001) is adopted, which integrates the gradient direction memory characteristics of the momentum method and the parameter-by-parameter learning rate adjustment mechanism of RMSProp, which significantly accelerates the training process while ensuring convergence stability. After 2000 iterative training, the loss function converged, and the mean square error (MSE) reached 7×10 -6 This lays the foundation for the prediction of design parameters of porous structures.
[0172] (3) The present invention utilizes data to drive personalized design of gradient porous structures. Based on the neural network, personalized design of gradient porous structures and trained neural network prediction models are performed. The patient's apparent bone density is used as input to match the elastic modulus and permeability required by the patient. The bias value C of the gradient porous structure is used as the input. in 、C out For output, a neural network is trained using simulated data to input the patient's apparent bone density and output porous bone scaffold design parameters that match the patient's performance. This platform builds an intelligent platform for personalized gradient porous bone scaffold structural design, enabling human-computer interaction. By inputting the patient's apparent bone density, it outputs structural parameters and corresponding performance, greatly improving the efficiency of bone scaffold design.
[0173] (4) This invention proposes a modeling system for a personalized gradient porous bone scaffold based on the patient's apparent bone density for titanium alloy bone scaffolds used in large-area bone repair medical treatment. By controlling the offset C in the TPMS function in 、C out , construct a gradient porous structure, and through performance simulation and neural network data processing, achieve a gradient porous structure of bone scaffold with coordinated mechanical and permeability properties that matches the patient's apparent bone density, and establish a bone scaffold parameter prediction platform to provide personalized bone scaffold structure design solutions for convenient and efficient bone repair medical treatment.
[0174] It should be noted that the modeling process of the present application is not limited to the present technical solution, but can also be applied to porous structures in other fields.
[0175] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density, characterized by: The following steps are involved: S1. Introduce a quadratic function based on the TPMS function, and control the bias C in the function under different average porosity conditions. in 、C out , constructing a variable density gradient porous structure of bone scaffold, using the offset parameter C in Control the porosity at the center of the gradient porous structure, the offset parameter C out Controlling the porosity at the edge of gradient porous structures; S2, obtain "C" through compression mechanics simulation and fluid simulation in 、C out -EK" sample data, the gradient porous structure is subjected to compression mechanics simulation to obtain the elastic modulus E of the gradient porous structure, and the gradient porous structure is subjected to fluid simulation to obtain the permeability K of the gradient porous structure; S3. Construct a BP neural network model. The BP neural network model includes an input layer, an output layer, and a hidden layer. The input layer contains two neurons, which are elastic modulus E and permeability K. The output layer contains two neurons, which are bias parameter C. in 、C out , adjust the number of hidden layers and neurons in the hidden layer, analyze the structure-performance data of step S1 and step S2 through the BP neural network model, and improve the accuracy through model training; S4. Obtain the patient's apparent bone density through testing, calculate the theoretical elastic modulus E1, and predict the gradient bone scaffold structural parameter C with coordinated mechanical and permeability properties through the BP neural network model. in 、C out ; S5. Based on step S4, an intelligent platform for the design of personalized gradient porous bone scaffold structures is constructed, the patient's apparent bone density is input, and the structural parameters and corresponding performance are output.
2. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 1, characterized in that: In step S1, a variable density gradient porous structure of a bone scaffold is constructed, including: S11. Combining the quadratic function with the TPMS function to realize the design of the parameterized gradient porous structure. The quadratic function converts the bias parameter C in the gradient porous structure TPMS function into the bias parameter C that controls r=0. in and r = r's bias parameter C out , the implicit expression of TPMS function is as follows: Type G: Type D: P-type: I-WP type: Where C is the offset parameter value of the TPMS function, ranging from (-1, 1); The quadratic function expression is as follows: y=x 2 ; Where x and y represent the coordinate axes of the XY plane in three-dimensional space; S12. Through the full factor sampling method, the radial gradient porous structure design parameter C is randomly selected under different average porosity conditions. in 、C out , in order to construct the variable density simulation structure of the bone scaffold.
3. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 1, characterized in that: In step S2, the "C in 、C out -EK" sample data, including: Establish a gradient porous structure model in the modeling software: import the .cdb and .msh formats of the gradient porous structure model into Ansys for compression mechanics simulation and fluid simulation respectively, so as to calculate the elastic modulus E and permeability K of the gradient porous structure, and construct a database of the gradient porous structure bias parameters and the corresponding elastic modulus E and permeability K.
4. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 1, characterized in that: In step S3, a BP neural network model is constructed to analyze the structure-performance data of steps S1 and S2, and the accuracy is improved through model training, including: S31. Construct a BP neural network model and determine the input layer, hidden layer, and output layer; S32, training a BP neural network model based on structural parameters and performance data; S33. If the error between the simulation value and the error value is small, the training is completed.
5. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 1, characterized in that: In step S4, the BP neural network model is used to predict the gradient bone scaffold structure parameters C with coordinated mechanical and permeability properties. in 、C out ,include: S41. Obtain the patient's apparent bone density through medical means; First, a specific bone ROI is scanned accurately using QCT technology to obtain the threshold value TH for the area. Then, the QCT# value is calculated using the formula QCT#=TH-1024. Finally, the QCT# value is converted to the apparent bone density ρ of the ROI area according to the empirical formula. The formula for converting the QCT# value to the apparent bone density of the bone is as follows: Where ρ is the apparent bone density, and the QCT# value is calculated using the threshold TH-1024; S42. The theoretical elastic modulus E1 of the patient's bone defect is obtained using the conversion formula between bone apparent bone density and elastic modulus. The relationship between elastic modulus E and permeability K is fitted using a BP neural network model to screen out the maximum permeability K1. The conversion formula between bone apparent bone density and elastic modulus is as follows: In the formula, ρ1-ρ4 represent the apparent bone density in different intervals; S43. Taking the theoretical elastic modulus E1 and the maximum permeability K1 as the target, predict the corresponding gradient porous structure bias parameter C in 、C out .
6. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 1, characterized in that: In step S5, an intelligent platform for designing a personalized gradient porous bone scaffold structure is constructed, including: Use Python language to build a bone scaffold modeling parameter prediction platform and realize human-computer interaction functions: S51, adopts a three-tier architecture design: the presentation layer implements user interaction through the QLineEdit control, the logic layer integrates the BP neural network model trained by PyTorch for parameter prediction, and the data layer uses SQL data sets to manage the prediction training model and calculation results; S52. Multiple optimization measures were implemented: using a preloading mechanism to reduce model loading time, using torch.jit.script to accelerate the inference process and control the single prediction time, and implementing the PyQt5 framework from apparent bone density input to 3D visualization output. The visualization module adopted a three-stage pipeline architecture of "generate-cache-display". Matplotlib rendered the 3D surface offline on the Agg backend, then cached it in video memory using QPixmap and displayed it with adaptive scaling. S53, implement real-time input verification, status prompts and exception handling interactive functions, and provide friendly error feedback through QMessageBox; S54. Implement the interaction between the GUI page and the BP neural network model.
7. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 4, characterized in that: In step S31, a BP neural network model is constructed, including: S311. Clarify key parameters: Select the elastic modulus E and permeability K of the porous structure as input parameters, and select the bias parameter C that controls the pore structure. in and C out is the output parameter; S312. Use four hidden layers to collaborate and complete the nonlinear mapping from input to output: the first hidden layer is designed to have 128 neurons, expanding the 2-dimensional input E and K to 128 dimensions; the second hidden layer is designed to have 256 neurons, increasing the dimension from 128 to 256 dimensions; the third hidden layer is designed to have 128 neurons, reducing the dimension from 256 to 128 dimensions; the fourth hidden layer is designed to have 64 neurons, further compressing the dimension from 128 to 64 dimensions; S313. Each hidden layer introduces an activation function, and the activation function uses the positive linear unit ReLU function; S314. Innovative improvements were made to key optimization issues in the backpropagation process: a dynamic learning rate strategy was adopted, with the initial learning rate set to 0.001, and the Adam optimization algorithm was introduced to establish a dynamic balance mechanism between the learning rate and model performance. S315. Further improve the generalization ability of the model: Introduce the Dropout regularization layer, randomly block some neuron connections with a preset probability during the training phase, and the random inactivation mechanism forms an effective synergy with the ReLU activation function.
8. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 4, characterized in that: In step S32, a BP neural network model is trained based on the structural parameters and performance data, including: S321. Initialization: According to the needs of the prediction task, a feedforward neural network model with a six-layer fully connected structure is constructed. The number of neurons in the input layer of the feedforward neural network model is 2, and the number of neurons in the output layer is 2, corresponding to the input vector elastic modulus E and permeability K and the output vector bias parameter C respectively. in and C out , the four hidden layers contain 128, 256, 128 and 64 neurons respectively. The activation function uses ReLU, and the Dropout mechanism is introduced to prevent overfitting. The weight parameters are randomly initialized at the beginning of training; S322, Forward propagation: Input the input features [E, K] of each group of samples in the training set into the BP neural network model, complete the linear transformation and nonlinear activation operations layer by layer, and finally generate the predicted value [C in , C out ], the output formula of the hidden layer node is as follows: x (l) =f(W (l-1) x (l-1) +θ (l-1) ); Where x (l) is the output vector of the l-th layer neuron, W (l-1) is the weight matrix from layer l-1 to layer l, θ (l-1) is the bias vector of the lth layer, and f is the activation function ReLU; The output formula of the output layer node is as follows: Where, is the predicted value output by the BP neural network model, W (L) is the weight matrix of the output layer, x (L) is the output vector of the Lth layer, θ (L) is the bias vector of the output layer; S323. Loss calculation: The mean square error is used as the loss function, and the function expression is as follows: Where, is the predicted value output by the BP neural network model, W (L) is the weight matrix of the output layer, x (L) is the output vector of the Lth layer, θ (L) is the bias vector of the output layer; S324, Back Propagation: Use the error back propagation algorithm to train the BP neural network model, calculate the partial derivatives of the loss function with respect to the parameters of each layer of the network, and adjust the weights and biases of the network in the direction of the loss function. The weight update follows the following formula: Where η is the learning rate; represents the connection weight between the i-th neuron and the j-th neuron in the l-th layer; S325, parameter update: In each round of iteration, the Adam optimization algorithm is used to update the BP neural network model parameters. The momentum term update method follows the following formula: m t =β1m t-1 +(1-β1)g t ; Where m t represents the momentum term at step t, β1 represents the momentum decay coefficient, m t-1 represents the momentum term at step t-1, g t represents the gradient of the t-th step; The RMSProp item update method follows the following formula: v t =β2×v t-1 +(1-β2)×g t 2 ; Where, v t represents the RMSProp term at step t, β2 represents the attenuation coefficient of RMSProp, and v t-1 represents the RMSProp term at step t-1; The deviation correction formula is as follows: The parameter update formula is as follows: Where θ t represents the model parameters at step t, θ t-1 represents the model parameters at step t-1, α represents the learning rate, and ε is a small constant added for numerical stability; S326, iterative training: iteratively train the BP neural network model for 2000 rounds through steps S321 to S326, record the training loss every 200 rounds, and save the model weights to the local path after the training is completed.
9. The method for designing a personalized gradient porous bone scaffold based on the patient's apparent bone density according to claim 4, characterized in that: In step S33, if the error between the simulation value and the error value is small, the training is completed, including: The structure-performance data are nonlinearly fitted through the BP neural network model, the prediction accuracy of the BP neural network model is evaluated using the mean square error, the parameters of the BP neural network model are optimized, and the elastic modulus E, permeability K and bias parameter C are established. in 、C out The nonlinear relationship between them.
Citation Information
Cited By
Small thrust trajectory optimization method and system based on structure adaptive neural network
CN120779757A
Small-thrust trajectory optimization method and system based on structural adaptive neural network
CN120779757B