Personalized nutrition management method and device for dialysis patient based on long short-term memory network, computer equipment and readable storage medium

Through a method based on long-term and short-term memory network, using multimodal data to generate personalized nutrition management solutions, the problem of lack of individualized needs in nutrition management of dialysis patients is solved, and the improvement of nutrition indicators and the reduction of complication risk is achieved.

CN119028530APending Publication Date: 2024-11-26DAITE INTELLIGENT TECH (SHANGHAI) CO LTD +2
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411110807.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

The nutrition management methods of existing dialysis patients lack objective evaluation and quantitative guidance, and it is difficult to meet individual needs, resulting in the problem of overnutrition or insufficient nutrition.

Method used

Using a long and short-term memory network method, the patient's multimodal data (demographic information, hemodialysis parameters, nutritional evaluation indicators and dietary habit information) is obtained, and the patient's multimodal data is encoded as a vector representation, and the pre-trained LSTM model is input. Generate personalized nutrition management plans.

Benefits of technology

It significantly improved the nutritional indicators such as hemoglobin, albumin and blood lipids in patients, reduced the hospitalization rate and complication rate, provided personalized and intelligent nutrition management solutions, and improved the quality of life of dialysis patients.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119028530A_ABST
    Figure CN119028530A_ABST
Patent Text Reader

Abstract

The invention relates to a dialysis patient personalized nutrition management method and device based on a long short-term memory network, computer equipment and a readable storage medium, and the method comprises the following steps: obtaining demographic information, hemodialysis parameters, nutrition evaluation indexes and dietary habit information of a patient; coding different types of data into vector representations based on multi-modal fusion, and then performing fusion; the multi-modal fusion data serve as input features and are input into a pre-trained LSTM model, an output result is obtained, and the pre-trained LSTM model is obtained by integrating pre-collected patient information and then inputting the integrated patient information into the LSTM model. Training is carried out based on the marked personalized nutrition management suggestions or personalized nutrition management control information of the corresponding patients; and generating a personalized dialysis patient nutrition management scheme based on an output result. The method has the advantages of meeting individual requirements of patients and realizing objective evaluation and quantitative guidance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of machine learning, and in particular to a method, apparatus, computer device and readable storage medium for personalized nutrition management of dialysis patients based on a long short-term memory network. Background Art

[0002] Nutritional management of patients with end-stage renal disease (ESRD) is a key factor in maintaining their quality of life and prolonging their lifespan. Studies have shown that dialysis patients generally have malnutrition problems, mainly manifested in protein energy wasting (PEW), inflammation and metabolic disorders. These nutritional problems not only affect the quality of life of patients, but also increase the risk of complications such as cardiovascular disease and infection, and even lead to death.

[0003] In order to improve the nutritional status of dialysis patients, domestic and foreign scholars have conducted a lot of research and explored various nutritional management methods. At present, the main nutritional management methods include dietary intervention, nutritional supplementation and drug therapy. Dietary intervention is the basis, emphasizing low phosphorus, low potassium, and appropriate protein intake, and is adjusted according to the individual situation of the patient. Nutritional supplements such as essential amino acids and a-keto acids can replenish nutrients lost during dialysis and correct amino acid metabolism disorders. Drug therapy targets specific nutritional problems, such as erythropoietin for the treatment of renal anemia, active vitamin D and its analogs for the treatment of secondary hyperparathyroidism and bone mineral metabolism disorders.

[0004] Although existing nutrition management methods have achieved certain results, there are still some shortcomings. Traditional nutrition management methods mainly rely on the experience and judgment of doctors, lacking objective evaluation and quantitative guidance. The nutritional needs of dialysis patients are complex and changeable, and are affected by many factors, such as age, gender, residual renal function, and comorbidities. Traditional nutrition management methods often adopt a one-size-fits-all approach, which is difficult to meet the individual needs of patients and may lead to overnutrition or undernutrition. Summary of the invention

[0005] In order to meet the individual needs of patients and achieve objective evaluation and quantitative guidance, the present application provides a method, apparatus, computer device and readable storage medium for personalized nutrition management of dialysis patients based on long short-term memory network.

[0006] In the first aspect, the present application provides a personalized nutrition management method for dialysis patients based on long short-term memory network, which adopts the following technical solution:

[0007] A method for personalized nutrition management of dialysis patients based on long short-term memory network, comprising the following steps:

[0008] S1. Obtain patient information and encode different types of data into vector representations based on multimodal fusion, and then fuse them. The patient information includes demographic information, hemodialysis parameters, nutritional assessment indicators, and dietary habit information:

[0009] S2. Input the multimodal fusion data as input features into the pre-trained LSTM model, and obtain an output result, wherein the pre-trained LSTM model is obtained by integrating the pre-collected patient information and inputting it into the LSTM model, and training based on the personalized nutrition management recommendations or personalized nutrition management control information of the corresponding patients that are marked;

[0010] S3. Generate a personalized nutritional management plan for dialysis patients based on the output results.

[0011] Optionally, the pre-trained LSTM model includes:

[0012] Input layer, the input dimension of the input layer is m*d s +n*d d , where m is the number of static features in the patient information, n is the number of dynamic features in the patient information, and the embedding dimension of each static feature is d s , the embedding dimension of each dynamic feature is d d ;

[0013] Static feature embedding layer, for each static feature, use the embedding layer or one-hot encoding to convert it into d s dimensional vector representation;

[0014] Dynamic feature embedding layer, for each dynamic feature, use the embedding layer to convert it into d d dimensional vector representation;

[0015] LSTM layer, including two LSTM layers stacked, each LSTM layer contains h LSTM units; where h is the hidden state dimension;

[0016] The attention layer uses the Bahdanau attention mechanism to calculate the attention weight of each time step, and then multiplies the output of the LSTM layer by the attention weight to obtain the weighted feature representation;

[0017] The fully connected layer includes two fully connected layers. The number of neurons in the first fully connected layer is k, and the number of neurons in the second layer is the output dimension. The activation function of the first fully connected layer is ReLU, and the activation function of the second fully connected layer is sigmoid or softmax.

[0018] The output layer has an output dimension of 1 when the activation function is sigmoid and an output dimension of the number of categories when the activation function is softrmax.

[0019] Optionally, the LSTM unit includes an input gate, a forget gate, an output gate and a memory cell;

[0020] The input gate is used for the input x at the current time step. t and / or the hidden state h at the previous time step t-1 Can it be written into the memory cell, and i t =W i *[h t-1 , x t ]+b i ; where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate;

[0021] The forget gate is used to determine the memory cell state C of the previous time step. t-1 What needs to be forgotten, and f t =W f *[h t-1 , x t ]+b f , where f t is the output of the forget gate, W f is the bias matrix of the forget gate, b f is the bias term of the forget gate;

[0022] The output gate is used to determine the memory cell state C at the current time step t Which ones need to be output, and o t =W o *[h t-1 , x t ]+b o , where o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate;

[0023] The state of the candidate memory cell is obtained by performing a nonlinear transformation on the current input and the previous hidden state: t =f t ·C t-1 +i t tanh(W C ·[h t-1 , x t ]+b C ), where C tis the memory cell state at the current time step, f t is the output of the forget gate, C t-1 is the memory cell state of the previous time step, i t is the output of the input gate, tanh is the activation function, W C is the weight matrix of the memory cell, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, b C is the bias term of the memory cell;

[0024] The hidden state is determined by the output gate and the memory cell: t =o t *tanh(C t ).

[0025] Optionally, in the attention layer, the attention weight score is e t =v T *tanh(W1*h t +W2*q), the attention weight is α t =softmax(e t ), where v T is the weight vector, W1 and W2 are both weight matrices, and q is the query vector;

[0026] Multiply the output of the LSTM layer by the attention weight to obtain the weighted feature representation C = ∑(α t *h t ).

[0027] Optionally, the training steps of the pre-trained LSTM model include:

[0028] S21. Randomly divide the dataset into training set, validation set and test set;

[0029] S22. Determine the loss function, use binary cross entropy as the loss function for the binary classification problem, use classification cross entropy as the loss function, and use accuracy as the evaluation indicator;

[0030] S23. Adopt Adam optimizer, and set the initial learning rate to 0.001;

[0031] S24. Divide the training set into small batches of 32 samples, and use only one small batch of data for training in each iteration;

[0032] S25. When the loss function value of the model on the validation set does not decrease for 10 consecutive epochs, terminate the training early;

[0033] S26. Use an exponential decay strategy, with the learning rate decaying to 0.9 times of the original value every 5 epochs. After each epoch, save the model parameters and record the best performance on the validation set. Finally, select the model with the best performance on the validation set as the final model.

[0034] Optionally, S1 includes the following steps:

[0035] S11. Encode the static features and convert the encoding into a vector representation of fixed dimension using an embedding layer or one-hot encoding;

[0036] S12. Arrange various dynamic features in chronological order to form a sequence, and use an embedding layer to convert the sequence into a corresponding vector representation;

[0037] S13. Concatenate the static feature vector and the dynamic feature sequence to form a unified input vector.

[0038] Optionally, the demographic information includes: age, gender, height, weight, education level, occupation;

[0039] The hemodialysis parameters include: dialysis frequency, dialysis time, dialyzer type, dialysate composition, ultrafiltration volume, blood pressure, and hemoglobin;

[0040] The nutritional assessment indicators include: laboratory examination indicators, anthropometric indicators and nutritional questionnaire scores;

[0041] The dietary habit information includes: daily intake of energy, protein, carbohydrates, fat, vitamins, and minerals.

[0042] Optionally, the laboratory examination indicators include: serum albumin, serum creatinine, and blood urea nitrogen;

[0043] The human body detection indicators include: body mass index, upper arm muscle circumference, and skin fold thickness;

[0044] The nutritional questionnaire score includes: subjective overall assessment and nutritional risk screening.

[0045] In the second aspect, the present application provides a personalized nutrition management device for dialysis patients based on a long short-term memory network, which adopts the following technical solution:

[0046] A personalized nutrition management device for dialysis patients based on long short-term memory network, comprising:

[0047] The information acquisition and fusion module is used to obtain the patient's demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information, and encode different types of data into vector representations based on multimodal fusion and then fuse them;

[0048] A model calculation module, used to input the multimodal fusion data as input features into a pre-trained LSTM model and obtain an output result, wherein the pre-trained LSTM model is obtained by integrating the pre-collected demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information about the patient and inputting them into the LSTM model, and training based on the personalized nutritional management suggestions or personalized nutritional management control information of the corresponding patient that has been marked;

[0049] The program generation module is used to generate a personalized nutrition management program for dialysis patients based on the output results.

[0050] In a third aspect, the present application provides a computer device, which adopts the following technical solution:

[0051] A computer device comprising:

[0052] one or more processors;

[0053] Memory;

[0054] One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs are configured to: execute the above-mentioned personalized nutrition management method for dialysis patients based on long short-term memory network.

[0055] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution:

[0056] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute the above method.

[0057] The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement: the personalized nutritional management method for dialysis patients based on the long short-term memory network as mentioned above.

[0058] In summary, the present application includes the following beneficial technical effects: The personalized nutrition management program generated based on the LSTM model can effectively improve the nutritional indicators and clinical outcomes of patients. Compared with traditional methods, this program significantly improved the patient's key nutritional indicators such as hemoglobin, albumin, and blood lipids, and reduced the hospitalization rate and complication rate. The innovation of this model is to introduce deep learning technology into the field of nutritional management of dialysis patients, realize the intelligent and individualized customization of nutritional assessment and intervention, learn from massive clinical data, accurately predict patients' nutritional needs and risks, and provide a scientific basis for the formulation of personalized diet plans. The effectiveness of this method in the nutritional management of dialysis patients has been demonstrated, providing a new, precise, and intelligent method for the nutritional management of dialysis patients, which is expected to improve the patient's long-term prognosis and quality of life, and has important clinical application value and promotion potential. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A schematic diagram of an application environment of a personalized nutrition management method for dialysis patients based on a long short-term memory network in one embodiment of the present invention is shown.

[0060] Figure 2 A flowchart of a personalized nutrition management method for dialysis patients based on a long short-term memory network in one embodiment of the present invention is shown.

[0061] Figure 3 A flowchart of sub-step S1 in one embodiment of the present invention is shown.

[0062] Figure 4 A flowchart of the LSTM model pre-training steps in one embodiment of the present invention is shown.

[0063] Figure 5 The figure shows the change of HGB level of patients before and after the intervention of the nutritional management plan for dialysis patients generated based on the prediction results of the LSTM model in one embodiment of the present invention.

[0064] Figure 6 The change of BUN level of patients before and after the intervention of the nutritional management plan for dialysis patients generated based on the prediction results of the LSTM model in one embodiment of the present invention is shown.

[0065] Figure 7 A schematic diagram of a computer device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0066] The present application is further described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0067] In the following description, for the purpose of explanation, many specific details are set forth in order to provide a thorough understanding of the inventive concept. As part of this specification, some of the drawings in the drawings of the present disclosure represent structures and devices in the form of block diagrams to avoid making the disclosed principles complicated and difficult to understand. For the sake of clarity, not all features of the actual implementation are necessary to be described. In addition, the language used in this disclosure has been selected primarily for readability and instructional purposes, and may not be selected to delineate or limit the subject matter of the present invention, thereby resorting to the necessary claims to determine such inventive subject matter. References to "a specific implementation" or "specific implementations" in this disclosure mean that the specific features, structures or characteristics described in conjunction with the specific implementation are included in at least one specific implementation, and multiple references to "a specific implementation" or "specific implementations" should not be understood as necessarily referring to the same specific implementation.

[0068] Unless expressly limited, the terms "a", "an", and "the" are not intended to refer to a singular entity, but rather to include general categories of which specific examples may be used for illustration. Thus, the use of the terms "a" or "an" may mean any number of at least one, including "one", "one or more", "at least one", and "one or more than one". The term "or" means any of the alternatives and any combination of the alternatives, including all alternatives, unless the alternatives are expressly indicated to be mutually exclusive. The phrase "at least one of" when combined with a list of items refers to a single item in the list or any combination of the items in the list. The phrase does not require all of the listed items unless expressly limited to that.

[0069] The embodiment of the present application discloses a method, device, computer equipment and readable storage medium for personalized nutrition management of dialysis patients based on long short-term memory network. The personalized nutrition management method for dialysis patients based on long short-term memory network provided by the embodiment of the present invention can be applied in the following aspects: Figure 1 In the application environment, the personalized nutrition management method for dialysis patients based on long short-term memory network is applied in the personalized nutrition management system for dialysis patients based on long short-term memory network, and the personalized nutrition management system for dialysis patients based on long short-term memory network includes a client and a server, wherein the client communicates with the server through a network. The client, also known as the user end, refers to a program corresponding to the server that provides local services to the client. Further, the client is a computer-side program, an APP program for an intelligent device, or a third-party applet embedded in other APPs. The client can be installed on, but not limited to, various computer devices such as personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0070] Nutritional management of dialysis patients is a complex and dynamic process, which is affected by a variety of factors. In order to build a model that can accurately predict the nutritional needs and risks of patients, this application fully considers the following aspects:

[0071] 1. Temporal dependency: The physiological indicators and nutritional status of dialysis patients change over time, so a model that can capture temporal dependency is needed. LSTM, as a special recurrent neural network, has memory function and can learn long-term dependencies in sequence data, making it very suitable for modeling longitudinal data of dialysis patients.

[0072] 2. Multimodal data fusion: The nutritional status of dialysis patients is affected by many factors, including demographic information, hemodialysis parameters, nutritional assessment indicators, and eating habits. In order to make full use of this multi-dimensional information, this application adopts a multimodal data fusion strategy to encode different types of data into vector representations, and then fuse them as input to the LSTM model.

[0073] 3. Attention mechanism: Since different features contribute to nutritional needs and risks to different extents, the introduction of an attention mechanism can make the model pay more attention to important features and time points, thereby improving the predictive performance and interpretability of the model.

[0074] Reference Figure 2 , a personalized nutrition management method for dialysis patients based on long short-term memory network, comprising the following steps S1-S3.

[0075] S1. Obtain patient information, encode different types of data into vector representations based on multimodal fusion, and then fuse them, wherein the patient information includes demographic information, hemodialysis parameters, nutritional assessment indicators, and dietary habit information.

[0076] The sample size estimation will be based on the expected effect size, statistical test level (a = 0.05) and test power (1-β = 0.80), and the sample size estimation formula will be used to calculate the required sample size. At the same time, considering the possible loss rate (estimated to be 10%), the sample size needs to be appropriately increased to ensure the reliability of the research results. Here, stratified sampling or pairing will be performed based on certain characteristics of the patients (such as age, gender, dialysis age, comorbidities, etc.) to ensure that the baseline characteristics between the groups are balanced and comparable and reduce the impact of confounding factors.

[0077] Specifically, the patient's demographic information includes: age, gender, height, weight, education level, and occupation.

[0078] Hemodialysis parameters include: dialysis frequency, dialysis time, dialyzer type, dialysate composition, ultrafiltration volume, blood pressure, and hemoglobin.

[0079] Nutritional assessment indicators include: laboratory test indicators, anthropometric indicators and nutritional questionnaire scores.

[0080] Laboratory examination indicators include: serum albumin, serum creatinine, and blood urea nitrogen.

[0081] The human body detection indicators include: body mass index, upper arm muscle circumference, and skin fold thickness.

[0082] The nutritional questionnaire score includes: subjective overall assessment and nutritional risk screening.

[0083] Eating habits information includes: daily intake of energy, protein, carbohydrates, fat, vitamins, and minerals.

[0084] The workflow starts with the input of multimodal patient data. Multimodal fusion refers to the integration of data from different sources or types to achieve richer information expression and higher predictive performance. In medical data processing, multimodal fusion is particularly important because patient data usually comes from multiple sources, including demographic information, clinical measurements, laboratory test results, and lifestyle habits. These different types of data (i.e., different modalities) contain rich patient health information, and through fusion, the patient's health status can be more comprehensively characterized.

[0085] Specifically, the above data can be divided into static characteristics (such as age, gender, height, weight, education level, occupation, comorbidities, dialysis history, etc.) and dynamic characteristics (such as dialysis frequency, dialysis time, dialyzer type, dialysate composition, ultrafiltration volume, blood pressure, hemoglobin, serum albumin, serum creatinine, blood urea nitrogen, blood potassium, blood phosphorus, body mass index, upper arm muscle circumference, skin fold thickness, subjective overall assessment, nutritional risk screening, daily intake of energy, protein, carbohydrates, fat, vitamins, minerals, etc.).

[0086] Specifically, in order to achieve multimodal fusion of data, refer to Figure 3 , S1 includes the following steps S11-S13.

[0087] S11. Encode static features and convert the encoding into a vector representation of fixed dimension using an embedding layer or one-hot encoding.

[0088] Relatively stable data such as static features such as age, gender, height, weight, education level, and occupation can be encoded using one-hot encoding or an embedding layer to convert them into a vector representation of fixed dimensions. In some embodiments, categorical features such as gender and occupation can be converted into binary vectors using one-hot encoding. In other embodiments, discrete features such as education level can be converted into low-dimensional continuous vectors using an embedding layer.

[0089] S12. Arrange various dynamic features in chronological order to form a sequence, and use an embedding layer to convert the sequence into a corresponding vector representation.

[0090] Dynamic features such as dialysis frequency, dialysis time, blood indicators and other data that change over time need to be encoded as time series. For example, the dynamic features are arranged in chronological order to form a time series, and each data point in the time series is converted into a corresponding vector representation using an embedding layer.

[0091] S13. Concatenate the static feature vector and the dynamic feature sequence to form a unified input vector.

[0092] The following methods can be used to fuse the encoded static feature vector with the dynamic feature sequence:

[0093] Concatenation: Concatenate the static feature vector with the dynamic feature vector of each time step to form a new input vector.

[0094] Weighted Average: Perform weighted average on static and dynamic features to form fusion features.

[0095] Attention Mechanism: The weight of each feature is calculated through the attention mechanism, and the weighted feature representation is obtained after fusion.

[0096] Take the splicing method as an example. Suppose there are two features:

[0097] Static features: gender (male = 1, female = 0), age (30 years old), height (175 cm)

[0098] Dynamic characteristics: dialysis frequency (3 times / week), serum albumin (4.5 g / dL)

[0099] After encoding, the following vector is obtained:

[0100] Static feature vector: [1, 30, 175]

[0101] Dynamic feature vector: [3, 4.5]

[0102] The concatenated vector is: fused feature vector = [1, 30, 175, 3, 4.5].

[0103] Taking the weighted average method as an example, assuming that the weights of static features and dynamic features are 0.6 and 0.4 respectively, the specific feature values ​​are the same as in the previous example:

[0104] Static feature vector: [1, 30, 175]

[0105] Dynamic feature vector: [3, 4.5]

[0106] Weighted fusion feature vector

[0107] =0.6×[1,30,175]+0.4×[3,4.5]=[0.6,18,105]+[1.2,1.8]=[0.6,18,105,1.2,1.8].

[0108] Taking the attention mechanism as an example, suppose there are three time-step dynamic features and one static feature:

[0109] Static feature vector: [1, 30, 175].

[0110] Dynamic feature sequence:

[0111] Time step 1: [3, 4, 5]

[0112] Time step 2: [2, 4.0]

[0113] Time step 3: [1, 3.5].

[0114] We calculate the weight of each time step through the attention mechanism, assuming that the calculated weights are 0.5, 0.3, and 0.2 respectively:

[0115] Weight vector: [0.5, 0.3, 0.2].

[0116] The weighted dynamic feature vector is:

[0117] Weighted dynamic feature vector = 0.5×[3, 4.5]+0.3×[2, 4.0]+0.2×[1, 3.5]

[0118] Weighted dynamic feature vector = [1.5, 2.25] + [0.6, 1.2] + [0.2, 0.7]

[0119] Weighted dynamic feature vector = [2.3, 4.15]

[0120] Concatenate the static features with the weighted dynamic features to obtain the fused feature vector:

[0121] Fusion feature vector = [1, 30, 175, 2.3, 4.15].

[0122] It should be noted that the concatenation method directly concatenates feature vectors of different modalities and is suitable for scenarios where there is no clear relationship between features. The weighted average method assigns different weights to features of different modalities for weighted averaging and is suitable for scenarios where there are obvious weight differences between features. The attention mechanism method weights features by calculating the importance weights and is particularly suitable for processing long time series data and can effectively capture important time step features.

[0123] S2.S2. The multimodal fusion data is used as input features and input into a pre-trained LSTM model to obtain an output result, wherein the pre-trained LSTM model is obtained by integrating pre-collected patient information and inputting it into the LSTM model, and training based on the personalized nutrition management recommendations or personalized nutrition management control information of the corresponding patients that are marked.

[0124] Optionally, the pre-trained LSTM model includes an input layer, a static feature embedding layer, a dynamic feature embedding layer, an LSTM layer, an attention layer, a fully connected layer, and an output layer.

[0125] The input dimension of the input layer is m*d s +n*d d , where m is the number of static features in the patient information, n is the number of dynamic features in the patient information, and the embedding dimension of each static feature is d s , the embedding dimension of each dynamic feature is d d .

[0126] The input layer is the first layer of a neural network that receives raw data and passes it to subsequent layers for processing.

[0127] Static feature embedding layer, for each static feature, use the embedding layer or one-hot encoding to convert it into d s dimensional vector representation.

[0128] The static feature embedding layer is used to process relatively fixed features, such as age, gender, height, etc. Each static feature is converted to a fixed dimension d through the embedding layer or one-hot encoding. s For example, for categorical features such as gender, one-hot encoding can be used, and for discrete features such as education, an embedding layer can be used to convert them into continuous vectors.

[0129] Dynamic feature embedding layer, for each dynamic feature, use the embedding layer to convert it into d d dimensional vector representation.

[0130] The dynamic feature embedding layer is used to process features that change over time, such as dialysis frequency, blood indicators, etc. These features are arranged in chronological order to form a sequence, and the embedding layer is used to convert the features of each time step into a fixed dimension dd For example, the blood pressure value at each time step can be converted into a vector through the embedding layer.

[0131] The LSTM layer includes two LSTM layers stacked together, each LSTM layer contains h LSTM units, where h is the hidden state dimension.

[0132] The LSTM (Long Short-Term Memory) layer is a special RNN layer that can effectively process and memorize dependencies in long sequence data. This example includes two layers of LSTM stacked together, each LSTM layer contains h LSTM units, where h is the hidden state dimension. LSTM controls the flow of information through input gates, forget gates, and output gates, solving the long-term dependency problem of traditional RNNs.

[0133] The attention layer uses the Bahdanau attention mechanism to calculate the attention weight of each time step, and then multiplies the output of the LSTM layer by the attention weight to obtain the weighted feature representation.

[0134] The attention layer focuses on the important features of a specific time step in the sequence data by calculating the attention weights. The Bahdanau attention mechanism, also known as the additive attention mechanism, is a method for enhancing the performance of sequence-to-sequence models. It selectively focuses on different parts of the input sequence by dynamically calculating the weights of each time step, thereby generating a more accurate context vector.

[0135] In the attention layer, the attention weight score is e t =v T *tanh(W1*h t +W2*q), the attention weight is α t =softmax(e t ), where v T is the weight vector, W1 and W2 are both weight matrices, and q is the query vector;

[0136] Multiply the output of the LSTM layer by the attention weight to obtain the weighted feature representation C = ∑(α t *h t ).

[0137] As an example, assume that the output of the LSTM layer is a set of hidden state vectors [h1, h2, ..., h T ], where h t is the hidden state at time step t.

[0138] First, for each time step t, calculate the current hidden state h t The alignment score e between the query vector q t=v T .tanh(W1·h t +W2·q)

[0139] in:

[0140] h t is the output hidden state of the LSTM layer at time step t.

[0141] q is the query vector, usually the current hidden state q of the decoder.

[0142] W1 and W2 are trainable weight matrices.

[0143] v is a trainable weight vector.

[0144] Then calculate the attention weight and transform the alignment score e t Transformed into attention weight α through softmax function t :α t =softmax(e t )

[0145] Attention weight α t is a probability distribution representing the importance of time step t to the current context.

[0146] Finally, the weighted feature representation is calculated by multiplying the output hidden state of the LSTM layer by the corresponding attention weight and summing them to obtain the weighted feature representation C = ∑ t (α t ·h t ).

[0147] In general, the attention layer calculates the attention weights for each time step and applies these weights to the corresponding hidden state to generate a weighted feature representation C that integrates the information of all time steps.

[0148] As an example, in one embodiment, the LSTM unit includes an input gate, a forget gate, an output gate, and a memory cell.

[0149] The input gate is used for the input x at the current time step t and / or the hidden state h at the previous time step t-1 Can it be written into the memory cell, and i t =W i *[h t-1 , x t ]+b i ; where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate.

[0150] The forget gate is used to determine the state C of the memory cell in the previous time step. t-1 What needs to be forgotten, and f t =W f *[h t-1 , x t ]+b f , where ft is the output of the forget gate, W f is the bias matrix of the forget gate, b f is the bias term of the forget gate.

[0151] The output gate is used to determine the memory cell state C at the current time step t Which ones need to be output, and o t =W o *[h t-1 , x t ]+b o , where o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate.

[0152] The state of the candidate memory cell is obtained by nonlinearly transforming the current input and the previous hidden state: t =f t ·C t-1 +i t tanh(W C ·[h t-1 , x t ]+b C ), where C t is the memory cell state at the current time step, f t is the output of the forget gate, C t-1 is the memory cell state of the previous time step, i t is the output of the input gate, tanh is the activation function, W C is the weight matrix of the memory cell, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, b C is the bias term of the memory cell.

[0153] The hidden state is determined by the output gate and the memory cell: h t =o t *tanh(C t ).

[0154] For example, suppose there is an LSTM unit for processing time series data, and the input data is as follows:

[0155] x t=[0.5], which is the input of the current time step.

[0156] h t-1 =[0.3], which is the hidden state of the previous time step.

[0157] Other parameters such as weights and bias values ​​are assumed as follows:

[0158] W i =[0.2], b i =[0.1]

[0159] W f =[0.3], b f =[0.1]

[0160] W C =[0.5], b C =[0.1]

[0161] W o =[0.4], b o =[0.1]

[0162] C t-1 =[0.6]

[0163] The calculation process is as follows:

[0164] Input Gate:

[0165] i t =σ(W i ·[h t-1 , x t ]+b i )

[0166] i t =σ(0.2·[0.3,0.5]+0.1)=σ(0.2·0.8+0.1)=σ(0.26)≈0.5646

[0167] Forget Gate:

[0168] f t =σ(W f ·[h t-1 , x t ]+b f )

[0169] f t =σ(0.3·[0.3, 0.5]+0.1)=σ(0.3·0.8+0.1)=σ(0.34)≈0.5842

[0170] Candidate memory cell status:

[0171]

[0172] Update memory cell status:

[0173]

[0174] C t =0.5842·0.6+0.5646·0.4621≈0.3505+0.2610=0.6115

[0175] Output Gate:

[0176] o t =σ(W o ·[h t-1 , x t ]+b o )

[0177] o t =σ(0.4·[0.3,0.5]+0.1)=σ(0.4·0.8+0.1)=σ(0.42)≈0.6035

[0178] Update hidden state:

[0179] h t =o t tanh(C t )

[0180] h t =0.6035·tanh(0.6115)≈0.6035·0.5448≈0.3285

[0181] The fully connected layer includes two fully connected layers. The number of neurons in the first fully connected layer is k, and the number of neurons in the second layer is the output dimension. The activation function of the first fully connected layer is ReLU, and the activation function of the second fully connected layer is sigmoid or softmax.

[0182] The fully connected layer plays an important role in mapping high-dimensional features to the output space in the neural network. By introducing two fully connected layers, the nonlinear expression ability of the model can be increased. This is because each fully connected layer performs linear transformation and nonlinear activation, and the superimposed layers can capture more complex patterns and features.

[0183] Secondly, in the process of converting high-dimensional input feature space to low-dimensional output space, the gradual dimensionality reduction through multiple layers helps to mitigate the impact of information loss and feature compression. The multi-layer structure can help the model train more stably, especially when processing high-dimensional data. The number of neurons in each layer gradually decreases, allowing the network to better avoid overfitting and underfitting when learning features layer by layer.

[0184] It should be noted that the number of neurons k in the first fully connected layer is usually determined according to the dimension of the input features and the complexity of the network. More neurons can ensure the diversity of input features and that information is not compressed too much, while providing rich feature representation for the next layer. The number of neurons in the second fully connected layer usually corresponds to the output dimension of the task. For example, in a classification task, the output dimension is the number of categories; in a regression task, the output dimension is 1.

[0185] In addition, the ReLU activation function can effectively solve the gradient vanishing problem, allowing the network to converge faster. The nonlinearity of ReLU enables it to learn complex patterns. The output value of Sigmoid is between (0, 1), which is suitable for binary classification problems or scenarios where the output is a probability value. The output value of Soffmax is between (0, 1), and the sum of all output values ​​is 1, which is suitable for multi-classification problems.

[0186] The output layer has an output dimension of 1 when the activation function is sigmoid and an output dimension of the number of categories when the activation function is softmax.

[0187] In summary, the output of the LSTM layer will be sent to the attention layer. The attention layer calculates the weight of each time step and performs weighted summation on the output of the LSTM layer to obtain a more representative feature representation. This weighted feature representation will be sent to the fully connected layer for nonlinear transformation, and finally output the patient's nutritional needs and risk prediction results. For example, for the binary classification prediction task of malnutrition, the output layer will output a probability value indicating the possibility of malnutrition in the patient. For the regression prediction task of energy demand, the output layer will output a numerical value indicating the patient's daily energy demand. During the model training process, the backpropagation algorithm and gradient descent method will be used to optimize the model parameters to minimize the loss function. In order to prevent overfitting, L2 regularization and Dropout techniques will be used.

[0188] In addition, model training is a key step in building the LSTM model. Its goal is to optimize model parameters so that the model can accurately predict the nutritional needs and risks of dialysis patients. The training steps of pre-training include S21-S26.

[0189] S21. Randomly divide the dataset into training set, validation set and test set.

[0190] In this embodiment, the collected patient data are randomly divided into a training set, a validation set, and a test set in a ratio of 7:2:1. In a certain test, data of 183 patients were collected, including data of 128 patients in the training set, data of 37 patients in the validation set, and data of 18 patients in the test set.

[0191] Data example:

[0192]

[0193] Note: nPCR: normalized protein catabolism rate

[0194] Malnutrition: 0 means no malnutrition, 1 means malnutrition.

[0195] S22. Determine the loss function, use binary cross entropy as the loss function for the binary classification problem, use classification cross entropy as the loss function, and use accuracy as the evaluation indicator.

[0196] For binary classification problems, such as predicting whether a patient is malnourished, the binary cross entropy loss function is used: L = -[ylog(p)+(1-y)log(1-p)], where y is the true label (0 or 1) and p is the probability predicted by the model.

[0197] Multi-classification problems (such as predicting the degree of malnutrition of patients): using the Categorical Cross Entropy loss function: L = -∑y i log(p i ), where y_i is the one-hot encoding of the true label, p i is the probability predicted by the model.

[0198] S23. The Adam optimizer is used and the initial learning rate is set to 0.001.

[0199] S24. Divide the training set into small batches of 32 samples, and use only one small batch of data for training in each iteration.

[0200] S25. When the loss function value of the model on the validation set does not decrease for 10 consecutive epochs, terminate the training early.

[0201] S26. Use an exponential decay strategy, with the learning rate decaying to 0.9 times of the original value every 5 epochs. After each epoch, save the model parameters and record the best performance on the validation set. Finally, select the model with the best performance on the validation set as the final model.

[0202] In addition, in order to find the best model hyperparameters, a systematic hyperparameter tuning strategy can be adopted to improve the performance of the model on the task of nutritional management of dialysis patients.

[0203] First, we define a reasonable hyperparameter search space that covers the key parameters of the LSTM model:

[0204]

[0205] For the search of hyperparameters, we can combine the two strategies of grid search (GridSearch) and random search (RandomSearch) to efficiently explore the hyperparameter space. For some hyperparameters, such as the number of LSTM layers and hidden state dimensions, we can use grid search to exhaust all possible combinations, evaluate the performance of each combination on the validation set, and select the best performing combination. For other hyperparameters, such as learning rate and batch size, we can use random search to randomly sample a certain number of combinations within a predefined range of values ​​to more efficiently explore the hyperparameter space.

[0206] To evaluate the effectiveness of the proposed model, multiple evaluations will be conducted on an independent test set, including prediction performance evaluation and clinical effect evaluation, and compared with traditional nutritional management methods.

[0207] First, the prediction performance of the model will be evaluated on the test set and compared with baseline models such as logistic regression, random forest, and support vector machine. For the binary classification task of malnutrition prediction, accuracy, precision, recall, F1 score, and area under the receiver operating characteristic curve (AUC-R0C) can be used as evaluation indicators. For the regression task of energy requirement prediction, mean square error (MSE), mean absolute error (MAE), and coefficient of determination (R 2 ) as the evaluation indicator.

[0208] In order to verify the superiority of the LSTM model, the evaluation indicators of different models can be statistically analyzed. For classification tasks, the McNemar test is used to compare the accuracy difference between the LSTM model and the baseline model, and the Delong test is used to compare the difference in AUC-ROC. For regression tasks, the paired t-test can be used to compare the difference in MSE and MAE between the LSTM model and the baseline model. The significance level of all statistical tests is set to α = 0.05.

[0209] Secondly, to evaluate the impact of personalized nutrition management programs on patients' clinical outcomes, this application conducted a randomized controlled trial (RCT). Dialysis patients who met the inclusion criteria were randomly assigned to the experimental group (receiving personalized nutrition management programs guided by the LSTM model) and the control group (receiving traditional nutrition management programs). Before the start of the intervention (baseline), during the intervention (such as the 3rd month, the 6th month), and after the end of the intervention (such as the 12th month), we will collect clinical data from patients, including:

[0210] Nutritional indicators: serum albumin, hemoglobin, body mass index, upper arm muscle circumference, skin fold thickness, etc.

[0211] Complications: cardiovascular events (such as myocardial infarction, stroke), infection, hospitalization rate, mortality, etc.

[0212] Quality of life: SF-36, KDQOL-SF and other scales were used to assess the patients' quality of life.

[0213] We will use repeated measures analysis of variance or mixed effects models to compare the differences in nutritional indicators and quality of life scores between the two groups at different time points, and use Kaplan-Meier survival analysis and Cox proportional hazards regression models to compare the differences in complication rates and mortality between the two groups.

[0214] The following shows the evaluation results of the LSTM model in predicting malnutrition and energy requirements in dialysis patients:

[0215] Model Malnutrition prediction AUC-ROC (95% Cl) <![CDATA[Energy demand prediction R 2 (95%Cl)]]> LSTM 0.885(0.842-0.928) 0.753(0.701-0.805) Logistic Regression 0.793(0.741-0.845) 0.682(0.621-0.743) Random Forest 0.827(0.778-0.876) 0.715(0.658-0.772)

[0216] Comparison of serum albumin levels between the experimental group and the control group (mean ± standard deviation):

[0217] Group Before intervention (g / L) 3 months after intervention (g / L) 6 months after intervention (g / L) 12 months after intervention (g / L) Experimental Group 35.2±3.5 37.8±3.3 39.2±2.9 40.5±2.6 Control group 35.5±3.8 36.4±3.6 37.0±3.4 37.5±3.2

[0218] The results of statistical analysis showed that the LSTM model was superior to the logistic regression and random forest models in predicting malnutrition and energy requirements in dialysis patients (p < 0.05). In addition, the serum albumin level of the experimental group was significantly higher than that of the control group after intervention (p < 0.01), the hospitalization rate was reduced by 4.5%, and the mortality rate was reduced by 2.8%. This shows that the personalized nutrition management program based on the LSTM model can effectively improve the nutritional status and some clinical outcomes of dialysis patients.

[0219] S3. Generate a personalized nutritional management plan for dialysis patients based on the output results.

[0220] According to the prediction results of the LSTM model, combined with the individual conditions of the patients and clinical guidelines, a personalized nutritional management plan for dialysis patients can be generated.

[0221] For example, a nutritional management plan for dialysis patients may include an assessment of energy requirements. The energy requirements of dialysis patients are affected by many factors, such as age, gender, weight, physical activity level, dialysis method, etc. Therefore, the following formula can be used to estimate the patient's total daily energy requirements.

[0222] Total energy requirement (kcal / day) = basal metabolic rate (BMR) * activity factor * stress factor

[0223] Among them, basal metabolic rate (BMR): can be calculated using the Harris-Benedict formula or the Mifflin-St.Jeor formula. Activity coefficient: adjusted according to the patient's physical activity level, usually between 1.2-1.4.

[0224] Stress coefficient: adjusted according to the patient's disease state, usually between 1.2-1.5.

[0225] For example, a 45-year-old female peritoneal dialysis patient weighing 55 kg has a low level of physical activity and is not in a state of obvious stress. Her BMR can be calculated using the Mifflin-St.Jeor formula:

[0226] BMR = 9.99 × weight (kg) + 6.25 × height (cm) - 4.92 × age (years) - 161

[0227] =9.99×55+6.25×160-4.92×45-161

[0228] =1222kcal / day.

[0229] Her total energy requirement is:

[0230] Total energy requirement = 1222 kcal / day × 1.2 × 1.0 = 1466 kcal / day.

[0231] As another example, a nutritional management plan for dialysis patients can include an assessment of carbohydrate requirements. Carbohydrates are the main source of energy for dialysis patients. It is generally recommended that carbohydrates provide 50-60% of total energy.

[0232] Carbohydrate requirement (g / day) = total energy requirement (kcal / day) × (50-60)% ÷ 4 kcal / g.

[0233] The carbohydrate requirements for the above peritoneal dialysis patient are:

[0234] Carbohydrate requirement = 1466 kcal / day x 55% ÷ 4 kcal / g = 201 g / day

[0235] Finally, after evaluating the patient's nutritional needs, the system develops a personalized diet plan for the patient based on the patient's eating habits, food preferences, economic status and other factors, including daily food intake, meal distribution, cooking methods, etc. At the same time, it provides necessary nutrition education to guide patients on how to choose food, reasonably match meals, monitor nutritional status, etc. The daily diet plan developed by the system for the above peritoneal dialysis patients is as follows:

[0236]

[0237] Model Validation and Evaluation

[0238] This application uses the model to calculate the energy, protein, carbohydrate and fat requirements of each patient, and compares them with the independent evaluation results of 5 experienced clinical nutritionists, including accuracy, practicality and clinical effect. The results showed that there was a high degree of consistency between the model calculation results and the nutritionist's evaluation results (ICC>0.8, p<0.001), with an average difference of less than 5%, and the Bland-Altman plot also showed good consistency. This shows that the model has a high accuracy in calculating nutritional needs. In addition, for the personalized diet plan generated by the model, the experts used a 5-point Likert scale to score the rationality, safety, feasibility, and degree of personalization of the diet plan. The results showed that the average score of the diet plan was above 4 points, indicating that the experts generally approved of the diet plan generated by the model. The specific scoring results are shown in the following table:

[0239]

[0240]

[0241] In addition, the results showed that the average compliance score of patients was 85%, indicating that most patients were able to implement the dietary plan generated by the model well.

[0242] In addition, refer to Figure 5 and Figure 6 , Figure 5 The horizontal axis is time (months), and the vertical axis is hemoglobin (g / dL). Figure 6 The horizontal axis is time (months), and the vertical axis is blood urea nitrogen (mg / dL). The blue example is before the intervention, and the green example is after the intervention. Here, the nutritional indicators and clinical outcomes of patients who used the model-generated diet plan were compared with those of patients who did not use the plan. The results showed that patients who used the model-generated diet plan had significant improvements in nutritional indicators such as hemoglobin, albumin, and blood lipids after 3 and 6 months of intervention (p<0.05), and the hospitalization rate and complication rate were also significantly reduced (p<0.05). This shows that the diet plan generated by the model can effectively improve the nutritional status and clinical outcomes of dialysis patients.

[0243] In summary, this model has high accuracy, practicality and clinical effect in generating personalized nutritional management plans for dialysis patients. This model can provide personalized dietary guidance for dialysis patients, helping them improve their nutritional status, improve their quality of life and reduce the risk of complications.

[0244] In the second aspect, the present application provides a personalized nutrition management device for dialysis patients based on a long short-term memory network, which adopts the following technical solution:

[0245] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0246] In one embodiment, a personalized nutrition management device for dialysis patients based on a long short-term memory network is provided, and the personalized nutrition management device for dialysis patients based on a long short-term memory network corresponds one-to-one to the personalized nutrition management method for dialysis patients based on a long short-term memory network in the above embodiment. The personalized nutrition management device for dialysis patients based on a long short-term memory network includes an information acquisition and fusion module, a model calculation module, and a solution generation module. The functional modules are described in detail as follows:

[0247] The information acquisition and fusion module is used to obtain the patient's demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information, and encode different types of data into vector representations based on multimodal fusion and then fuse them.

[0248] The model calculation module is used to input the multimodal fusion data as input features into the pre-trained LSTM model and obtain the output results, wherein the pre-trained LSTM model is based on the integration of pre-collected demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information about the patient and input into the LSTM model, and is trained based on the personalized nutritional management recommendations or personalized nutritional management control information of the corresponding patients that are marked.

[0249] The program generation module is used to generate a personalized nutrition management program for dialysis patients based on the output results.

[0250] For the specific definition of the personalized nutrition management device for dialysis patients based on long short-term memory networks, please refer to the definition of the personalized nutrition management method for dialysis patients based on long short-term memory networks above, which will not be repeated here. Each module in the above-mentioned personalized nutrition management device for dialysis patients based on long short-term memory networks can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0251] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for data related to the personalized nutrition management method for dialysis patients based on a long short-term memory network. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a personalized nutrition management method for dialysis patients based on a long short-term memory network is implemented.

[0252] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the personalized nutrition management method for dialysis patients based on the long short-term memory network of the above embodiment is implemented, for example Figure 2 Alternatively, when the processor executes the computer program, the functions of each module / unit of the personalized nutrition management device for dialysis patients based on the long short-term memory network in the above-mentioned embodiment are realized, for example Figure 7 To avoid repetition, it will not be described here.

[0253] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the personalized nutrition management method for dialysis patients based on the long short-term memory network of the above embodiment is implemented, for example Figure 2 Alternatively, when the computer program is executed by the processor, the functions of each module / unit in the personalized nutrition management device for dialysis patients based on the long short-term memory network in the above device embodiment are realized, for example Figure 7 To avoid repetition, it will not be described here.

[0254] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments of the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0255] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0256] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.

Claims

1. A personalized nutrition management method for dialysis patients based on long short-term memory network, characterized in that: The following steps are involved: S1. Obtain patient information, encode different types of data into vector representations based on multimodal fusion, and then fuse them, wherein the patient information includes demographic information, hemodialysis parameters, nutritional assessment indicators, and dietary habit information; S2. Input the multimodal fusion data as input features into the pre-trained LSTM model, and obtain an output result, wherein the pre-trained LSTM model is obtained by integrating the pre-collected patient information and inputting it into the LSTM model, and training based on the personalized nutrition management recommendations or personalized nutrition management control information of the corresponding patients that are marked; S3. Generate a personalized nutritional management plan for dialysis patients based on the output results.

2. The method for personalized nutritional management of dialysis patients based on long short-term memory network according to claim 1, characterized in that: The pre-trained LSTM model includes: Input layer, the input dimension of the input layer is m*d s +n*d d , where m is the number of static features in the patient information, n is the number of dynamic features in the patient information, and the embedding dimension of each static feature is d s , the embedding dimension of each dynamic feature is d d ; Static feature embedding layer, for each static feature, use the embedding layer or one-hot encoding to convert it into d s dimensional vector representation; Dynamic feature embedding layer, for each dynamic feature, use the embedding layer to convert it into d d dimensional vector representation; LSTM layer, including two LSTM layers stacked, each LSTM layer contains h LSTM units; where h is the hidden state dimension; The attention layer uses the Bahdanau attention mechanism to calculate the attention weight of each time step, and then multiplies the output of the LSTM layer by the attention weight to obtain the weighted feature representation; The fully connected layer includes two fully connected layers. The number of neurons in the first fully connected layer is k, and the number of neurons in the second layer is the output dimension. The activation function of the first fully connected layer is ReLU, and the activation function of the second fully connected layer is sigmoid or soffmax. The output layer has an output dimension of 1 when the activation function is sigmoid and an output dimension of the number of categories when the activation function is softmax.

3. The method for personalized nutritional management of dialysis patients based on long short-term memory network according to claim 2, characterized in that: The LSTM unit includes an input gate, a forget gate, an output gate and a memory cell; The input gate is used for the input x at the current time step. t and / or the hidden state h at the previous time step t-1 Can it be written into the memory cell, and i t =W i *[h t-1 , x t ]+b i ; where i t is the output of the input gate, W i is the weight matrix of the input gate, b i is the bias term of the input gate; The forget gate is used to determine the memory cell state C of the previous time step. t-1 What needs to be forgotten, and f t =W f *[h t-1 , x t ]+b f , where f t is the output of the forget gate, W f is the bias matrix of the forget gate, b f is the bias term of the forget gate; The output gate is used to determine the memory cell state C at the current time step t Which ones need to be output, and o t =W o *[h t-1 , x t ]+b o , where o t is the output of the output gate, W o is the weight matrix of the output gate, b o is the bias term of the output gate; The state of the candidate memory cell is obtained by performing a nonlinear transformation on the current input and the previous hidden state: t =f t ·C t-1 +i t tanh(W c ·[h t-1 , x t ]+b C ), where C t is the memory cell state at the current time step, f t is the output of the forget gate, C t-1 is the memory cell state of the previous time step, i t is the output of the input gate, tanh is the activation function, W c is the weight matrix of the memory cell, h t-1 is the hidden state of the previous time step, x t is the input of the current time step, b C is the bias term of the memory cell; The hidden state is determined by the output gate and the memory cell: h t =o t *tanh(C t ).

4. The method for personalized nutrition management of dialysis patients based on long short-term memory network according to claim 3, characterized in that: In the attention layer, the attention weight score is e t =v T *tanh(W1*h t +W2*q), the attention weight is α t =softmax(et), where v T is the weight vector, W1 and W2 are both weight matrices, and q is the query vector; Multiply the output of the LSTM layer by the attention weight to obtain the weighted feature representation C = ∑(α t *h t ).

5. The method for personalized nutritional management of dialysis patients based on long short-term memory network according to claim 4, characterized in that: The training steps of the pre-trained LSTM model include: S21. Randomly divide the dataset into training set, validation set and test set; S22. Determine the loss function, use binary cross entropy as the loss function for the binary classification problem, use classification cross entropy as the loss function, and use accuracy as the evaluation indicator; S23. Adopt Adam optimizer, and set the initial learning rate to 0.001; S24. Divide the training set into small batches of 32 samples, and use only one small batch of data for training in each iteration; S25. When the loss function value of the model on the validation set does not decrease for 10 consecutive epochs, terminate the training early; S26. Use an exponential decay strategy, with the learning rate decaying to 0.9 times of the original value every 5 epochs. After each epoch, save the model parameters and record the best performance on the validation set. Finally, select the model with the best performance on the validation set as the final model.

6. The method for personalized nutrition management of dialysis patients based on long short-term memory network according to claim 1, characterized in that: S1 includes the following steps: S11. Encode the static features and convert the encoding into a vector representation of fixed dimension using an embedding layer or one-hot encoding; S12. Arrange various dynamic features in chronological order to form a sequence, and use an embedding layer to convert the sequence into a corresponding vector representation; S13. Concatenate the static feature vector and the dynamic feature sequence to form a unified input vector.

7. The method for personalized nutrition management of dialysis patients based on long short-term memory network according to claim 1, characterized in that: The demographic information includes: age, gender, height, weight, education level, occupation; The hemodialysis parameters include: dialysis frequency, dialysis time, dialyzer type, dialysate composition, ultrafiltration volume, blood pressure, and hemoglobin; The nutritional assessment indicators include: laboratory examination indicators, anthropometric indicators and nutritional questionnaire scores; The dietary habit information includes: daily intake of energy, protein, carbohydrates, fat, vitamins, and minerals; The laboratory examination indicators include: serum albumin, serum creatinine, and blood urea nitrogen; The human body detection indicators include: body mass index, upper arm muscle circumference, and skin fold thickness; The nutritional questionnaire score includes: subjective overall assessment and nutritional risk screening.

8. A personalized nutrition management device for dialysis patients based on long short-term memory network, characterized in that: include: The information acquisition and fusion module is used to obtain the patient's demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information, and encode different types of data into vector representations based on multimodal fusion and then fuse them; A model calculation module, used to input the multimodal fusion data as input features into a pre-trained LSTM model and obtain an output result, wherein the pre-trained LSTM model is obtained by integrating the pre-collected demographic information, hemodialysis parameters, nutritional assessment indicators and dietary habit information about the patient and inputting them into the LSTM model, and training based on the personalized nutritional management suggestions or personalized nutritional management control information of the corresponding patient that has been marked; The program generation module is used to generate a personalized nutrition management program for dialysis patients based on the output results.

9. A computer device, characterized in that: It includes: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to: execute the personalized nutrition management method for dialysis patients based on long short-term memory network according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement: the personalized nutritional management method for dialysis patients based on the long short-term memory network as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Artificial intelligence-based nephropathy peritoneal dialysis full life cycle management device, system and method

    CN119889587A

  • Health state prediction network, model training and prediction method, device and system

    CN120012856A

  • AI-assisted hemodialysis patient nutrition algorithm

    CN120526985A

  • Hemodialysis patient risk assessment system based on objective assessment method

    CN120544912A