Digestion health monitoring system based on artificial intelligence
By building an AI-based digestive health monitoring system, the problem of insufficient multi-source data integration and analysis models has been solved, real-time collection and integration of multi-channel data has been achieved, long-distance dependencies have been captured, and professional and dynamically adaptable digestive health monitoring has been provided, thereby improving the accuracy and efficiency of monitoring.
Patent Information
- Application Number
- CN202510728469.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-12
AI Technical Summary
The existing digestive health monitoring system has insufficient data processing capabilities, difficulty in integrating multi-source data, lack of professionalism and dynamic adaptability in the analysis model, unintuitive results display, insufficient model updates, and is unable to achieve real-time and dynamic digestive health monitoring.
An artificial intelligence-based digestive health monitoring system is constructed by adopting a multi-source heterogeneous digestive health data fusion module, a digestive health knowledge graph construction module, a long-distance dependency capture Transformer-XL encoding module, a knowledge graph and encoded data fusion interaction module, a digestive health status feature extraction module and a prediction and evaluation module, combined with visual output.
It realizes the real-time collection and integration of multi-channel and multi-format digestive health data, captures long-distance dependencies, combines professional knowledge for analysis, provides intuitive monitoring results, and maintains system performance through dynamic updates, thereby improving the accuracy and efficiency of digestive health monitoring.
Smart Images

Figure CN120636798A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digestive health monitoring, and in particular to a digestive health monitoring system based on artificial intelligence. Background Art
[0002] With the accelerating pace of life and changes in eating habits, the incidence of digestive system diseases has been rising year by year, making digestive health monitoring a crucial component of maintaining public health. Traditional digestive health monitoring relies primarily on regular hospital checkups, such as invasive testing methods like gastroscopy and colonoscopy. These procedures not only cause physical discomfort to patients, but also have a low frequency of testing, making it difficult to achieve real-time, dynamic health monitoring. Furthermore, the widespread use of wearable devices and home health monitoring instruments can collect some digestive health data, but this data is often fragmented and lacks systematic integration, making it difficult to effectively support professional health assessments.
[0003] Existing technologies have many limitations in digestive health monitoring. On the one hand, data processing capabilities are insufficient. There are format differences and semantic barriers between multi-source data. Traditional methods find it difficult to efficiently integrate physiological parameters collected by wearable devices, diagnostic data from medical testing instruments, and unstructured data such as patients' diet and living habits, resulting in the inability to fully tap the value of the data. On the other hand, the analysis model lacks professionalism and dynamic adaptability. Common data analysis models are mostly based on general algorithms and cannot effectively capture long-distance dependencies in digestive health data that change over time, such as the changing patterns of gastrointestinal motility frequency in different time periods, making it difficult to accurately predict digestive health status. At the same time, these models are difficult to combine with professional knowledge in the field of digestive medicine, and lack accuracy and pertinence in disease risk assessment and health intervention recommendations.
[0004] Furthermore, existing monitoring systems also suffer from flaws in their result presentation and model update mechanisms. Monitoring results are often presented as simple data lists, lacking an intuitive, scientific visual layout, making it difficult for users to quickly understand their health status. Furthermore, as medical knowledge evolves or new research findings emerge, traditional models cannot be updated and optimized in a timely manner. This results in a gradual decline in the performance of the monitoring system over time, making it impossible to continuously provide users with reliable digestive health monitoring services. Summary of the Invention
[0005] In order to overcome the shortcomings and deficiencies of the existing technology, the present invention provides a digestive health monitoring system based on artificial intelligence.
[0006] The technical solution adopted by the present invention is a digestive health monitoring system based on artificial intelligence, characterized by comprising:
[0007] Multi-source heterogeneous digestive health data fusion acquisition module, which is used to collect digestive health monitoring data from different channels and formats in real time, and preliminarily integrate the collected multi-source data to form an original data set;
[0008] The digestive health knowledge graph construction module, based on the original data set, uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph that includes the entities and relationships of digestive organ structure, digestive physiological processes, disease symptoms, and influencing factors;
[0009] The Transformer-XL encoding module captures long-range dependencies. The original data set is input into this module. The Transformer-XL model's relative position encoding mechanism and segmented recurrence mechanism are used to capture and encode the long-range dependencies in the data, generating an encoded data sequence.
[0010] The knowledge graph and coded data fusion interaction module integrates the digestive health knowledge graph with the coded data sequence. Through the designed interaction mechanism, the structured knowledge in the knowledge graph assists in understanding the coded data sequence, while the information of the coded data sequence updates and improves the knowledge graph.
[0011] The digestive health status feature extraction module performs feature extraction on the fused and interactive data. By designing a multi-layer neural network structure, it extracts feature vectors that can reflect the digestive health status from the data.
[0012] The digestive health status prediction and evaluation module predicts and evaluates digestive health status based on the extracted feature vectors and combined with a pre-trained evaluation model, and outputs evaluation results containing different health indicators;
[0013] The digestive health monitoring result output module visualizes the evaluation results output by the digestive health status prediction and evaluation module, and outputs the processed results to users through multiple output channels.
[0014] Furthermore, the knowledge graph and encoding data fusion interaction module adopts the knowledge graph to enhance the Transformer-XL fusion model, and its formula is:
[0015]
[0016] Among them, H t represents the hidden state at the tth moment after fusion; Represents the state vector of the knowledge graph at the previous moment, which contains the entity and relationship information related to the current data in the digestive health knowledge graph; represents the encoded output of the Transformer-XL model at time t; W his the weight matrix used to perform linear transformation on the input; b h is the bias vector; σ is the activation function, which is used to introduce nonlinearity.
[0017] Furthermore, the digestive health status feature extraction module adopts a multi-level attention feature extraction model based on the output of the Transformer-XL fusion model enhanced by the knowledge graph and combined with the digestive health monitoring parameters. The formula is:
[0018]
[0019] s i =f(H i , M k )
[0020] Among them, A i represents the attention weight of the i-th feature; s i represents the attention score of the i-th feature; H i Enhance the i-th hidden state of the Transformer-XL fusion model output for the knowledge graph; M k is a parameter matrix related to digestive health monitoring, which includes gastric motility frequency and intestinal pH parameters; f is a function for calculating the attention score, which is obtained by calculating the similarity between the hidden state and the parameter matrix; n is the total number of features.
[0021] Furthermore, the long-distance dependency capture Transformer-XL encoding module improves the relative position encoding of the Transformer-XL model and adopts a relative position encoding method based on the digestive health time series characteristics. The encoding formula is: in, Represents the relative position code between the i-th position and the j-th position; t i and t j They represent the time points of the i-th and j-th digestive health monitoring data collection respectively; d represents the current coding dimension; and D represents the total coding dimension.
[0022] Furthermore, when constructing the knowledge graph, the digestive health knowledge graph construction module uses a weight calculation method based on Transformer-XL semantic similarity to calculate the weight of the relationship between digestive health entities. The formula is: ij =Softmax(Cosine(E i , E j )), where w ij represents the weight of the relationship between entity i and entity j; E i and E jare the vector representations of entity i and entity j after being encoded by the Transformer-XL model respectively; Cosine is a function for calculating cosine similarity. The cosine similarity of the encoding vectors of two entities is calculated and processed by the Softmax function to obtain the relationship weight, which is used to reflect the closeness of the relationship between entities.
[0023] Furthermore, the digestive health status prediction and evaluation module adopts the Transformer-XL prediction model based on knowledge graph constraints. The model introduces the structured knowledge of the knowledge graph as a constraint during the training process, and its loss function formula is: L = L XL +λL KG , where L is the total loss function; L XL is the original loss function of the Transformer-XL model, which is used to measure the difference between the model prediction value and the true value; L KG is a constraint loss function based on the knowledge graph, which is used to measure the consistency of the prediction results with the relevant knowledge in the knowledge graph; λ is a hyperparameter that balances the two loss functions. By adjusting the value of λ, the model can make predictions based on the structured knowledge in the knowledge graph while learning the data features.
[0024] Furthermore, the multi-source heterogeneous digestive health data fusion acquisition module adopts an adaptive sampling strategy guided by knowledge graph for different types of digestive health data. The sampling formula is: Among them, s k represents the sampling probability of the kth data; d k and d i represent the kth and ith digestive health data respectively; f KG is an evaluation function based on the knowledge graph, which evaluates the importance of data by analyzing the entities and relationships related to the data in the knowledge graph; m is the total number of data.
[0025] Furthermore, the digestive health monitoring result output module uses a visualization layout optimization model based on Transformer-XL to optimize the visualization layout of the digestive health monitoring results. The optimization formula is: Among them, P represents the optimized visualization layout solution; d lq Represents the distance between the lth and qth visual elements in the current layout; represents the distance between the lth and qth visual elements in the ideal layout; p is the total number of visual elements.
[0026] Furthermore, during system operation, a Transformer-XL dynamic training mechanism based on knowledge graph updates is adopted. When the digestive health knowledge graph is updated, the Transformer-XL model is dynamically trained. The training formula is: Among them, θ t represents the model parameters after the tth training; θ t-1 Represents the model parameters after the last training; α is the learning rate; is the loss function L with respect to the model parameters θ t-1 The gradient of G t Represents the digestive health knowledge graph updated at time t.
[0027] A digestive health monitoring system based on artificial intelligence, the operation of the system includes the following steps:
[0028] S1: Multi-source heterogeneous digestive health data fusion collection: Use the multi-source heterogeneous digestive health data fusion collection module to collect structured and unstructured digestive health data from different channels such as wearable devices and medical testing instruments in real time, and initially integrate them to form a raw data set;
[0029] S2: Digestive health knowledge graph construction: Based on the original data set, the digestive health knowledge graph construction module uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph containing the entities and relationships of digestive organ structure, digestive physiological process, disease symptoms and influencing factors;
[0030] S3: Long-distance dependency capture Transformer-XL encoding: The original data set is input into the long-distance dependency capture Transformer-XL encoding module. The relative position encoding mechanism and segmented recurrence mechanism of the Transformer-XL model are used to effectively capture and encode the long-distance dependencies in the data, generating an encoded data sequence.
[0031] S4: Fusion and interaction between knowledge graph and coded data: The digestive health knowledge graph and the coded data sequence are input into the knowledge graph and coded data fusion and interaction module. Through a specific interaction mechanism, the structured knowledge in the knowledge graph assists in understanding the coded data sequence, while the coded data sequence information updates and improves the knowledge graph.
[0032] S5: Digestive health status feature extraction: The digestive health status feature extraction module is used to extract features from the fused and interactive data. A multi-layer neural network structure is used to extract feature vectors that can reflect the digestive health status from the data.
[0033] S6: Digestive health status prediction and evaluation: Based on the extracted feature vectors, the digestive health status prediction and evaluation module is combined with a pre-trained evaluation model to predict and evaluate digestive health status and output evaluation results containing different health indicators;
[0034] S7: Output of digestive health monitoring results: The evaluation results output by the digestive health status prediction and evaluation module are visualized through the digestive health monitoring result output module, and the processed results are output to the user through multiple output channels.
[0035] Beneficial Effects: This invention proposes an artificial intelligence-based digestive health monitoring system that collects digestive health data from multiple channels and formats in real time, including sources such as wearable devices and medical testing instruments. This system integrates and initially processes the data, providing a solid foundation for subsequent analysis. By constructing a digestive health knowledge graph, the system presents structured information on digestive organ structure, physiological processes, and disease symptoms, providing expert knowledge support for data analysis. The optimized Transformer-XL model effectively captures long-range dependencies in the data, adapting to the time-varying nature of digestive health data and improving data processing capabilities. During data processing and analysis, the system achieves deep interaction between the knowledge graph and encoded data, enabling the knowledge graph to assist in data understanding and the data in turn to improve the knowledge graph. A multi-layer neural network accurately extracts key features of digestive health status. Combined with a pre-trained evaluation model, the knowledge graph constrains the prediction process, ensuring that prediction results are consistent with both data characteristics and expert knowledge, thereby improving prediction accuracy. During the data collection phase, data importance is assessed based on the knowledge graph, and adaptive sampling is performed to improve data collection efficiency. During the output phase, the visualization layout of monitoring results is optimized to facilitate intuitive user access to information. At the same time, the system can dynamically adjust model parameters according to knowledge graph updates to maintain stable model performance, provide users with efficient, accurate, and intelligent digestive health monitoring services, and assist in the early detection and health management of digestive system diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a diagram of the system module composition of the present invention;
[0037] Figure 2 This is a flow chart of the system operation of the present invention. DETAILED DESCRIPTION
[0038] It should be noted that, unless there is a conflict, the embodiments in this application and the features described in the embodiments can be combined with each other. The application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] like Figure 1As shown, a digestive health monitoring system based on artificial intelligence includes:
[0040] A multi-source heterogeneous digestive health data fusion acquisition module, which is used to collect digestive health monitoring data from different channels and formats in real time. The different channels include but are not limited to wearable devices and medical testing instruments. The data in different formats includes structured data and unstructured data. This module performs preliminary integration of the collected multi-source data to form a raw data set;
[0041] Specifically, this module plays a fundamental and critical role in the entire digestive health monitoring system. Its primary task is to collect digestive health-related data from multiple sources, with these data coming in various formats and types. In terms of channels, wearable devices are a key data source. For example, smart bracelets can monitor the user's heart rate, number of steps taken, sleep quality, and other data in real time. While this data isn't directly targeted at the digestive system, it does have an indirect connection to digestive health. For example, chronic sleep deprivation can affect normal gastrointestinal motility and digestive function. Medical testing instruments, such as gastroscopes and colonoscopes, can provide more professional and direct digestive health data, such as the condition of the gastric mucosa and the presence of intestinal polyps.
[0042] In terms of data format, structured data is typically presented in a table format, containing clearly defined fields and values, such as gastric acid secretion and intestinal pH. This data is standardized and accurate, facilitating subsequent analysis and processing. Unstructured data primarily consists of text information, such as doctor's diagnosis reports and patient descriptions of symptoms. While this type of data is more complex, it contains a wealth of information and is crucial for a comprehensive understanding of a patient's digestive health.
[0043] This module initially integrates the collected, heterogeneous data from multiple sources to form a raw data set. This process is like building the foundation of a building, providing rich and comprehensive data support for subsequent data analysis and processing. Only by ensuring the integrity and diversity of the data can the entire monitoring system more accurately reflect the user's digestive health.
[0044] The digestive health knowledge graph construction module, based on the original data set, uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph that includes the entities and relationships of digestive organ structure, digestive physiological processes, disease symptoms, and influencing factors, providing structured knowledge support for subsequent analysis;
[0045] Specifically, the digestive health knowledge graph construction module builds a structured knowledge system based on the raw data set using advanced knowledge extraction and knowledge fusion technologies. Knowledge extraction is the process of extracting various entities and relationships from raw data. In the field of digestive health, entities include digestive organs such as the stomach, small intestine, and large intestine; physiological processes such as food digestion and nutrient absorption; disease symptoms such as stomach pain, diarrhea, and constipation; and related influencing factors such as dietary habits and lifestyle.
[0046] Knowledge fusion integrates the extracted entities and relationships, identifying the logical connections between them. For example, poor dietary habits, such as chronic overeating and excessive drinking, can cause stomach pain, which can be a symptom of gastritis. Through knowledge fusion, this scattered information is organized into an organic whole, forming a digestive health knowledge graph.
[0047] This knowledge graph is like a comprehensive encyclopedia on digestive health, providing professional knowledge support for subsequent data analysis. It enables the system to interpret and analyze data from a medical perspective, improving the accuracy and reliability of the monitoring system. For example, if the system detects that a user is experiencing stomach pain, the knowledge graph can help the system quickly determine the possible cause and provide appropriate diagnostic recommendations.
[0048] The Transformer-XL encoding module captures long-range dependencies. The original data set is input into this module. The Transformer-XL model's relative position encoding mechanism and segmented recurrence mechanism are used to effectively capture and encode the long-range dependencies in the data, generating an encoded data sequence.
[0049] Specifically, in digestive health monitoring, many data points have long-range dependencies. For example, a person's dietary habits over a period of time, such as a long-term high-fat, high-salt diet, may not immediately have a noticeable impact on the digestive system, but months or even years later, it may lead to conditions such as gastric ulcers and high blood pressure. Traditional data analysis models struggle to capture these long-term data dependencies.
[0050] The Transformer-XL encoding module, which captures long-range dependencies, leverages the unique strengths of the Transformer-XL model to encode the raw data set. The model features a relative position encoding mechanism and a piecewise recurrence mechanism. The relative position encoding mechanism enables the model to better understand the relative position of data in a time series, thereby more accurately capturing dependencies between data. The piecewise recurrence mechanism allows the model to leverage previous processing results when processing long sequences of data, avoiding information loss.
[0051] Through this module's processing, the raw data set is encoded into a data sequence that reflects long-range dependencies. This encoding process acts like a "smart coat" for the data, enabling subsequent analysis modules to more deeply explore the potential information in the data, thereby more accurately predicting and assessing the user's digestive health.
[0052] The knowledge graph and encoded data fusion interaction module integrates the digestive health knowledge graph with the encoded data sequence. Through the designed interaction mechanism, the structured knowledge in the knowledge graph can assist in understanding the encoded data sequence, while the information in the encoded data sequence can also update and improve the knowledge graph.
[0053] Specifically, the core task of the knowledge graph and encoded data fusion and interaction module is to deeply integrate and interact with the digestive health knowledge graph and the encoded data sequence. The knowledge graph contains a wealth of professional medical knowledge, while the encoded data sequence contains the actual characteristics of collected digestive health data. The fusion of the two can achieve complementary advantages and enhance the system's ability to analyze digestive health conditions.
[0054] During the fusion process, when unusual data features appear in the encoded data sequence, the knowledge graph can provide relevant medical explanations. For example, if the encoded data indicates an abnormality in a user's intestinal flora, the knowledge graph can indicate which diseases or health issues, such as diarrhea or constipation, this abnormality may be associated with. Conversely, the actual data in the encoded data sequence can also update and improve the knowledge graph. For example, by analyzing large amounts of user data, new associations between symptoms and diseases may be discovered, or existing relationships in the knowledge graph may be revised.
[0055] This fusion and interactive mechanism enables the system to combine professional knowledge and actual data to analyze and judge digestive health from multiple perspectives. It not only improves the accuracy and reliability of the system, but also enables the system to continuously learn and evolve, adapting to new situations and data.
[0056] The digestive health status feature extraction module performs feature extraction on the fused and interactive data. By designing a multi-layer neural network structure, it extracts feature vectors that can reflect the digestive health status from the data.
[0057] Specifically, the digestive health feature extraction module conducts in-depth analysis of the fused and interactive data to extract key feature vectors that reflect digestive health. This module utilizes a multi-layer neural network structure, which has powerful feature learning capabilities. The design of the multi-layer neural network is optimized based on the characteristics of digestive health data and analysis requirements.
[0058] For different types of data, such as physiological parameter data and text description data, multi-layer neural networks use different processing layers and activation functions. For example, for physiological parameter data, linear layers and ReLU activation functions are used to extract key features from the data. For text description data, convolutional layers and pooling layers are used to convert text information into numerical features.
[0059] Through layer-by-layer processing within a multi-layer neural network, the system can extract the most representative and discriminative features from complex, fused data. These key feature vectors act like a "fingerprint" of digestive health, accurately reflecting current well-being. For example, by analyzing these feature vectors, the system can determine whether a user's gastrointestinal function is normal and whether they have potential disease risks.
[0060] The digestive health status prediction and evaluation module predicts and evaluates digestive health status based on the extracted feature vectors and combined with a pre-trained evaluation model, and outputs evaluation results containing different health indicators;
[0061] Specifically, the digestive health status prediction and assessment module uses extracted key feature vectors and a pre-trained assessment model to predict and assess digestive health status. The assessment model is trained on a large amount of historical digestive health data and learns the corresponding relationship between different feature vectors and digestive health status.
[0062] During the prediction and evaluation process, when a specific set of key feature vectors is input, the evaluation model uses the knowledge gained from training to determine whether the current digestive health status is healthy, sub-healthy, or at risk for a disease. The evaluation results include various health indicators, such as gastrointestinal function score and disease risk probability. For example, a low gastrointestinal function score indicates that the user may have certain gastrointestinal problems; if the risk probability of a certain disease is high, the user needs to take appropriate preventive measures.
[0063] These assessment results can comprehensively and objectively reflect the current digestive health status, providing users with a clear health reference. At the same time, the system can also provide users with personalized health recommendations based on the assessment results, such as dietary adjustments and lifestyle improvements, to help users better manage their digestive health.
[0064] The digestive health monitoring result output module visualizes the evaluation results output by the digestive health status prediction and evaluation module, and outputs the processed results to users through multiple output channels.
[0065] Specifically, the digestive health monitoring results output module's primary function is to visualize the assessment results from the prediction and assessment module and present them to users through various channels. This visualization utilizes charts, graphs, and text to present complex assessment results in an intuitive and understandable manner.
[0066] For example, bar charts display scores for different gastrointestinal function indicators, allowing users to intuitively see their performance in various areas. Line charts display changing trends in disease risk probabilities, allowing users to understand whether their health is improving or deteriorating. Textual descriptions provide detailed explanations of current health conditions and potential problems, along with corresponding recommendations and precautions.
[0067] Output channels include mobile apps and web pages, allowing users to access their digestive health monitoring results anytime, anywhere. The system also includes a reminder function that sends prompt alerts when a user's health status shows abnormalities, ensuring they can take timely action to protect their digestive health.
[0068] The output end of the multi-source heterogeneous digestive health data fusion acquisition module is connected to the input end of the digestive health knowledge graph construction module and the long-distance dependency capture Transformer-XL encoding module, the output end of the digestive health knowledge graph construction module and the long-distance dependency capture Transformer-XL encoding module is connected to the input end of the knowledge graph and encoded data fusion interaction module, the output end of the knowledge graph and encoded data fusion interaction module is connected to the input end of the digestive health status feature extraction module, the output end of the digestive health status feature extraction module is connected to the input end of the digestive health status prediction and evaluation module, and the output end of the digestive health status prediction and evaluation module is connected to the input end of the digestive health monitoring result output module.
[0069] Preferably, in the knowledge graph and encoding data fusion interaction module, a knowledge graph-enhanced Transformer-XL fusion model is adopted, and its formula is:
[0070]
[0071] Among them, H t represents the hidden state at the tth moment after fusion; Represents the state vector of the knowledge graph at the previous moment, which contains the entity and relationship information related to the current data in the digestive health knowledge graph; represents the encoded output of the Transformer-XL model at time t; W h is the weight matrix used to perform linear transformation on the input; b his the bias vector; σ is the activation function, which is used to introduce nonlinearity.
[0072] Specifically, in the knowledge graph and encoded data fusion interaction module, the knowledge graph is used to enhance the Transformer-XL fusion model. The core of this model is to combine the structured knowledge in the knowledge graph with the data output by the Transformer-XL encoder. The knowledge graph contains professional knowledge such as the functions of digestive organs and the association of disease symptoms, while the data output by the Transformer-XL encoder reflects the characteristics of the actual digestive health data collected. Through specific linear transformation and activation function processing, the information of the two is fused. For example, when the encoded data shows that a user has abdominal pain symptoms, the knowledge graph can provide information on various diseases that may be associated with abdominal pain, such as gastritis and enteritis. After the model is fused, the causes behind the symptoms can be analyzed more accurately, improving the accuracy of the judgment of digestive health status. The significance of this model is that it enables the system to combine professional knowledge and actual data to make an analysis that is more in line with medical logic.
[0073] Preferably, the digestive health status feature extraction module adopts a multi-level attention feature extraction model, which is based on the output of the knowledge graph-enhanced Transformer-XL fusion model and combined with digestive health monitoring parameters. Its formula is:
[0074]
[0075] s i =f(H i , M k )
[0076] Among them, A i represents the attention weight of the i-th feature; s i represents the attention score of the i-th feature; H i Enhance the i-th hidden state of the Transformer-XL fusion model output for the knowledge graph; M k is a parameter matrix related to digestive health monitoring, which contains key parameters such as gastric motility frequency and intestinal pH value; f is a function for calculating the attention score, which is obtained by calculating the similarity between the hidden state and the parameter matrix; n is the total number of features.
[0077] Specifically, the digestive health status feature extraction module adopts a multi-level attention feature extraction model. The model works based on the output of the knowledge graph-enhanced Transformer-XL fusion model and in combination with digestive health monitoring parameters. When processing data, it assigns different attention weights to different features based on key parameters of digestive health, such as gastric motility frequency, intestinal pH, etc. For example, for a user with long-term abnormal gastric motility frequency, the model will pay more attention to features related to gastric motility, thereby more accurately extracting key features that reflect the user's digestive health status. In this way, important features can be highlighted, irrelevant information can be filtered out, the effectiveness and accuracy of feature extraction can be improved, and a more valuable basis for subsequent health status assessment can be provided.
[0078] Preferably, in the Transformer-XL encoding module for capturing long-range dependencies, the relative position encoding of the Transformer-XL model is improved, and a relative position encoding method based on the time series characteristics of digestive health is adopted, and the encoding formula is: in, Represents the relative position code between the i-th position and the j-th position; t i and t j where represents the time points of the i-th and j-th digestive health monitoring data collection, d represents the current encoding dimension, and D represents the total encoding dimension. This encoding method enables the model to better capture the long-range dependencies of digestive health data over time.
[0079] Specifically, the long-distance dependency capture Transformer-XL encoding module improves the relative position encoding of the model and adopts a relative position encoding method based on the time series characteristics of digestive health. Digestive health data has the characteristic of changing over time. For example, long-term changes in eating habits will gradually affect digestive function. Traditional relative position encoding methods are difficult to effectively capture such long-distance dependencies. The improved encoding method encodes according to the time point when the digestive health data is collected. For example, for a user who has an irregular diet for a long time, this encoding method can better reflect the correlation between data at different time points, allowing the model to more accurately capture this long-term impact and improve the model's ability to handle long-distance dependencies of digestive health data.
[0080] Preferably, in the digestive health knowledge graph construction module, when constructing the knowledge graph, the weight calculation method based on Transformer-XL semantic similarity is used to calculate the weight of the relationship between digestive health entities, and the formula is: ij =Softmax(Cosine(E i , E j )), where w ijrepresents the weight of the relationship between entity i and entity j; E i and E j are the vector representations of entity i and entity j after being encoded by the Transformer-XL model respectively; Cosine is a function for calculating cosine similarity. The cosine similarity of the encoding vectors of two entities is calculated and processed by the Softmax function to obtain the relationship weight to reflect the closeness of the relationship between the entities.
[0081] Specifically, when constructing the knowledge graph, the digestive health knowledge graph construction module adopts a weight calculation method based on Transformer-XL semantic similarity to calculate the weight of the relationship between digestive health entities. The weight of the relationship between entities reflects the closeness of the connection between them. The entities are encoded into vectors through the Transformer-XL model, and then the cosine similarity between the vectors is calculated, and the relationship weight is obtained through the Softmax function. For example, in the knowledge graph, the two entities "gastric ulcer" and "stomach pain" have a higher relationship weight calculated by this method because they are closely related semantically. This weight calculation method can more accurately reflect the relationship between entities, make the knowledge graph more in line with the actual medical knowledge structure, and provide more reliable knowledge support for subsequent data analysis.
[0082] Preferably, the digestive health status prediction and evaluation module adopts the Transformer-XL prediction model based on knowledge graph constraints. The model introduces the structured knowledge of the knowledge graph as a constraint condition during the training process, and its loss function formula is: L = L XL +λL KG , where L is the total loss function; L XL is the original loss function of the Transformer-XL model, which is used to measure the difference between the model prediction value and the true value; L KG is a constraint loss function based on the knowledge graph, which is used to measure the consistency of the prediction results with the relevant knowledge in the knowledge graph; λ is a hyperparameter that balances the two loss functions. By adjusting the value of λ, the model can make predictions based on the structured knowledge in the knowledge graph while learning the data features.
[0083] Specifically, the digestive health status prediction and assessment module uses the Transformer-XL prediction model based on knowledge graph constraints. During the training process, the model introduces the structured knowledge of the knowledge graph as a constraint. The knowledge graph contains a large amount of medical expertise, such as diagnostic criteria for diseases, the relationship between symptoms and diseases, etc. While learning data features, the model must follow the knowledge in the knowledge graph to make predictions. For example, when predicting the health status of a user with diarrhea symptoms, the model will combine the range of diseases that diarrhea may be associated with in the knowledge graph to make predictions, avoiding prediction results that are inconsistent with medical logic. By introducing constraints, the accuracy and reliability of the prediction model can be improved, making the prediction results more consistent with medical reality.
[0084] Preferably, in the multi-source heterogeneous digestive health data fusion acquisition module, an adaptive sampling strategy based on knowledge graph guidance is adopted for different types of digestive health data, and the sampling formula is: Among them, s k represents the sampling probability of the kth data; d k and d i represent the kth and ith digestive health data respectively; f KG is a knowledge graph-based evaluation function that evaluates the importance of data by analyzing the entities and relationships related to the data in the knowledge graph. m is the total number of data. This sampling strategy allows for adaptive sampling based on the importance of data in the knowledge graph, improving the effectiveness of data collection.
[0085] Specifically, the multi-source heterogeneous digestive health data fusion and acquisition module adopts an adaptive sampling strategy guided by the knowledge graph for different types of digestive health data. The knowledge graph contains information related to various data and digestive health. By analyzing the entities and relationships related to the data in the knowledge graph, the importance of the data is evaluated. For example, for some data closely related to common digestive diseases, such as Helicobacter pylori test results, the sampling probability will be relatively high. For some data with weaker correlation, the sampling probability will be lower. This sampling strategy can perform adaptive sampling based on the importance of the data, improve the effectiveness of data collection, avoid collecting too much irrelevant data, and ensure that important data is not missed.
[0086] Preferably, in the digestive health monitoring result output module, a visualization layout optimization model based on Transformer-XL is used to optimize the visualization layout of the digestive health monitoring results, and the optimization formula is: Among them, P represents the optimized visualization layout solution; d lq Represents the distance between the lth and qth visual elements in the current layout; The distance between the lth and qth visual elements in the ideal layout is represented by p, which is the total number of visual elements. This model uses the Transformer-XL model to model and optimize the relationships between visual elements, resulting in a more reasonable visual layout.
[0087] Specifically, the digestive health monitoring result output module uses a visualization layout optimization model based on Transformer-XL to optimize the visualization layout of the digestive health monitoring results. The rationality of the visualization layout directly affects the user's understanding of the monitoring results. The model uses Transformer-XL to model and optimize the relationship between visualization elements. For example, when displaying multiple digestive health indicators, the model will reasonably arrange their position and size in the visualization interface based on the degree of correlation and importance between the indicators. By optimizing the layout, users can understand the monitoring results more intuitively and quickly, improve the efficiency of information communication, and provide users with a better user experience.
[0088] Preferably, during the operation of the system, a Transformer-XL dynamic training mechanism based on knowledge graph updates is adopted. When the digestive health knowledge graph is updated, the Transformer-XL model is dynamically trained. The training formula is: Among them, θ t represents the model parameters after the tth training; θ t-1 Represents the model parameters after the last training; α is the learning rate; is the loss function L with respect to the model parameters θ t-1 The gradient of G t represents the updated digestive health knowledge graph at time t. This mechanism enables the Transformer-XL model to adjust model parameters in a timely manner based on knowledge graph updates, maintaining model accuracy.
[0089] Specifically, during system operation, the Transformer-XL dynamic training mechanism, based on knowledge graph updates, is employed. Medical knowledge is constantly evolving and updating, and the digestive health knowledge graph is also updated accordingly. When the knowledge graph is updated, this mechanism dynamically trains the Transformer-XL model. For example, when a new digestive disease is discovered or the diagnostic criteria for a disease change, the knowledge graph is updated accordingly. At this point, the model adjusts its parameters based on the new knowledge graph and relearns the relationship between data features and health status. This dynamic training mechanism enables the model to adapt to knowledge updates in a timely manner, maintaining its accuracy and effectiveness, and ensuring that the system can always provide users with the latest and most accurate digestive health monitoring services.
[0090] like Figure 2 As shown, a digestive health monitoring system based on artificial intelligence includes the following steps:
[0091] S1: Multi-source heterogeneous digestive health data fusion and collection step: using the multi-source heterogeneous digestive health data fusion and collection module to collect structured and unstructured digestive health data from different channels such as wearable devices and medical testing instruments in real time, and preliminarily integrate them to form a raw data set;
[0092] S2: Digestive health knowledge graph construction step: Based on the original data set, the digestive health knowledge graph construction module uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph containing the entities and relationships of digestive organ structure, digestive physiological process, disease symptoms and influencing factors;
[0093] S3: Long-distance dependency capture Transformer-XL encoding step: The original data set is input into the long-distance dependency capture Transformer-XL encoding module. The relative position encoding mechanism and segmented recurrence mechanism of the Transformer-XL model are used to effectively capture and encode the long-distance dependencies in the data, generating an encoded data sequence.
[0094] S4: The knowledge graph and coded data fusion interaction step: the digestive health knowledge graph and the coded data sequence are input into the knowledge graph and coded data fusion interaction module. Through a specific interaction mechanism, the structured knowledge in the knowledge graph assists in understanding the coded data sequence. At the same time, the coded data sequence information updates and improves the knowledge graph.
[0095] S5: digestive health status feature extraction step, using the digestive health status feature extraction module to extract features from the fused and interactive data, and extracting feature vectors that can reflect the digestive health status from the data through a multi-layer neural network structure;
[0096] S6: Digestive health status prediction and evaluation step: Based on the extracted feature vectors, the digestive health status prediction and evaluation module is combined with a pre-trained evaluation model to predict and evaluate the digestive health status and output an evaluation result containing different health indicators;
[0097] S7: digestive health monitoring result output step, the evaluation results output by the digestive health status prediction and evaluation module are visualized through the digestive health monitoring result output module, and the processed results are output to the user through multiple output channels.
[0098] This AI-based digestive health monitoring system demonstrates significant advantages in many areas. Traditional digestive health monitoring relies on invasive hospital examinations, which are infrequent and cause discomfort to patients. Furthermore, it is difficult to integrate multi-source data. This system utilizes a multi-source heterogeneous digestive health data fusion acquisition module to achieve real-time collection and preliminary integration of multi-channel data from wearable devices, medical testing instruments, and other sources, covering both structured and unstructured data. For example, sleep data from smart bracelets and gastroscopy test reports can be incorporated, breaking down data barriers and resolving the issues of data fragmentation and difficulty in integration. This allows users to achieve real-time dynamic monitoring of digestive health without frequent invasive examinations.
[0099] Existing technologies have deficiencies in data processing and analysis models, are unable to effectively capture long-distance dependencies of digestive health data, and lack professional knowledge support. This system utilizes the long-distance dependency capture Transformer-XL encoding module, and with the improved relative position encoding mechanism and segmented loop mechanism, can accurately capture long-distance dependencies between data. For example, the impact of long-term eating habits on the digestive system can be effectively identified through this module. At the same time, the professional knowledge system constructed by the digestive health knowledge graph construction module is deeply integrated with the encoded data through the knowledge graph and encoded data fusion interaction module, so that the system can combine actual data features and follow medical expertise during analysis, solving the problem of lack of professionalism and dynamic adaptability of traditional models, and greatly improving the accuracy and reliability of data analysis.
[0100] In addition, traditional monitoring systems have defects in result display and model update mechanisms. The digestive health monitoring result output module of this system adopts a visual layout optimization model based on Transformer-XL, which presents complex evaluation results in intuitive and easy-to-understand charts, graphs and text, allowing users to quickly understand their own health status. In terms of model updates, the Transformer-XL dynamic training mechanism based on knowledge graph updates can dynamically train and adjust the model in a timely manner when medical knowledge is updated or the knowledge graph changes, ensuring that the system performance is always stable. In contrast, the problem of traditional systems being unable to update models in a timely manner, resulting in a decrease in monitoring reliability, has been solved, providing users with continuous and accurate digestive health monitoring services.
[0101] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "disposed," "installed," "connected," "connected," and "fixed" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0102] While embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various equivalent changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A digestive health monitoring system based on artificial intelligence, characterized in that: include: Multi-source heterogeneous digestive health data fusion acquisition module, which is used to collect digestive health monitoring data from different channels and formats in real time, and preliminarily integrate the collected multi-source data to form an original data set; The digestive health knowledge graph construction module, based on the original data set, uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph that includes the entities and relationships of digestive organ structure, digestive physiological processes, disease symptoms, and influencing factors; The Transformer-XL encoding module captures long-range dependencies. The original data set is input into this module. The Transformer-XL model's relative position encoding mechanism and segmented recurrence mechanism are used to capture and encode the long-range dependencies in the data, generating an encoded data sequence. The knowledge graph and coded data fusion interaction module integrates the digestive health knowledge graph with the coded data sequence. Through the designed interaction mechanism, the structured knowledge in the knowledge graph assists in understanding the coded data sequence, while the information of the coded data sequence updates and improves the knowledge graph. The digestive health status feature extraction module performs feature extraction on the fused and interactive data. By designing a multi-layer neural network structure, it extracts feature vectors that can reflect the digestive health status from the data. The digestive health status prediction and evaluation module predicts and evaluates digestive health status based on the extracted feature vectors and combined with a pre-trained evaluation model, and outputs evaluation results containing different health indicators; The digestive health monitoring result output module visualizes the evaluation results output by the digestive health status prediction and evaluation module, and outputs the processed results to users through multiple output channels.
2. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The knowledge graph and encoding data fusion interaction module uses the knowledge graph to enhance the Transformer-XL fusion model, and the formula is: Among them, H t represents the hidden state at the tth moment after fusion; Represents the state vector of the knowledge graph at the previous moment, which contains the entity and relationship information related to the current data in the digestive health knowledge graph; represents the encoded output of the Transformer-XL model at time t; W h is the weight matrix used to perform linear transformation on the input; b h is the bias vector; σ is the activation function, which is used to introduce nonlinearity.
3. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The digestive health status feature extraction module adopts a multi-level attention feature extraction model. This model is based on the output of the knowledge graph-enhanced Transformer-XL fusion model and combines digestive health monitoring parameters. The formula is: s i =f(H i ,M k ) Among them, A i represents the attention weight of the i-th feature; s i represents the attention score of the i-th feature; H i Enhance the i-th hidden state of the Transformer-XL fusion model output for the knowledge graph; M k is a parameter matrix related to digestive health monitoring, which includes gastric motility frequency and intestinal pH parameters; f is a function for calculating the attention score, which is obtained by calculating the similarity between the hidden state and the parameter matrix; n is the total number of features.
4. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The long-distance dependency capture Transformer-XL encoding module improves the relative position encoding of the Transformer-XL model and adopts a relative position encoding method based on the digestive health time series characteristics. The encoding formula is: in, Represents the relative position code between the i-th position and the j-th position; t i and t j They represent the time points of the i-th and j-th digestive health monitoring data collection respectively; d represents the current coding dimension; and D represents the total coding dimension.
5. The digestive health monitoring system based on artificial intelligence according to claim 1, characterized in that: The digestive health knowledge graph construction module, when constructing the knowledge graph, uses the Transformer-XL semantic similarity-based weight calculation method to calculate the weight of the relationship between digestive health entities. The formula is: ij =Softmax(Cosine(E i , E j )), where w ij represents the weight of the relationship between entity i and entity j; E i and E j are the vector representations of entity i and entity j after being encoded by the Transformer-XL model respectively; Cosine is a function for calculating cosine similarity. The cosine similarity of the encoding vectors of two entities is calculated and processed by the Softmax function to obtain the relationship weight, which is used to reflect the closeness of the relationship between entities.
6. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The digestive health status prediction and evaluation module adopts the Transformer-XL prediction model based on knowledge graph constraints. The model introduces the structured knowledge of the knowledge graph as a constraint during the training process. The loss function formula is: L = L XL +λL KG , where L is the total loss function; L XL is the original loss function of the Transformer-XL model, which is used to measure the difference between the model prediction value and the true value; L KG is a constraint loss function based on the knowledge graph, which is used to measure the consistency of the prediction results with the relevant knowledge in the knowledge graph; λ is a hyperparameter that balances the two loss functions. By adjusting the value of λ, the model can make predictions based on the structured knowledge in the knowledge graph while learning the data features.
7. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The multi-source heterogeneous digestive health data fusion acquisition module adopts an adaptive sampling strategy guided by knowledge graph for different types of digestive health data. The sampling formula is: Among them, s k represents the sampling probability of the kth data; d k and d i represent the kth and ith digestive health data respectively; f KG is an evaluation function based on the knowledge graph, which evaluates the importance of data by analyzing the entities and relationships related to the data in the knowledge graph; m is the total number of data.
8. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: The digestive health monitoring result output module uses a visualization layout optimization model based on Transformer-XL to optimize the visualization layout of the digestive health monitoring results. The optimization formula is: Among them, P represents the optimized visualization layout solution; d lq Represents the distance between the lth and qth visual elements in the current layout; represents the distance between the lth and qth visual elements in the ideal layout; p is the total number of visual elements.
9. The artificial intelligence-based digestive health monitoring system according to claim 1, characterized in that: During system operation, the Transformer-XL dynamic training mechanism based on knowledge graph updates is adopted. When the digestive health knowledge graph is updated, the Transformer-XL model is dynamically trained. The training formula is: Among them, θ t represents the model parameters after the tth training; θ t-1 Represents the model parameters after the last training; α is the learning rate; is the loss function L with respect to the model parameters θ t-1 The gradient of G t Represents the digestive health knowledge graph updated at time t.
10. The artificial intelligence-based digestive health monitoring system according to any one of claims 1 to 9, characterized in that: The system operation includes the following steps: S1: Multi-source heterogeneous digestive health data fusion collection: Use the multi-source heterogeneous digestive health data fusion collection module to collect structured and unstructured digestive health data from different channels such as wearable devices and medical testing instruments in real time, and initially integrate them to form a raw data set; S2: Digestive health knowledge graph construction: Based on the original data set, the digestive health knowledge graph construction module uses knowledge extraction and knowledge fusion methods to construct a digestive health knowledge graph containing the entities and relationships of digestive organ structure, digestive physiological process, disease symptoms and influencing factors; S3: Long-distance dependency capture Transformer-XL encoding: The original data set is input into the long-distance dependency capture Transformer-XL encoding module. The relative position encoding mechanism and segmented recurrence mechanism of the Transformer-XL model are used to effectively capture and encode the long-distance dependencies in the data, generating an encoded data sequence. S4: Fusion and interaction between knowledge graph and coded data: The digestive health knowledge graph and the coded data sequence are input into the knowledge graph and coded data fusion and interaction module. Through a specific interaction mechanism, the structured knowledge in the knowledge graph assists in understanding the coded data sequence, while the coded data sequence information updates and improves the knowledge graph. S5: Digestive health status feature extraction: The digestive health status feature extraction module is used to extract features from the fused and interactive data. A multi-layer neural network structure is used to extract feature vectors that can reflect the digestive health status from the data. S6: Digestive health status prediction and evaluation: Based on the extracted feature vectors, the digestive health status prediction and evaluation module is combined with a pre-trained evaluation model to predict and evaluate digestive health status and output evaluation results containing different health indicators; S7: Output of digestive health monitoring results: The evaluation results output by the digestive health status prediction and evaluation module are visualized through the digestive health monitoring result output module, and the processed results are output to the user through multiple output channels.