A biological fluid flow fitting method, system, terminal and medium
By adaptively adjusting the loss function weight in PINNs and building a spatiotemporal neural network model of biological fluids, the problem of difficulty convergence and poor fitting effect in biological fluid flow fitting is solved, and high-precision biological fluid flow fitting is achieved to avoid Dimensional disaster.
Patent Information
- Application Number
- CN202411388905.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-10-08
AI Technical Summary
The prior art is difficult to converge and poor fitting effects when applying physical information neural networks (PINNs), especially when solving the problem of biological fluid flow fitting, it is prone to dimensional disasters and difficulty in generating complex geometric shape mesh.
By adaptively adjusting the weights in the loss function, the weights of the initial and boundary condition losses are optimized using the maximum eigenvalue of the Hessian matrix, and the weights of the control equation losses are adjusted according to the fitting results, and a neural network model with the space-time coordinates of biological fluids as input is constructed. , avoid grid discreteness and improve fit accuracy.
It significantly improves the fitting accuracy of CBS-type equation solutions, avoids dimensional disasters, achieves high-precision biological fluid flow fitting, and promotes the depth of biofluid mechanics research.
Smart Images

Figure CN118942530B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biofluid mechanics, and in particular to a biofluid flow fitting method, system, terminal and medium. Background Art
[0002] Biofluid mechanics attempts to use the theories and methods of mechanics to explain and analyze various physiological phenomena presented by organisms. For example, through the study of fluid mechanics problems in the cardiovascular system, the basic laws of blood flow and the possible effects of certain cardiovascular diseases on blood flow are explained, which helps in the diagnosis and prevention of cardiovascular diseases. For the laws of motion in biological fluids, some schemes currently use the Calogero-Bogoyavlenskii-Schiff type (CBS type) equation to describe certain nonlinear phenomena in biofluid mechanics to characterize the laws of fluid motion. At present, analytical methods and numerical methods are mainly used to solve the flow fitting of biological fluids based on the CBS type equation. However, these two methods are highly dependent on the initial boundary data, and it is difficult to obtain a stable solution when most of the initial and boundary conditions are missing. The fitting effect needs to be improved. And because most traditional solution methods solve by constructing grids in time and space discretely, these methods are prone to dimensionality disaster problems when facing high-dimensional problems, and it is difficult to generate grids on complex geometric shapes.
[0003] With the development of artificial intelligence, deep neural networks with strong nonlinear modeling capabilities have achieved results in many fields. In recent studies, researchers have proposed embedding prior physical knowledge and physical conservation laws into neural networks to construct PINNs (physical information neural networks). In this way, only a small amount of initial and boundary value data is required for training, and there is no need to establish a grid, thus avoiding the problem of dimensionality disaster. Although PINNs have been widely used, there is a problem of difficulty in convergence when applying them to CBS-type equations to solve the problem of biological fluid flow fitting. Summary of the invention
[0004] In view of the deficiencies in the prior art, the object of the present invention is to provide a biological fluid flow fitting method, system, terminal and medium to improve the accuracy of biological fluid flow fitting.
[0005] In a first aspect, a biological fluid flow fitting method is provided, comprising the following steps:
[0006] According to the spatiotemporal characteristics of biological fluid flow, a computational domain is established, and the control equation based on the CBS type equation is determined, and the initial condition constraints and boundary condition constraints are determined; wherein the computational domain includes the space domain and the time domain;
[0007] Select the initial points, boundary points and residual points for model training in the computational domain to construct a sample data set;
[0008] Construct a neural network model that takes the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output;
[0009] Construct the control equation loss, initial condition loss, boundary condition loss, and use weighted form to obtain the loss function;
[0010] According to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss, the weights of the initial condition loss and the boundary condition loss in the loss function are adaptively adjusted;
[0011] Adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss;
[0012] The neural network model is trained using the sample data set to obtain the CBS type equation fitting model;
[0013] The time and space coordinates of the biological fluid point to be fitted are input into the CBS type equation fitting model to obtain the wave height of the point to be fitted.
[0014] Furthermore, the control equation is expressed as follows:
[0015] ;
[0016] In the formula, (x, y) and t represent the spatial domain coordinates and time domain coordinates respectively; u represents the height of the wave at the corresponding space-time coordinate point (x, y, t); P is a function of y and t; the subscript represents partial differential, , denote the partial differentials of u with respect to t and y respectively, represents the partial derivatives of u with respect to x and t, represents the partial differentials of u with respect to x and y; .
[0017] Further, the initial condition constraint is provided by analytical data at the initial moment, and the boundary condition constraint is provided by analytical data at the boundary of the space domain;
[0018] The analytical solution equation is expressed as follows:
[0019] ;
[0020] Where u represents the height of the wave at the corresponding space-time coordinate point (x, y, t), (x, y) and t represent the spatial domain coordinate and the time domain coordinate respectively; , , and are all real numbers, , is a real number; A1 and A2 are both real numbers; , , .
[0021] Furthermore, at least one of a uniform sampling method, a random sampling method and a Latin hypercube sampling method is used to select initial points, boundary points and residual points for model training in the computational domain.
[0022] Furthermore, the loss function It is expressed as follows:
[0023] ;
[0024] In the formula, , , They represent the control equation loss, initial condition loss and boundary condition loss respectively; , , Represent the weights of control equation loss, initial condition loss and boundary condition loss respectively;
[0025] ;
[0026] ;
[0027] ;
[0028] In the formula, and They represent the predicted value of the neural network model and the analytical solution value corresponding to the n1th initial point, respectively. and Represents the predicted value of the neural network model and the analytical solution value corresponding to the n2th boundary point, represents the residual of the control equation of the n3th residual point; , , Represent the number of initial points, boundary points and residual points in the current training batch respectively.
[0029] Furthermore, the weights of the initial condition loss and the boundary condition loss in the loss function are adaptively adjusted according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss, which is expressed by the following formula:
[0030] ;
[0031] ;
[0032] In the formula, , Represent the weights of initial condition loss and boundary condition loss respectively; , , They represent the maximum eigenvalues of the Hessian matrix corresponding to the initial condition loss, boundary condition loss, and control equation loss respectively.
[0033] Furthermore, the weight of the control equation loss in the loss function is adaptively adjusted according to the fitting results of the initial condition loss and the boundary condition loss, which is expressed by the following formula:
[0034] ;
[0035] In the formula, represents the weight of the control equation loss, , represent the initial condition loss and boundary condition loss respectively, Represents a hyperparameter.
[0036] In a second aspect, a biological fluid flow fitting system is provided, comprising:
[0037] A control equation building module is used to establish a computational domain according to the spatiotemporal characteristics of the biofluid flow, determine the control equation based on the CBS type equation, and determine the initial condition constraints and boundary condition constraints; wherein the computational domain includes the space domain and the time domain;
[0038] The data set construction module is used to select the initial points, boundary points and residual points for model training in the computational domain and construct a sample data set;
[0039] A neural network model building module, used to build a neural network model with the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output;
[0040] The loss function determination module is used to construct the control equation loss, initial condition loss, boundary condition loss, and obtain the loss function in a weighted form;
[0041] A weight adjustment module is used to adaptively adjust the weights of the initial condition loss and the boundary condition loss in the loss function according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss; and adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss;
[0042] A training module is used to train the neural network model using a sample data set to obtain a CBS type equation fitting model;
[0043] The fitting module is used to input the time and space coordinates of the biological fluid to be fitted into the CBS type equation fitting model to obtain the wave height of the to-be-fitted point.
[0044] In a third aspect, an electronic terminal is provided, comprising:
[0045] a memory having a computer program stored thereon;
[0046] The processor is used to load and execute the computer program to implement the biological fluid flow fitting method as described above.
[0047] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the biological fluid flow fitting method as described above is implemented.
[0048] The present invention proposes a biological fluid flow fitting method, system, terminal and medium. Compared with traditional physical information neural networks (PINNs), the present invention optimizes the weight update design of each loss in the loss function. On the basis of retaining the two major advantages of avoiding the curse of dimensionality and effectively utilizing data, the accuracy of the neural network's fitting of the solution of the CBS type equation is further improved, thereby achieving high-precision fitting of the biological fluid flow, which is conducive to promoting the study of biofluid mechanics based on PINNs. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0050] Figure 1 is a flow chart of a biological fluid flow fitting method provided by an embodiment of the present invention;
[0051] Figure 2 is a waveform image at time t=0 provided by an embodiment of the present invention, wherein (a) is an analytical solution waveform image at time t=0, and (b) is a waveform image of a prediction result of a CBS-type equation fitting model at time t=0;
[0052] Figure 3 is a waveform image at time t=1 provided by an embodiment of the present invention, wherein (a) is an analytical solution waveform image at time t=1, and (b) is a waveform image of a prediction result of a CBS-type equation fitting model at time t=1;
[0053] Figure 4It is a waveform image at time t=2 provided by an embodiment of the present invention, wherein (a) is an analytical solution waveform image at time t=2, and (b) is a waveform image of the prediction result of the CBS-type equation fitting model at time t=2. DETAILED DESCRIPTION
[0054] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0055] The purpose of the present invention is to overcome the problem of difficulty in convergence and poor fitting effect when applying physical information neural networks (PINNs) to CBS-type equations to solve the problem of biological fluid flow fitting, and to improve the accuracy of biological fluid flow fitting by improving traditional PINNs. The technical solution of the present invention is described in detail below in conjunction with specific embodiments.
[0056] like Figure 1 As shown, an embodiment of the present invention provides a biological fluid flow fitting method, comprising the following steps:
[0057] S1: Establish the computational domain according to the spatiotemporal characteristics of the biofluid flow, determine the control equations based on the CBS-type equations, and determine the initial condition constraints and boundary condition constraints.
[0058] The computational domain of biological fluid flow includes the space domain and the time domain. The space domain represents the spatial range of the biological fluid under study, that is, the spatial characteristics of the biological fluid flow. For example, in hemodynamic modeling, the x-axis and y-axis of the space domain are used to represent the length and diameter of blood vessels. The time domain represents the duration of the simulated biological fluid flow, that is, the time characteristics of the biological fluid flow. The dynamic behavior of the fluid often changes with time.
[0059] In the following embodiments, the (2+1)-dimensional CBS type equation in the space domain [-6,6] × [-6,6] and the time domain [0,2] is used as an application example for explanation, and the infinite conservation law of the (2+1)-dimensional CBS type equation is selected as the control equation. The control equation is expressed as follows:
[0060] ;
[0061] Wherein, (x, y)∈[-6, 6] × [-6, 6] and t∈[0, 2] represent the spatial domain coordinates and the time domain coordinates respectively; u represents the height of the wave at the corresponding space-time coordinate point (x, y, t); P is a function of y and t, which is set to be identical to 0 in this embodiment; the subscript represents the partial differential, , denote the partial differentials of u with respect to t and y respectively, represents the partial derivatives of u with respect to x and t, represents the partial differentials of u with respect to x and y; .
[0062] The initial condition constraint is provided by the analytical data at the initial time (t=0), and the boundary condition constraint is provided by the analytical data at the boundary of the space domain. The analytical solution equation is expressed as follows:
[0063] ;
[0064] Where u represents the height of the wave at the corresponding space-time coordinate point (x, y, t), (x, y) and t represent the spatial domain coordinate and the time domain coordinate respectively; , , and are all real numbers, , is a real number; A1 and A2 are both real numbers; , , In this example, we set the parameter value to , .
[0065] S2: Select the initial points, boundary points and residual points for model training in the computational domain to construct a sample data set.
[0066] In a specific embodiment, at least one of a uniform sampling method, a random sampling method, and a Latin hypercube sampling method can be used to select initial points, boundary points, and residual points for model training in the computational domain. The number of initial points, boundary points, and residual points is selected according to actual needs. In this embodiment, 400 initial points are selected as the initial point data set to constrain the initial conditions, 800 boundary points are selected as the boundary point data set to constrain the boundary conditions, and 10,000 residual points are selected as the residual point data set to minimize the residual of the control equation within the spatial domain. The total number of training samples is N=11200.
[0067] S3: Construct a neural network model that takes the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output.
[0068] The control equation of this example contains an integral part. For the sake of calculation accuracy, the Gauss-Legendre method is selected to calculate the integral during the training process of the neural network model. During the training process of the neural network model, the space-time coordinates of each training sample and the Gauss-Legendre integration node are used as input, and the corresponding fitting value u is output. It should be noted that during the model training process, when the space-time coordinates of each training sample are input, the space-time coordinates of the Gauss-Legendre integration node must also be input to calculate the control equation residual, but when the model is predicted after the neural network model training is completed, only the space-time coordinates of the space-time coordinate points to be fitted need to be input, and the space-time coordinates of the Gauss-Legendre integration node are no longer required. In this embodiment, the neural network model structure is an input layer of 3 neurons, 4 hidden layers, each hidden layer has 150 neurons, and the output layer has 1 neuron, and the activation function selects tanh. Since the fitting of the solution in this method is by means of the nonlinear modeling ability of the neural network model, there is no need to generate this step of discrete grids in the traditional method, which effectively avoids the problem of dimensionality disaster.
[0069] S4: Construct the control equation loss, initial condition loss, boundary condition loss, and use the weighted form to obtain the loss function.
[0070] Use automatic differentiation technology and Gauss-Legendre integration method to calculate the value of the control equation at the internal residual point. Use the torch.autograd.grad() function in Pytorch to calculate the first, second, and third order partial derivatives of the output of the residual point relative to the input; use the Gauss-Legendre method to calculate the integral, input the space-time coordinates corresponding to the Gauss point into the neural network, obtain the fitting value, and thus obtain the value of the integral. Substitute these calculated values into the control equation and calculate the residual of the control equation as the control equation loss The mean square error between the output of the neural network model at the initial point and the analytical solution data at the initial moment is taken as the initial condition loss. , the mean square error between the output of the neural network model at the boundary point and the analytical solution data at the boundary is used as the boundary condition loss The loss function is obtained by weighted sum , and expressed as ,in , , They represent the weights of the control equation loss, initial condition loss, and boundary condition loss, respectively, and the weights are all initialized to 1.
[0071] Specifically, the initial condition loss, boundary condition loss, and control equation loss are expressed as follows:
[0072] ;
[0073] ;
[0074] ;
[0075] In the formula, and They represent the predicted value of the neural network model and the analytical solution value corresponding to the n1th initial point, respectively. and Represents the predicted value of the neural network model and the analytical solution value corresponding to the n2th boundary point, represents the residual of the control equation of the n3th residual point; , , Represent the number of initial points, boundary points and residual points in the current training batch respectively.
[0076] S5: Adaptively adjust the weights of the initial condition loss and boundary condition loss in the loss function according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and boundary condition loss. The specific formula is as follows:
[0077] ;
[0078] ;
[0079] In the formula, , Represent the weights of initial condition loss and boundary condition loss respectively; , , Respectively represent the Hessian matrices corresponding to the initial condition loss, boundary condition loss, and control equation loss; , , They represent the maximum eigenvalues of the Hessian matrix corresponding to the initial condition loss, boundary condition loss, and control equation loss respectively.
[0080] In this way, the problem of the traditional PINNs method that the training process is easily dominated by a certain part of the loss, resulting in insufficient training of the rest and ultimately failing to reach the global optimal state is effectively alleviated.
[0081] S6: Adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss. The specific formula is as follows:
[0082] ;
[0083] In the formula, represents the weight of the control equation loss, , represent the initial condition loss and boundary condition loss respectively, Represents a hyperparameter. Determines the training speed on the control equation, the larger The value corresponds to a higher requirement on the fit of the initial and boundary conditions. The value of In this way, the fitting effect of the initial situation and boundary situation can be effectively improved, which is beneficial to the fitting of subsequent time.
[0084] S7: The neural network model is trained using the sample data set to obtain a CBS-type equation fitting model; during the training process, the optimization process is set to first optimize using Adam, and then optimize using the L-BFGS algorithm (Limited-memory BFGS), with the neural network parameters updated at each step. A learning rate annealing scheme is used for Adam.
[0085] S8: After the CBS-type equation fitting model training is completed, all spatiotemporal data points used to test the accuracy of the model are input, and the fitting values are output through the CBS-type equation fitting model. The accuracy of the model is evaluated by the relative L2 error of the fitting values of the analytical solution data and the CBS-type equation fitting model at the corresponding points. The L2 error The specific form is as follows:
[0086] ;
[0087] Where N represents the total number of spatiotemporal data points used to test the accuracy of the model. Indicates the corresponding space-time coordinates The fitted values output by the CBS-type equation fitting model are used at Indicates the corresponding space-time coordinates The numerical value of the analytical solution at .
[0088] S9: Input the time and space coordinates of the biological fluid point to be fitted into the CBS type equation fitting model to obtain the wave height of the point to be fitted.
[0089] like Figure 2 The waveform images at time t=0 are shown, where (a) is the waveform image of the analytical solution at time t=0, and (b) is the waveform image of the prediction result of the CBS equation fitting model at time t=0.
[0090] like Figure 3 The waveform images at time t=1 are shown, where (a) is the waveform image of the analytical solution at time t=1, and (b) is the waveform image of the prediction result of the CBS equation fitting model at time t=1.
[0091] like Figure 4 The waveform images at time t=2 are shown, where (a) is the waveform image of the analytical solution at time t=2, and (b) is the waveform image of the prediction result of the CBS equation fitting model at time t=2.
[0092] The improved PINNs model proposed in the present invention has relative L2 errors of 4.126e-03, 1.088e-02 and 1.094e-02 for the CBS equation at the three moments t=0, 1 and 2 respectively. Compared with the traditional PINNs, the present invention significantly improves the fitting accuracy of the solution of the CBS type equation, and the relative L2 errors at the three moments are reduced by 90.2%, 86.9% and 88.9% respectively.
[0093] The above embodiment proposes a biological fluid flow fitting method. Compared with the traditional physical information neural network (PINNs), the present invention optimizes the weight update of each loss in the loss function, and adaptively adjusts the weight of the initial condition loss and the boundary condition loss in the loss function according to the maximum eigenvalue of the Hessian matrix of the initial condition loss and the boundary condition loss, which effectively alleviates the problem that the training process of the traditional PINNs method is easily dominated by a certain part of the loss, resulting in insufficient training of the remaining parts and ultimately failing to reach the global optimum; according to the fitting results of the initial condition loss and the boundary condition loss, the weight of the control equation loss in the loss function is adaptively adjusted, and the fitting effect of the initial condition and the boundary condition can be effectively improved, which is conducive to the fitting of the subsequent time. On the basis of retaining the two major advantages of avoiding the dimensional disaster and effectively using data, the accuracy of the neural network fitting of the CBS type equation solution is further improved, thereby achieving high-precision fitting of the biological fluid flow, which is conducive to promoting the research on biological fluid mechanics based on PINNs.
[0094] The embodiment of the present invention further provides a biological fluid flow fitting system, comprising:
[0095] A control equation building module is used to establish a computational domain according to the spatiotemporal characteristics of the biofluid flow, determine the control equation based on the CBS type equation, and determine the initial condition constraints and boundary condition constraints; wherein the computational domain includes the space domain and the time domain;
[0096] The data set construction module is used to select the initial points, boundary points and residual points for model training in the computational domain and construct a sample data set;
[0097] A neural network model building module, used to build a neural network model with the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output;
[0098] The loss function determination module is used to construct the control equation loss, initial condition loss, boundary condition loss, and obtain the loss function in a weighted form;
[0099] A weight adjustment module is used to adaptively adjust the weights of the initial condition loss and the boundary condition loss in the loss function according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss; and adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss;
[0100] A training module is used to train the neural network model using a sample data set to obtain a CBS type equation fitting model;
[0101] The fitting module is used to input the time and space coordinates of the biological fluid to be fitted into the CBS type equation fitting model to obtain the wave height of the to-be-fitted point.
[0102] It should be understood that the functional unit modules in various embodiments of the present invention may be concentrated in one processing unit, or each unit module may exist physically separately, or two or more unit modules may be integrated in one unit module, and may be implemented in the form of hardware or software.
[0103] An embodiment of the present invention further provides an electronic terminal, including:
[0104] a memory having a computer program stored thereon;
[0105] The processor is used to load and execute the computer program to implement the biological fluid flow fitting method described in the above embodiment.
[0106] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the biological fluid flow fitting method described in the above embodiment is implemented.
[0107] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0109] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0112] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0113] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A biological fluid flow fitting method, characterized in that: The steps include: According to the spatiotemporal characteristics of biological fluid flow, a computational domain is established, and the control equation based on the CBS type equation is determined, and the initial condition constraints and boundary condition constraints are determined; wherein the computational domain includes the space domain and the time domain; Select the initial points, boundary points and residual points for model training in the computational domain to construct a sample data set; Construct a neural network model that takes the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output; Construct the control equation loss, initial condition loss, boundary condition loss, and use weighted form to obtain the loss function; The weights of the initial condition loss and the boundary condition loss in the loss function are adaptively adjusted according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss; Adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss; The neural network model is trained using the sample data set to obtain the CBS type equation fitting model; The time and space coordinates of the biological fluid point to be fitted are input into the CBS type equation fitting model to obtain the height of the wave of the point to be fitted; The control equation is expressed as follows: ; In the formula, (x, y) and t represent the spatial domain coordinates and time domain coordinates respectively; u represents the height of the wave at the corresponding space-time coordinate point (x, y, t); P is a function of y and t; the subscript represents partial differential, , denote the partial differentials of u with respect to t and y respectively, represents the partial derivatives of u with respect to x and t, represents the partial differentials of u with respect to x and y; ; The initial condition constraint is provided by analytical data at the initial moment, and the boundary condition constraint is provided by analytical data at the boundary of the space domain; The analytical solution equation is expressed as follows: ; Where u represents the height of the wave at the corresponding space-time coordinate point (x, y, t), (x, y) and t represent the spatial domain coordinate and the time domain coordinate respectively; , , and are all real numbers, , is a real number; A1 and A2 are both real numbers; , , .
2. The biological fluid flow fitting method according to claim 1, characterized in that: At least one of a uniform sampling method, a random sampling method and a Latin hypercube sampling method is used to select initial points, boundary points and residual points for model training in a computational domain.
3. The biological fluid flow fitting method according to claim 1, characterized in that: Loss Function It is expressed as follows: ; In the formula, , , They represent the control equation loss, initial condition loss and boundary condition loss respectively; , , Represent the weights of control equation loss, initial condition loss and boundary condition loss respectively; ; ; ; In the formula, and They represent the predicted value of the neural network model and the analytical solution value corresponding to the n1th initial point, respectively. and Represents the predicted value of the neural network model and the analytical solution value corresponding to the n2th boundary point, represents the residual of the control equation of the n3th residual point; , , Represent the number of initial points, boundary points and residual points in the current training batch respectively.
4. The biological fluid flow fitting method according to claim 1, characterized in that: The weights of the initial condition loss and the boundary condition loss in the loss function are adaptively adjusted according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss, which is expressed by the following formula: ; ; In the formula, , Represent the weights of initial condition loss and boundary condition loss respectively; , , They represent the maximum eigenvalues of the Hessian matrix corresponding to the initial condition loss, boundary condition loss, and control equation loss respectively.
5. The biological fluid flow fitting method according to claim 1, characterized in that: The weight of the control equation loss in the loss function is adaptively adjusted according to the fitting results of the initial condition loss and the boundary condition loss, and is expressed as follows: ; In the formula, represents the weight of the control equation loss, , represent the initial condition loss and boundary condition loss respectively, represents a hyperparameter.
6. A biological fluid flow fitting system based on the biological fluid flow fitting method according to claim 1, characterized in that: include: The control equation building module is used to establish the computational domain according to the spatiotemporal characteristics of the biofluid flow, determine the control equation based on the CBS type equation, and determine the initial condition constraints and boundary condition constraints; The computational domain includes the spatial domain and the temporal domain; The data set construction module is used to select the initial points, boundary points and residual points for model training in the computational domain and construct a sample data set; A neural network model building module, used to build a neural network model with the space-time coordinates of the biological fluid as input and the height of the wave at the space-time coordinates as output; The loss function determination module is used to construct the control equation loss, initial condition loss, boundary condition loss, and obtain the loss function in a weighted form; A weight adjustment module is used to adaptively adjust the weights of the initial condition loss and the boundary condition loss in the loss function according to the maximum eigenvalue of the Hessian matrix corresponding to the initial condition loss and the boundary condition loss; And adaptively adjust the weight of the control equation loss in the loss function according to the fitting results of the initial condition loss and the boundary condition loss; A training module is used to train the neural network model using a sample data set to obtain a CBS type equation fitting model; The fitting module is used to input the time and space coordinates of the biological fluid to be fitted into the CBS type equation fitting model to obtain the wave height of the to-be-fitted point.
7. An electronic terminal, characterized in that: include: a memory having a computer program stored thereon; A processor is used to load and execute the computer program to implement the biological fluid flow fitting method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the biological fluid flow fitting method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Assessment of Flow Networks
US20180320504A1
Estimates of Flow Velocity With Controlled Spatio-Temporal Variations in Contrast Media Properties
US20200271497A1
Method for predictive analysis of a biological system
WO2022162440A1
