Diet management system and method for Crohn's disease patients
Through deep learning technology and cross-domain gate query encoder, combined with AIGC model, a personalized Crohn's disease diet plan is generated, which solves the problem of lack of personalization of traditional solutions, improves the intelligence and adaptability of diet management, and alleviates symptoms. and improve nutrition.
Patent Information
- Application Number
- CN202411450776.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-17
AI Technical Summary
The traditional Crohn's disease diet management program lacks personalization and fails to fully consider individual differences between patients, making standard programs difficult to adapt and may even exacerbate symptoms.
By obtaining the patient's condition description and doctor's adjustment opinions, deep learning technology is used to perform word segmentation and semantic encoding of the initial standard diet plan, and a cross-domain focus gate query encoder is used to generate a personalized diet, and a personalized diet is automatically generated in combination with the AIGC model generator. plan.
It realizes the automatic generation of personalized diet plans based on individual differences of patients, improves the intelligence and adaptability of diet management, relieves symptoms, and improves nutritional status.
Smart Images

Figure CN118969197B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent health management, and more specifically, to a diet management system and method for Crohn's disease patients. Background Art
[0002] Crohn's disease is a chronic inflammatory bowel disease that can affect any part of the digestive tract. The disease is characterized by chronicity and recurrence, and can cause symptoms such as intestinal inflammation, ulcers, abdominal pain, and diarrhea. Since Crohn's disease may lead to poor digestion and absorption and insufficient nutrient intake, dietary management plays an important role in the treatment of Crohn's disease patients. A reasonable diet can not only help relieve symptoms, but also improve nutritional status and quality of life.
[0003] However, traditional dietary management of Crohn's disease is often based on universally applicable guidelines that attempt to provide a one-size-fits-all solution for most patients. However, this approach ignores significant differences between individuals, including differences in symptom severity, nutrient absorption capacity, and food tolerance. This means that some patients may find standard dietary regimens difficult to adapt to, or even exacerbate symptoms. For example, some patients may be sensitive to high-fiber foods, while others may not be affected.
[0004] Therefore, an optimized dietary management regimen for patients with Crohn's disease is desired. Summary of the invention
[0005] In order to solve the above technical problems, the present application is proposed. The present application provides a diet management system and method for Crohn's disease patients.
[0006] According to one aspect of the present application, a diet management system for Crohn's disease patients is provided, comprising:
[0007] A patient object condition description acquisition module is used to acquire the condition description input by the patient object;
[0008] An initial standard diet plan extraction module, used for extracting an initial standard diet plan from a diet plan library based on the condition description;
[0009] A diet plan adjustment opinion acquisition module is used to acquire diet plan adjustment opinions input by a doctor;
[0010] A diet plan adjustment module, used to adjust the initial standard diet plan based on the diet plan adjustment opinion to obtain a personalized diet plan;
[0011] Wherein, the diet plan adjustment module includes:
[0012] A diet plan word granularity semantic encoding unit, used for performing word segmentation processing on the initial standard diet plan and then passing it through a diet plan semantic encoder to obtain a sequence of diet plan word granularity semantic encoding feature vectors;
[0013] A diet plan adjustment opinion semantic coding unit, used for semantically coding the diet plan adjustment opinion to obtain a diet plan adjustment opinion semantic coding feature vector;
[0014] An adjustment opinion-diet plan cross-domain matching unit, used to use the diet plan adjustment opinion semantic encoding feature vector as a query feature vector and a feature matrix composed of a sequence of diet plan word granularity semantic encoding feature vectors as an initial key matrix, and input the query feature vector and the initial key matrix into a cross-domain attention gate query encoder based on key matrix local association enhancement to obtain an adjustment opinion-diet plan cross-domain matching feature vector;
[0015] A personalized diet plan generating unit is used to obtain the personalized diet plan based on the adjustment opinion-diet plan cross-domain matching feature vector.
[0016] In the above-mentioned diet management system for Crohn's disease patients, the diet plan word granularity semantic encoding unit is used to: after word segmentation processing of the initial standard diet plan, pass it through a diet plan semantic encoder including a word embedding layer to obtain a sequence of the diet plan word granularity semantic encoding feature vectors.
[0017] In the above-mentioned Crohn's disease patient diet management system, the adjustment opinion-diet plan cross-domain matching unit includes: a diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit, which is used to calculate the feature distribution difference energy coefficient between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients; a diet plan word granularity semantic row vector updating subunit, which is used to compare each diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient in the set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient with a predetermined threshold, and in response to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient being less than the predetermined threshold, the initial diet plan word granularity semantic row vector corresponding to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient and the diet plan adjustment opinion semantic encoding feature vector are updated. as the mean vector of the updated diet plan word granularity semantic row vector to obtain the updated diet plan word granularity semantic key matrix; a diet plan adjustment opinion semantic feature embedding subunit, used to use the value embedding matrix to process the diet plan adjustment opinion semantic encoding feature vector to obtain the diet plan adjustment opinion semantic value vector; a diet plan adjustment opinion-word granularity semantic cross-domain query subunit, used to use the diet plan adjustment opinion semantic encoding feature vector as the query vector, each updated diet plan word granularity semantic row vector in the updated diet plan word granularity semantic key matrix as the key vector and the diet plan adjustment opinion semantic value vector to input the cross-domain attention gate query module based on the Transformer structure to obtain a sequence of diet plan adjustment opinion-word granularity semantic cross-domain query attention vectors; an adjustment opinion-diet plan cross-domain matching feature generation subunit, used to calculate the positional mean vector of the sequence of the diet plan adjustment opinion-word granularity semantic cross-domain query attention vectors to obtain the adjustment opinion-diet plan cross-domain matching feature vector.
[0018] In the above-mentioned diet management system for Crohn's disease patients, the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit includes: a diet plan adjustment opinion-word granularity semantic association interaction secondary subunit, which is used to calculate the semantic association interaction vector between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic association interaction vectors; a diet plan adjustment opinion-word granularity interaction feature distribution difference energy coefficient calculation secondary subunit, which is used to calculate the feature distribution difference energy coefficient of each diet plan adjustment opinion-word granularity semantic association interaction vector in the set of diet plan adjustment opinion-word granularity semantic association interaction vectors to obtain a set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients, wherein the feature distribution difference energy coefficient of each diet plan adjustment opinion-word granularity semantic association interaction vector is related to the maximum value, mean and variance of each diet plan adjustment opinion-word granularity semantic association interaction vector.
[0019] In the above-mentioned diet management system for Crohn's disease patients, the diet plan adjustment opinion-word granularity semantic association interaction secondary subunit is used to: respectively calculate the position difference, position dot product and position addition between the diet plan adjustment opinion semantic coding feature vector and the initial diet plan word granularity semantic row vector to obtain the diet plan adjustment opinion-word granularity semantic difference vector, the diet plan adjustment opinion-word granularity semantic dot product vector and the diet plan adjustment opinion-word granularity semantic sum vector; cascade the diet plan adjustment opinion-word granularity semantic difference vector, the diet plan adjustment opinion-word granularity semantic dot product vector and the diet plan adjustment opinion-word granularity semantic sum vector and perform one-dimensional convolution encoding to obtain the diet plan adjustment opinion-word granularity semantic multi-dimensional fusion vector; perform local window-based maximum pooling processing on the diet plan adjustment opinion-word granularity semantic multi-dimensional fusion vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction vector.
[0020] In the above-mentioned diet management system for Crohn's disease patients, the diet plan adjustment opinion-word granularity interaction feature distribution difference energy coefficient calculation secondary subunit is used to: respectively extract the maximum value of the diet plan adjustment opinion-word granularity semantic association interaction vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction maximum value; respectively calculate the mean and variance of the diet plan adjustment opinion-word granularity semantic association interaction vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction mean and the diet plan adjustment opinion-word granularity semantic association interaction variance; add the diet plan adjustment opinion-word granularity semantic association interaction variance and hyperparameter to obtain the first difference energy coefficient of the diet plan adjustment opinion-word granularity semantic association interaction; calculate the maximum value of the diet plan adjustment opinion-word granularity semantic association interaction and the diet plan The square of the difference between the means of the dietary adjustment opinions and the word granularity semantic association interaction is obtained to obtain the dietary adjustment opinions-word granularity semantic difference value; the dietary adjustment opinions-word granularity semantic association interaction variance is multiplied by a constant of two to obtain the modulated dietary adjustment opinions-word granularity semantic association interaction variance; the dietary adjustment opinions-word granularity semantic difference value and the modulated dietary adjustment opinions-word granularity semantic association interaction variance are added to the hyperparameter to obtain the dietary adjustment opinions-word granularity semantic association interaction second difference energy coefficient; the dietary adjustment opinions-word granularity semantic association interaction first difference energy coefficient is divided by the dietary adjustment opinions-word granularity semantic association interaction second difference energy coefficient to obtain the dietary adjustment opinions-word granularity semantic feature distribution difference energy coefficient.
[0021] In the above-mentioned diet management system for Crohn's disease patients, the diet adjustment opinion semantic feature embedding subunit is used to: after matrix multiplication of the diet adjustment opinion semantic encoding feature vector and the value embedding matrix, add the obtained diet adjustment opinion semantic embedding vector and the value bias vector by position to obtain the diet adjustment opinion semantic value vector.
[0022] In the above-mentioned diet management system for Crohn's disease patients, the diet plan adjustment opinion-word granularity semantic cross-domain query sub-unit is used to: calculate the product between the diet plan adjustment opinion semantic encoding feature vector and the transposed vector of the updated diet plan word granularity semantic row vector to obtain the diet plan adjustment opinion-updated diet plan word granularity association matrix, and then divide the diet plan adjustment opinion-updated diet plan word granularity association matrix by the square root of the length of the updated diet plan word granularity semantic row vector by position to obtain the diet plan adjustment opinion-updated diet plan word granularity modulation matrix; input the diet plan adjustment opinion-updated diet plan word granularity modulation matrix into the softmax function to obtain the diet plan adjustment opinion-updated diet plan word granularity activation matrix; multiply the diet plan adjustment opinion-updated diet plan word granularity activation matrix by the diet plan adjustment opinion semantic value vector to obtain the diet plan adjustment opinion-word granularity semantic cross-domain query attention vector.
[0023] In the above-mentioned diet management system for Crohn's disease patients, the personalized diet plan generating unit is used to: input the adjustment advice-diet plan cross-domain matching feature vector into the personalized diet plan generator based on the AIGC model to obtain the personalized diet plan.
[0024] According to another aspect of the present application, a method for dietary management of Crohn's disease patients is provided, comprising:
[0025] Get the condition description entered by the patient object;
[0026] Based on the condition description, extracting an initial standard diet plan from a diet plan library;
[0027] Get input from your doctor on dietary adjustments;
[0028] Based on the dietary plan adjustment suggestions, adjusting the initial standard dietary plan to obtain a personalized dietary plan;
[0029] Wherein, based on the dietary plan adjustment opinions, the initial standard dietary plan is adjusted to obtain a personalized dietary plan, including:
[0030] After word segmentation processing is performed on the initial standard diet plan, a diet plan semantic encoder is used to obtain a sequence of diet plan word granularity semantic encoding feature vectors;
[0031] Performing semantic coding on the dietary plan adjustment opinion to obtain a dietary plan adjustment opinion semantic coding feature vector;
[0032] Taking the semantic encoding feature vector of the dietary plan adjustment opinion as the query feature vector and the feature matrix composed of the sequence of the dietary plan word granularity semantic encoding feature vector as the initial key matrix, the query feature vector and the initial key matrix are input into a cross-domain attention gate query encoder based on the local association enhancement of the key matrix to obtain the adjustment opinion-diet plan cross-domain matching feature vector;
[0033] Based on the adjustment advice-diet plan cross-domain matching feature vector, the personalized diet plan is obtained.
[0034] Compared with the prior art, the Crohn's disease patient diet management system and method provided by the present application obtains the condition description input by the patient object, and based on the condition description, extracts the initial standard diet plan from the diet plan library, and obtains the diet plan adjustment opinions input by the doctor, and uses data analysis and processing technology based on deep learning to perform word segmentation and semantic encoding on the initial standard diet plan, and semantic encoding on the diet plan adjustment opinions, so as to automatically generate personalized diet plans based on the cross-domain query matching features between the word granularity semantic features of each initial standard diet plan and the semantic features of the diet plan adjustment opinions. In this way, these individual differences can be better identified and responded to, so as to automatically generate personalized diet plans, thereby realizing intelligent diet management. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0036] Figure 1 4 is a system block diagram of a diet management system for Crohn's disease patients according to an embodiment of the present application.
[0037] Figure 2 The present invention is a block diagram of a diet plan adjustment module in a diet management system for Crohn's disease patients according to an embodiment of the present application.
[0038] Figure 3 The present invention is a data flow diagram of a diet plan adjustment module in a diet management system for Crohn's disease patients according to an embodiment of the present application.
[0039] Figure 4 The present invention is a block diagram of an adjustment opinion-diet plan cross-domain matching unit in a diet management system for Crohn's disease patients according to an embodiment of the present application.
[0040] Figure 5The present invention is a block diagram of a diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit in a diet management system for Crohn's disease patients according to an embodiment of the present application.
[0041] Figure 6 Flow chart of a method for dietary management of Crohn's disease patients according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0043] Crohn's disease is a chronic inflammatory bowel disease that affects the entire digestive tract, presenting with symptoms such as intestinal inflammation, ulcers, abdominal pain and diarrhea. Because the disease can lead to indigestion and nutritional deficiencies, dietary management is essential for the treatment of patients. It helps relieve symptoms, improve nutritional status and enhance quality of life. Although traditional dietary recommendations are intended to provide universal guidance for all patients, they fail to fully take into account individual differences, such as symptom severity, nutrient absorption capacity and food tolerance. Therefore, some patients may find that these standard dietary plans are not suitable or may even aggravate their symptoms.
[0044] In response to the above technical problems, the technical concept of the present application is to obtain the description of the condition input by the patient object, and based on the description of the condition, extract the initial standard diet plan from the diet plan library, and obtain the diet plan adjustment opinions input by the doctor, and use data analysis and processing technology based on deep learning to perform word segmentation and semantic encoding on the initial standard diet plan, and perform semantic encoding on the diet plan adjustment opinions, so as to automatically generate personalized diet plans based on the cross-domain query matching features between the word granularity semantic features of each initial standard diet plan and the semantic features of the diet plan adjustment opinions. In this way, these individual differences can be better identified and responded to, so as to automatically generate personalized diet plans, thereby realizing intelligent diet management.
[0045] Figure 1 : is a system block diagram of a diet management system for Crohn's disease patients according to an embodiment of the present application. Figure 1As shown, a diet management system 100 for Crohn's disease patients according to an embodiment of the present application includes: a patient condition description acquisition module 110, used to acquire a condition description input by a patient; an initial standard diet plan extraction module 120, used to extract an initial standard diet plan from a diet plan library based on the condition description; a diet plan adjustment opinion acquisition module 130, used to acquire a diet plan adjustment opinion input by a doctor; and a diet plan adjustment module 140, used to adjust the initial standard diet plan based on the diet plan adjustment opinion to obtain a personalized diet plan.
[0046] In an embodiment of the present application, the patient object condition description acquisition module 110 and the initial standard diet plan extraction module 120 are used to obtain the condition description input by the patient object and to extract the initial standard diet plan from the diet plan library based on the condition description. It should be understood that the symptoms and condition of Crohn's disease vary from patient to patient, including the severity of the disease, the affected digestive tract site, the accompanying symptoms (such as abdominal pain, diarrhea, weight loss, etc.) and the overall health of the patient. By obtaining the condition description input by the patient object, it helps to understand the specific information of the individual patient, so that the diet plan finally generated meets the individual needs of the patient. The diet plan library is usually formulated based on clinical research and expert consensus, and has certain scientificity and effectiveness. Based on the condition description, extracting the initial standard diet plan from the diet plan library can ensure that the diet plan follows the clinical guidelines, so that the patient has a scientific and reasonable basis for diet management, rather than relying entirely on individual experience or clinical intuition.
[0047] In an embodiment of the present application, the diet adjustment opinion acquisition module 130 is used to obtain the diet adjustment opinions input by the doctor. It should be understood that the doctor has professional medical knowledge and clinical experience, and can provide scientific and reasonable diet adjustment suggestions according to the specific circumstances of the patient. The diet adjustment opinions input by the doctor ensure the scientificity and rationality of the diet, and also take into account the overall health status and individual differences of the patient, enhance the patient's compliance, and provide a basis for the dynamic adjustment of the diet. It is also worth mentioning that the doctor understands the medications the patient is using and their possible side effects, and can avoid recommending foods that may interact with the medications, thereby improving the safety and effectiveness of the treatment.
[0048] Figure 2 The present invention is a block diagram of a diet plan adjustment module in a diet management system for Crohn's disease patients according to an embodiment of the present application. Figure 3 FIG. 1 is a data flow diagram of a diet plan adjustment module in a diet management system for Crohn's disease patients according to an embodiment of the present application. Figure 2 and Figure 3As shown, the diet plan adjustment module 140 includes: a diet plan word granularity semantic encoding unit 141, which is used to perform word segmentation processing on the initial standard diet plan and then pass it through a diet plan semantic encoder to obtain a sequence of diet plan word granularity semantic encoding feature vectors; a diet plan adjustment opinion semantic encoding unit 142, which is used to semantically encode the diet plan adjustment opinion to obtain a diet plan adjustment opinion semantic encoding feature vector; an adjustment opinion-diet plan cross-domain matching unit 143, which is used to use the diet plan adjustment opinion semantic encoding feature vector as a query feature vector and a feature matrix composed of a sequence of diet plan word granularity semantic encoding feature vectors as an initial key matrix, and input the query feature vector and the initial key matrix into a cross-domain attention gate query encoder based on key matrix local association enhancement to obtain an adjustment opinion-diet plan cross-domain matching feature vector; a personalized diet plan generation unit 144, which is used to obtain the personalized diet plan based on the adjustment opinion-diet plan cross-domain matching feature vector.
[0049] In an embodiment of the present application, the diet plan word granularity semantic encoding unit 141 is used to obtain a sequence of diet plan word granularity semantic encoding feature vectors after word segmentation processing of the initial standard diet plan through a diet plan semantic encoder. Specifically, in an embodiment of the present application, the diet plan word granularity semantic encoding unit 141 is used to: after word segmentation processing of the initial standard diet plan, through a diet plan semantic encoder including a word embedding layer to obtain a sequence of diet plan word granularity semantic encoding feature vectors. It should be understood that the initial standard diet plan contains a large amount of diet plan semantic information, which is composed of multiple words or phrases. Therefore, in order to analyze and understand the semantic association relationship between the key contexts contained in each word in a more fine-grained manner, in the technical solution of the present application, after word segmentation processing of the initial standard diet plan, through a diet plan semantic encoder including a word embedding layer to obtain a sequence of diet plan word granularity semantic encoding feature vectors, so that the semantic information and meaning in the diet plan can be understood more accurately, providing a basis for the subsequent generation of personalized diet plans.
[0050] In an embodiment of the present application, the diet plan adjustment opinion semantic encoding unit 142 is used to semantically encode the diet plan adjustment opinion to obtain a diet plan adjustment opinion semantic encoding feature vector. Accordingly, considering that the diet plan adjustment opinion contains complex semantic information, in order to better understand and analyze the deep and critical semantic information in the diet plan adjustment opinion, in the technical solution of the present application, the diet plan adjustment opinion is semantically encoded to obtain a diet plan adjustment opinion semantic encoding feature vector, so that the key contextual information expressed in the adjustment opinion can be better understood.
[0051] In an embodiment of the present application, the adjustment opinion-diet plan cross-domain matching unit 143 is used to use the semantic coding feature vector of the diet plan adjustment opinion as the query feature vector and the feature matrix composed of the sequence of the diet plan word granularity semantic coding feature vector as the initial key matrix, and input the query feature vector and the initial key matrix into a cross-domain attention gate query encoder based on the local association enhancement of the key matrix to obtain the adjustment opinion-diet plan cross-domain matching feature vector. Accordingly, it is considered that the sequence of the diet plan adjustment opinion semantic coding feature vector and the diet plan word granularity semantic coding feature vector express different aspects of semantic information. And the semantic association matching information between the two has an important influence on the adjustment of the diet plan. For this reason, it is necessary to establish a cross-domain association semantic feature between them. Therefore, in order to better understand and match the relationship between the doctor's diet adjustment opinion and the initial standard diet, in the technical solution of the present application, the diet adjustment opinion semantic encoding feature vector is used as the query feature vector and the feature matrix composed of the sequence of the diet word granularity semantic encoding feature vector is used as the initial key matrix, and the query feature vector and the initial key matrix are input into the cross-domain attention gate query encoder based on the local association enhancement of the key matrix to obtain the adjustment opinion-diet cross-domain matching feature vector. In particular, in the matrix, each row vector is not only independent, but also constitutes a whole with other row vectors, which represents the information between the context contained in the entire matrix, so that the association between each row vector (diet word granularity) can be better captured. Therefore, first, the feature matrix composed of the sequence of the diet word granularity semantic encoding feature vector is used as the initial key matrix. Then, the feature distribution difference is calculated between each row vector in the initial key matrix and the query vector to obtain the set of energy coefficients of the difference in semantic feature distribution of the diet adjustment opinion-word granularity. That is, the query feature vector is regarded as a reference point, and the difference between it and the feature distribution of each row vector in the initial key matrix is evaluated through the feature distribution energy difference coefficient. It can be understood that since the query feature vector acts as a common reference point, the set of these feature distribution energy difference coefficients actually also reflects the local correlation information between the semantic feature vectors of each diet plan word granularity. In other words, the set of these difference coefficients not only measures the difference between a single vector and the query vector, but also implicitly expresses the mutual relationship and intrinsic connection between the vectors. Next, each feature distribution difference energy coefficient is compared with a predetermined threshold. In response to being less than the predetermined threshold, the mean vector of the query feature vector and the corresponding row vector is used as the row vector in the updated diet plan word granularity semantic key matrix.Furthermore, the semantic encoding feature vector of the diet plan adjustment opinion is linearly transformed to obtain a value vector, and each row vector in the updated diet plan word granularity semantic key matrix is used as a key vector. The query vector, value vector and key vector are input into the cross-domain attention gate query module based on the Transformer structure to perform local cross-domain semantic query matching semantic association encoding to achieve cross-domain semantic information interaction and communication between the two, and obtain a sequence of diet plan adjustment opinion-word granularity semantic cross-domain query attention vector. Finally, the mean vector of the query attention vector is calculated to integrate all cross-domain query attention information to obtain the adjustment opinion-diet plan cross-domain matching feature vector.
[0052] Specifically, Figure 4 FIG. 1 is a block diagram of an adjustment opinion-diet plan cross-domain matching unit in a diet management system for Crohn's disease patients according to an embodiment of the present application. Figure 4As shown, the adjustment opinion-diet plan cross-domain matching unit 143 includes: a diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit 1431, which is used to calculate the feature distribution difference energy coefficient between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients; a diet plan word granularity semantic row vector updating subunit 1432, which is used to compare each diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient in the set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient with a predetermined threshold, and in response to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient being less than the predetermined threshold, taking the mean vector between the initial diet plan word granularity semantic row vector corresponding to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient and the diet plan adjustment opinion semantic encoding feature vector as The updated diet plan word granularity semantic row vector is used to obtain an updated diet plan word granularity semantic key matrix; the diet plan adjustment opinion semantic feature embedding subunit 1433 is used to use the value embedding matrix to process the diet plan adjustment opinion semantic encoding feature vector to obtain the diet plan adjustment opinion semantic value vector; the diet plan adjustment opinion-word granularity semantic cross-domain query subunit 1434 is used to use the diet plan adjustment opinion semantic encoding feature vector as the query vector, each updated diet plan word granularity semantic row vector in the updated diet plan word granularity semantic key matrix as the key vector and the diet plan adjustment opinion semantic value vector as input into the cross-domain attention gate query module based on the Transformer structure to obtain a sequence of diet plan adjustment opinion-word granularity semantic cross-domain query attention vectors; the adjustment opinion-diet plan cross-domain matching feature generation subunit 1435 is used to calculate the positional mean vector of the sequence of the diet plan adjustment opinion-word granularity semantic cross-domain query attention vector to obtain the adjustment opinion-diet plan cross-domain matching feature vector.
[0053] More specifically, Figure 5 The block diagram of the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit in the diet management system for Crohn's disease patients according to the embodiment of the present application. Figure 5As shown, the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit 1431 includes: a diet plan adjustment opinion-word granularity semantic association interaction secondary subunit 14311, which is used to calculate the semantic association interaction vector between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic association interaction vectors; a diet plan adjustment opinion-word granularity interaction feature distribution difference energy coefficient calculation secondary subunit 14312, which is used to calculate the feature distribution difference energy coefficient of each diet plan adjustment opinion-word granularity semantic association interaction vector in the set of diet plan adjustment opinion-word granularity semantic association interaction vectors to obtain a set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients, wherein the feature distribution difference energy coefficient of each diet plan adjustment opinion-word granularity semantic association interaction vector is related to the maximum value, mean and variance of each diet plan adjustment opinion-word granularity semantic association interaction vector.
[0054] More specifically, in an embodiment of the present application, the diet plan adjustment opinion-word granularity semantic association interaction secondary sub-unit 14311 is used to: respectively calculate the positional difference, positional dot product and positional addition between the diet plan adjustment opinion semantic encoding feature vector and the initial diet plan word granularity semantic row vector to obtain the diet plan adjustment opinion-word granularity semantic differential vector, the diet plan adjustment opinion-word granularity semantic dot product vector and the diet plan adjustment opinion-word granularity semantic sum vector; cascade the diet plan adjustment opinion-word granularity semantic differential vector, the diet plan adjustment opinion-word granularity semantic dot product vector and the diet plan adjustment opinion-word granularity semantic sum vector, and perform one-dimensional convolution encoding to obtain the diet plan adjustment opinion-word granularity semantic multi-dimensional fusion vector; perform local window-based maximum pooling processing on the diet plan adjustment opinion-word granularity semantic multi-dimensional fusion vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction vector.
[0055] More specifically, in the embodiment of the present application, the diet plan adjustment opinion-word granularity interaction feature distribution difference energy coefficient calculation secondary subunit 14312 is used to: respectively extract the maximum value of the diet plan adjustment opinion-word granularity semantic association interaction vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction maximum value; respectively calculate the mean and variance of the diet plan adjustment opinion-word granularity semantic association interaction vector to obtain the diet plan adjustment opinion-word granularity semantic association interaction mean and the diet plan adjustment opinion-word granularity semantic association interaction variance; add the diet plan adjustment opinion-word granularity semantic association interaction variance and the hyperparameter to obtain the diet plan adjustment opinion-word granularity semantic association interaction first difference energy coefficient; calculate the maximum value of the diet plan adjustment opinion-word granularity semantic association interaction and the diet plan adjustment opinion The square of the difference between the means of the diet adjustment opinion-word granularity semantic association interaction is obtained to obtain the diet adjustment opinion-word granularity semantic difference value; the diet adjustment opinion-word granularity semantic association interaction variance is multiplied by a constant of two to obtain the modulated diet adjustment opinion-word granularity semantic association interaction variance; the diet adjustment opinion-word granularity semantic difference value and the modulated diet adjustment opinion-word granularity semantic association interaction variance are added to the hyperparameter to obtain the diet adjustment opinion-word granularity semantic association interaction second difference energy coefficient; the diet adjustment opinion-word granularity semantic association interaction first difference energy coefficient is divided by the diet adjustment opinion-word granularity semantic association interaction second difference energy coefficient to obtain the diet adjustment opinion-word granularity semantic feature distribution difference energy coefficient.
[0056] More specifically, in an embodiment of the present application, the diet plan adjustment opinion semantic feature embedding subunit 1433 is used to: after matrix multiplication of the diet plan adjustment opinion semantic encoding feature vector and the value embedding matrix, add the obtained diet plan adjustment opinion semantic embedding vector and the value bias vector by position to obtain the diet plan adjustment opinion semantic value vector.
[0057] More specifically, in an embodiment of the present application, the diet plan adjustment opinion-word granularity semantic cross-domain query subunit 1434 is used to: calculate the product between the diet plan adjustment opinion semantic encoding feature vector and the transposed vector of the updated diet plan word granularity semantic row vector to obtain the diet plan adjustment opinion-updated diet plan word granularity association matrix, and then divide the diet plan adjustment opinion-updated diet plan word granularity association matrix by the square root of the length of the updated diet plan word granularity semantic row vector by position to obtain the diet plan adjustment opinion-updated diet plan word granularity modulation matrix; input the diet plan adjustment opinion-updated diet plan word granularity modulation matrix into a softmax function to obtain the diet plan adjustment opinion-updated diet plan word granularity activation matrix; multiply the diet plan adjustment opinion-updated diet plan word granularity activation matrix by the diet plan adjustment opinion semantic value vector to obtain the diet plan adjustment opinion-word granularity semantic cross-domain query attention vector.
[0058] In the embodiment of the present application, specifically, the adjustment opinion-diet plan cross-domain matching unit 143 is used to: use the semantic encoding feature vector of the diet plan adjustment opinion as the query feature vector and the feature matrix composed of the sequence of the diet plan word granularity semantic encoding feature vector as the initial key matrix, input the query feature vector and the initial key matrix into the cross-domain attention gate query encoder based on the key matrix local association enhancement, and process it with the following cross-domain gated query formula to obtain the adjustment opinion-diet plan cross-domain matching feature vector; wherein, the cross-domain gated query formula is:
[0059] ;
[0060] ;
[0061] ;
[0062] ;
[0063] ;
[0064] ;
[0065] in, is the first Initial diet plan word-granular semantic row vector, is the semantic encoding feature vector of the dietary adjustment opinion, , and They are position difference, position dot multiplication and position addition respectively. For cascade processing, is a one-dimensional convolutional coding operation, is the maximum pooling operation, is the first in the set of dietary adjustment opinions-word-granularity semantic association interaction vectors. Diet adjustment opinions - word-level semantic association interaction vector, To extract the maximum value of a vector, and They are The mean and variance of is a hyperparameter, is the first in the set of energy coefficients of the difference in distribution of the dietary adjustment opinions and word-granularity semantic features. Diet adjustment opinions - word-size semantic feature distribution difference energy coefficient, is a predetermined threshold, and To update the diet plan word granularity semantic key matrix Update the semantic row vector of the diet plan word granularity, and are the value embedding matrix and value bias vector respectively, is the semantic value vector of the diet adjustment opinion, for The transposed vector of is the length of each updated diet plan word-granular semantic row vector, yes function, is the first in the sequence of the dietary adjustment opinion-word granularity semantic cross-domain query attention vector Diet adjustment opinions - word-granular semantic cross-domain query attention vector, is the number of vectors in the sequence of the dietary adjustment opinion-word granularity semantic cross-domain query attention vector, It is the cross-domain matching feature vector of the adjustment advice-diet plan.
[0066] In an embodiment of the present application, the personalized diet plan generation unit 144 is used to obtain the personalized diet plan based on the cross-domain matching feature vector of the adjustment opinion-diet plan. Specifically, in an embodiment of the present application, the personalized diet plan generation unit 144 is used to: input the cross-domain matching feature vector of the adjustment opinion-diet plan into a personalized diet plan generator based on the AIGC model to obtain the personalized diet plan. It should be understood by those of ordinary skill in the art that the AIGC model is an artificial intelligence generated content model, and the AIGC model in this application specifically refers to a model based on a generative adversarial network. The generative adversarial network consists of two neural networks: a generator and a discriminator. The generator is responsible for generating new data samples, trying to create samples similar to real data. It receives random noise as input and generates outputs through a series of neural network layers. The discriminator is responsible for determining whether the input sample is real or generated. It receives real samples and generated samples, and outputs a probability value indicating the possibility that the sample is real. The generator and the discriminator compete with each other during the training process. The generator tries to generate more and more real samples, while the discriminator continuously improves the recognition ability. The goal of training is to make the samples generated by the generator real enough so that the discriminator cannot distinguish the difference between them and real samples. By inputting the adjustment opinion-diet plan cross-domain matching feature vector into the AIGC model, it is possible to deeply understand the patient's specific needs and limitations, thereby generating a diet plan that suits the patient's condition. That is, the sequence of the diet plan adjustment opinion semantic encoding feature vector and the diet plan word granularity semantic encoding feature vector is used to query and focus on the matching of the adjustment opinion-diet plan cross-domain matching feature vector, so as to automatically generate a personalized diet plan. In this way, these individual differences can be better identified and responded to, so as to automatically generate personalized diet plans, thereby realizing intelligent diet management.
[0067] In particular, since the sequence of the diet plan adjustment opinion semantic encoding feature vector and the diet plan word granularity semantic encoding feature vector respectively represent the encoded semantic features of the diet plan adjustment opinion and the initial standard diet plan, when they are input into the cross-domain attention gate query encoder based on the key matrix local association enhancement, the semantic feature representation difference will have different cross-domain attention query weights based on the key matrix local association difference, so that the adjustment opinion-diet plan cross-domain matching feature vector will also have a diversified set expression distribution of cross-semantic space aggregation features. Therefore, it is expected to improve the balance between the regression mapping accuracy and completeness when the adjustment opinion-diet plan cross-domain matching feature vector is input into the personalized diet plan generator based on the AIGC model for generative regression, thereby improving the quality of the obtained personalized diet plan.
[0068] In a preferred example, inputting the adjustment opinion-diet plan cross-domain matching feature vector into the personalized diet plan generator based on the AIGC model to obtain the personalized diet plan includes: determining the adjustment opinion-diet plan cross-domain matching maximum eigenvalue and the adjustment opinion-diet plan cross-domain matching minimum eigenvalue of the adjustment opinion-diet plan cross-domain matching feature vector, and calculating the adjustment opinion-diet plan cross-domain matching mean and the adjustment opinion-diet plan cross-domain matching standard deviation of the feature set of the adjustment opinion-diet plan cross-domain matching feature vector; calculating the quotient of the adjustment opinion-diet plan cross-domain matching mean and the adjustment opinion-diet plan cross-domain matching standard deviation to obtain the adjustment opinion-diet plan cross-domain matching statistical normalization value; calculating the inverse of each eigenvalue of the adjustment opinion-diet plan cross-domain matching feature vector, and comparing it with the adjustment opinion-diet plan cross-domain matching maximum eigenvalue and The difference of the minimum eigenvalues of the cross-domain matching of the adjustment opinion and the diet plan is multiplied, and then subtracted from the statistical standardized value of the cross-domain matching of the adjustment opinion and the diet plan to obtain the distribution approximation vector of the cross-domain matching of the adjustment opinion and the diet plan; an exponential function of each eigenvalue of the cross-domain matching distribution approximation vector of the adjustment opinion and the diet plan is calculated with the natural constant e as the base to obtain the distribution class approximation vector of the cross-domain matching of the adjustment opinion and the diet plan; the distribution class approximation vector of the cross-domain matching of the adjustment opinion and the diet plan is added, and the logarithm with base two of the absolute value of each eigenvalue of the added vector is calculated to obtain the optimized cross-domain matching feature vector of the adjustment opinion and the diet plan; the optimized cross-domain matching feature vector of the adjustment opinion and the diet plan is input into the personalized diet plan generator based on the AIGC model to obtain the personalized diet plan.
[0069] The optimization expression of the cross-domain matching feature vector of the adjustment advice-diet plan is as follows:
[0070] ;
[0071] ;
[0072] ;
[0073] ;
[0074] in, The cross-domain matching feature vector of the adjustment opinion-diet plan, and are the cross-domain matching mean of the adjustment advice and the diet plan and the cross-domain matching standard deviation of the adjustment advice and the diet plan, and are the maximum eigenvalue of the cross-domain matching between the adjustment advice and the diet plan and the minimum eigenvalue of the cross-domain matching between the adjustment advice and the diet plan, respectively. Statistically normalize the cross-domain matching of the adjustment advice-dietary regimen, and is the difference between the maximum eigenvalue of the cross-domain matching of the adjustment advice and the diet plan and the minimum eigenvalue of the cross-domain matching of the adjustment advice and the diet plan, is the logarithm to base 2, represents the natural exponential function, It means point multiplication by position. It means to subtract by position point. represents the approximate vector of the cross-domain matching distribution of the adjustment advice and diet plan, To calculate the inverse of each eigenvalue of the adjustment advice-diet plan cross-domain matching eigenvector, Indicates adding by position point. Represents the optimized adjustment advice-diet plan cross-domain matching feature vector.
[0075] Here, by performing random statistical normalization on the diversified feature set of the cross-domain matching feature vector of the adjustment opinion-diet plan, the confidence space constructed based on the overall feature value of the cross-domain matching feature vector of the adjustment opinion-diet plan is approximated by the standardized continuous probability density distribution relative to the response hypothesis test of each feature value of the cross-domain matching feature vector of the adjustment opinion-diet plan, so as to establish the target reachability of the diversified feature distribution of the cross-domain matching feature vector of the adjustment opinion-diet plan to the unified regression target, so as to achieve the balanced executableness between mapping accuracy and mapping completeness in the generative regression process based on the diversified feature distribution of the cross-domain matching feature vector of the adjustment opinion-diet plan, and improve the quality of the personalized diet plan obtained by inputting the cross-domain matching feature vector of the adjustment opinion-diet plan into the personalized diet plan generator based on the AIGC model. In this way, these individual differences can be better identified and dealt with to automatically generate personalized diet plans, thereby realizing intelligent diet management.
[0076] In summary, the Crohn's disease patient diet management system 100 based on the embodiment of the present application is explained, which obtains the condition description input by the patient object, and based on the condition description, extracts the initial standard diet plan from the diet plan library, and obtains the diet plan adjustment opinions input by the doctor, and uses data analysis and processing technology based on deep learning to perform word segmentation and semantic encoding on the initial standard diet plan, and semantic encoding on the diet plan adjustment opinions, so as to automatically generate personalized diet plans according to the cross-domain query matching features between the word granularity semantic features of each initial standard diet plan and the semantic features of the diet plan adjustment opinions. In this way, these individual differences can be better identified and responded to, so as to automatically generate personalized diet plans, thereby realizing intelligent diet management.
[0077] As described above, the Crohn's disease patient diet management system 100 according to the embodiment of the present application can be implemented in various terminal devices, such as a server for Crohn's disease patient diet management. In one example, the Crohn's disease patient diet management system 100 according to the embodiment of the present application can be integrated into the terminal device as a software module and / or a hardware module. For example, the Crohn's disease patient diet management system 100 can be a software module in the operating system of the terminal device, or can be an application developed for the terminal device; of course, the Crohn's disease patient diet management system 100 can also be one of the many hardware modules of the terminal device.
[0078] Alternatively, in another example, the Crohn's disease patient diet management system 100 and the terminal device may also be separate devices, and the Crohn's disease patient diet management system 100 may be connected to the terminal device via a wired and / or wireless network and transmit interactive information in accordance with an agreed data format.
[0079] Figure 6 Flow chart of the method for managing diet for Crohn's disease patients according to an embodiment of the present application. Figure 6As shown, in the diet management method for Crohn's disease patients, it includes: S110, obtaining a description of the condition input by the patient object; S120, extracting an initial standard diet plan from a diet plan library based on the condition description; S130, obtaining the diet plan adjustment opinion input by the doctor; S140, adjusting the initial standard diet plan based on the diet plan adjustment opinion to obtain a personalized diet plan; wherein, in step S140, it includes: performing word segmentation processing on the initial standard diet plan and passing it through a diet plan semantic encoder to obtain a sequence of diet plan word granularity semantic coding feature vectors; performing semantic coding on the diet plan adjustment opinion to obtain a diet plan adjustment opinion semantic coding feature vector; using the diet plan adjustment opinion semantic coding feature vector as a query feature vector and a feature matrix composed of a sequence of diet plan word granularity semantic coding feature vectors as an initial key matrix, inputting the query feature vector and the initial key matrix into a cross-domain attention gate query encoder based on key matrix local association enhancement to obtain an adjustment opinion-diet plan cross-domain matching feature vector; based on the adjustment opinion-diet plan cross-domain matching feature vector, obtaining the personalized diet plan.
[0080] Here, those skilled in the art will appreciate that the specific operations of each step in the above-mentioned Crohn's disease patient diet management method have been referred to above. Figures 1 to 5 The invention has been described in detail in the description of the diet management system for Crohn's disease patients, and therefore, its repeated description will be omitted.
[0081] In summary, the diet management method for Crohn's disease patients based on the embodiment of the present application is explained, which obtains the description of the condition input by the patient object, and based on the description of the condition, extracts the initial standard diet plan from the diet plan library, and obtains the diet plan adjustment opinions input by the doctor, and uses data analysis and processing technology based on deep learning to perform word segmentation and semantic encoding on the initial standard diet plan, and semantic encoding on the diet plan adjustment opinions, so as to automatically generate a personalized diet plan based on the cross-domain query matching features between the word granularity semantic features of each initial standard diet plan and the semantic features of the diet plan adjustment opinions. In this way, these individual differences can be better identified and responded to, so as to automatically generate personalized diet plans, thereby realizing intelligent diet management.
Claims
1. A diet management system for patients with Crohn's disease, It is characterized in that include: A patient object condition description acquisition module is used to acquire the condition description input by the patient object; An initial standard diet plan extraction module, used for extracting an initial standard diet plan from a diet plan library based on the condition description; A diet plan adjustment opinion acquisition module is used to acquire diet plan adjustment opinions input by a doctor; A diet plan adjustment module, used to adjust the initial standard diet plan based on the diet plan adjustment opinion to obtain a personalized diet plan; Wherein, the diet plan adjustment module includes: A diet plan word granularity semantic encoding unit, used for performing word segmentation processing on the initial standard diet plan and then passing it through a diet plan semantic encoder to obtain a sequence of diet plan word granularity semantic encoding feature vectors; A diet plan adjustment opinion semantic coding unit, used for semantically coding the diet plan adjustment opinion to obtain a diet plan adjustment opinion semantic coding feature vector; An adjustment opinion-diet plan cross-domain matching unit, used to use the diet plan adjustment opinion semantic encoding feature vector as a query feature vector and a feature matrix composed of a sequence of diet plan word granularity semantic encoding feature vectors as an initial key matrix, and input the query feature vector and the initial key matrix into a cross-domain attention gate query encoder based on key matrix local association enhancement to obtain an adjustment opinion-diet plan cross-domain matching feature vector; A personalized diet plan generating unit, configured to obtain the personalized diet plan based on the adjustment opinion-diet plan cross-domain matching feature vector; The diet plan word granularity semantic encoding unit is used to: perform word segmentation processing on the initial standard diet plan and then pass it through a diet plan semantic encoder including a word embedding layer to obtain a sequence of diet plan word granularity semantic encoding feature vectors; The adjustment advice-diet plan cross-domain matching unit includes: A diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit, used to calculate the feature distribution difference energy coefficient between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients; A diet plan word granularity semantic row vector updating subunit is used to compare each diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient in the set of the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient with a predetermined threshold value, and in response to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient being less than the predetermined threshold value, using the mean vector between the initial diet plan word granularity semantic row vector corresponding to the diet plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient and the diet plan adjustment opinion semantic encoding feature vector as the updated diet plan word granularity semantic row vector to obtain an updated diet plan word granularity semantic key matrix; A diet plan adjustment opinion semantic feature embedding subunit, used for processing the diet plan adjustment opinion semantic encoding feature vector using a value embedding matrix to obtain a diet plan adjustment opinion semantic value vector; A diet plan adjustment opinion-word granularity semantic cross-domain query subunit is used to input the diet plan adjustment opinion semantic encoding feature vector as a query vector, each updated diet plan word granularity semantic row vector in the updated diet plan word granularity semantic key matrix as a key vector, and the diet plan adjustment opinion semantic value vector into a cross-domain attention gate query module based on a Transformer structure to obtain a sequence of diet plan adjustment opinion-word granularity semantic cross-domain query attention vectors; The adjustment opinion-diet plan cross-domain matching feature generation subunit is used to calculate the positional mean vector of the sequence of the diet plan adjustment opinion-word granularity semantic cross-domain query attention vector to obtain the adjustment opinion-diet plan cross-domain matching feature vector.
2. The Crohn's disease patient diet management system according to claim 1, It is characterized in that The dietary plan adjustment opinion-word granularity semantic feature distribution difference energy coefficient calculation subunit includes: A diet plan adjustment opinion-word granularity semantic association interaction secondary subunit is used to calculate the semantic association interaction vector between the diet plan adjustment opinion semantic encoding feature vector and each initial diet plan word granularity semantic row vector in the initial key matrix to obtain a set of diet plan adjustment opinion-word granularity semantic association interaction vectors; The secondary sub-unit for calculating the energy coefficient of the difference in the interactive feature distribution of dietary plan adjustment opinions and word granularity is used to calculate the energy coefficient of the difference in the feature distribution of each dietary plan adjustment opinion-word granularity semantic association interaction vector in the set of the dietary plan adjustment opinion-word granularity semantic association interaction vectors to obtain the set of the dietary plan adjustment opinion-word granularity semantic feature distribution difference energy coefficients, wherein the energy coefficient of the difference in the feature distribution of each dietary plan adjustment opinion-word granularity semantic association interaction vector is related to the maximum value, mean and variance of each dietary plan adjustment opinion-word granularity semantic association interaction vector.
3. The Crohn's disease patient diet management system according to claim 2, It is characterized in that The dietary plan adjustment opinion-word granularity semantic association interaction secondary sub-unit is used for: Respectively calculating the position difference, position dot product and position addition between the semantic encoding feature vector of the diet plan adjustment opinion and the word granularity semantic row vector of the initial diet plan to obtain the diet plan adjustment opinion-word granularity semantic difference vector, the diet plan adjustment opinion-word granularity semantic dot product vector and the diet plan adjustment opinion-word granularity semantic sum vector; The dietary plan adjustment opinion-word granularity semantic difference vector, the dietary plan adjustment opinion-word granularity semantic dot product vector and the dietary plan adjustment opinion-word granularity semantic sum vector are cascaded and then one-dimensional convolutional coding is performed to obtain a dietary plan adjustment opinion-word granularity semantic multi-dimensional fusion vector; The dietary plan adjustment opinion-word granularity semantic multi-dimensional fusion vector is subjected to a local window-based maximum pooling process to obtain the dietary plan adjustment opinion-word granularity semantic association interaction vector.
4. The Crohn's disease patient diet management system according to claim 3, It is characterized in that The dietary plan adjustment opinion-word granularity interaction feature distribution difference energy coefficient calculation secondary subunit is used for: Extracting the maximum values of the dietary plan adjustment opinions-word granularity semantic association interaction vectors respectively to obtain the dietary plan adjustment opinions-word granularity semantic association interaction maximum value; Respectively calculating the mean and variance of the dietary plan adjustment opinion-word granularity semantic association interaction vector to obtain the dietary plan adjustment opinion-word granularity semantic association interaction mean and the dietary plan adjustment opinion-word granularity semantic association interaction variance; Adding the dietary plan adjustment opinion-word granularity semantic association interaction variance and the hyperparameter to obtain the dietary plan adjustment opinion-word granularity semantic association interaction first difference energy coefficient; Calculate the square of the difference between the maximum value of the diet plan adjustment opinion-word granularity semantic association interaction and the mean value of the diet plan adjustment opinion-word granularity semantic association interaction to obtain a diet plan adjustment opinion-word granularity semantic difference value; Multiplying the dietary regimen adjustment opinion-word granularity semantic association interaction variance by a constant of two to obtain a modulated dietary regimen adjustment opinion-word granularity semantic association interaction variance; Adding the diet plan adjustment opinion-word granularity semantic difference value and the modulated diet plan adjustment opinion-word granularity semantic association interaction variance to the hyperparameter to obtain the diet plan adjustment opinion-word granularity semantic association interaction second difference energy coefficient; The first difference energy coefficient of the dietary plan adjustment opinion-word granularity semantic association interaction is divided by the second difference energy coefficient of the dietary plan adjustment opinion-word granularity semantic association interaction to obtain the difference energy coefficient of the dietary plan adjustment opinion-word granularity semantic feature distribution.
5. The Crohn's disease patient diet management system according to claim 4, It is characterized in that The diet plan adjustment opinion semantic feature embedding subunit is used to: after matrix multiplication of the diet plan adjustment opinion semantic encoding feature vector and the value embedding matrix, add the obtained diet plan adjustment opinion semantic embedding vector and the value bias vector by position to obtain the diet plan adjustment opinion semantic value vector.
6. The Crohn's disease patient diet management system according to claim 5, It is characterized in that The dietary plan adjustment opinion-word granularity semantic cross-domain query subunit is used to: After calculating the product between the semantic encoding feature vector of the diet plan adjustment opinion and the transposed vector of the semantic row vector of the updated diet plan word granularity to obtain a diet plan adjustment opinion-updated diet plan word granularity association matrix, the diet plan adjustment opinion-updated diet plan word granularity association matrix is divided by the square root of the length of the semantic row vector of the updated diet plan word granularity by position to obtain a diet plan adjustment opinion-updated diet plan word granularity modulation matrix; Inputting the diet plan adjustment opinion-updated diet plan word granularity modulation matrix into a softmax function to obtain a diet plan adjustment opinion-updated diet plan word granularity activation matrix; The diet plan adjustment opinion-updated diet plan word granularity activation matrix is multiplied by the diet plan adjustment opinion semantic value vector to obtain the diet plan adjustment opinion-word granularity semantic cross-domain query attention vector.
7. The diet management system for Crohn's disease patients according to claim 6, It is characterized in that The personalized diet plan generating unit is used to: input the adjustment advice-diet plan cross-domain matching feature vector into a personalized diet plan generator based on the AIGC model to obtain the personalized diet plan.
8. A method for managing diet in patients with Crohn's disease, using the Crohn's disease patient diet management system according to claim 1, It is characterized in that include: Get the condition description entered by the patient object; Based on the condition description, extracting an initial standard diet plan from a diet plan library; Get input from your doctor on dietary adjustments; Based on the dietary plan adjustment suggestions, adjusting the initial standard dietary plan to obtain a personalized dietary plan; Wherein, based on the dietary plan adjustment opinions, the initial standard dietary plan is adjusted to obtain a personalized dietary plan, including: After word segmentation processing is performed on the initial standard diet plan, a diet plan semantic encoder is used to obtain a sequence of diet plan word granularity semantic encoding feature vectors; Performing semantic coding on the dietary plan adjustment opinion to obtain a dietary plan adjustment opinion semantic coding feature vector; Taking the semantic encoding feature vector of the dietary plan adjustment opinion as the query feature vector and the feature matrix composed of the sequence of the dietary plan word granularity semantic encoding feature vector as the initial key matrix, the query feature vector and the initial key matrix are input into a cross-domain attention gate query encoder based on the local association enhancement of the key matrix to obtain the adjustment opinion-diet plan cross-domain matching feature vector; Based on the adjustment advice-diet plan cross-domain matching feature vector, the personalized diet plan is obtained.
