Intelligent closestool with human health monitoring analysis and early warning functions
By integrating multimodal sensing modules and large language models in smart toilets, the in-depth analysis of multi-dimensional physiological data is solved, and the problem of single data collection and analysis methods for existing smart toilets in health monitoring is provided, and personalized health analysis and early warning functions are provided.
Patent Information
- Application Number
- CN202510566296.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-06-03
AI Technical Summary
In terms of health monitoring, existing smart toilets have problems such as single data collection dimensions, single analysis methods, insufficient health assessment dimensions and lack of personalized reports, which are difficult to fully reflect the complex physiological state and multi-dimensional health problems of the human body.
The multi-modal sensing module is used to collect multi-dimensional physiological data in real time, and combine large language models to conduct in-depth integration and analysis of multi-modal timing data to generate personalized health images, identify potential pathological phenomena and trigger disease warnings, and output personalized health analysis reports and intervention suggestions.
It has achieved a comprehensive reflection of the complex physiological state of the human body, improved the accuracy and diversity of data, better responded to the complex scenarios of individual differences and coexisting multiple diseases, and provided personalized health analysis and evaluation reports.
Smart Images

Figure CN120078385A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent toilets, and specifically, to an intelligent toilet with functions of human health monitoring, analysis and early warning. Background Art
[0002] With the development of technology, intelligent toilets have gradually integrated into people's lives, and their health monitoring, analysis and early warning functions have become an important development direction; the existing intelligent toilets mainly use three core technologies of multi-functional sensing and identity recognition, non-invasive monitoring of vital signs and metabolites, and intelligent analysis to realize functions such as excrement component analysis, vital sign monitoring, and disease risk early warning.
[0003] The patent with publication number CN118187227A discloses an intelligent toilet seat for health monitoring, including a toilet cover board, a toilet seat ring and a health monitoring system; the health monitoring system includes an image detection module, a spectral detection module, a wireless information transmission module, a display module, a cloud database and an application program, and also includes a weight detection module, an odor detection module, a time detection module and a user login module; the image detection module and the spectral detection module are used to obtain color and shape data; the weight detection module, the odor detection module and the time detection module are used to obtain component, odor and time data; the wireless information transmission module is used to transmit the data to the cloud database and then return the analysis result and health advice to the display module; the application program is used to add, view and modify defecation information and defecation trait record analysis, comprehensive analysis of health trends and health assessment intervention.
[0004] Although this invention improves the personalization, practicability and convenience of defecation health monitoring; there are still some problems. First, it focuses on the monitoring of a single biological sample, evaluates the health status only through limited parameters, lacks the comprehensive collection of multi-source physiological data, and it is difficult to fully reflect the complex physiological state of the human body. The system relies on rule matching or simple sensing technology, and fails to make full use of multi-modal sensing fusion to improve data accuracy and diversity, which limits the comprehensiveness of health assessment; second, the analysis method is single, using simple rule matching, lacking in-depth mining and correlation analysis of multi-source data, and it is difficult to cope with complex scenarios of individual differences and coexistence of multiple diseases; third, the health assessment dimension is insufficient, lacking comprehensiveness in disease early warning and health trend analysis, and it is difficult to cover multi-dimensional health problems such as cardiovascular and metabolic syndrome; finally, only a formatted health analysis and assessment report can be obtained, and it is difficult to obtain a personalized health analysis and assessment report. Summary of the Invention
[0005] The purpose of the present invention is to provide an intelligent toilet with functions of human health monitoring, analysis and early warning, so as to solve the problems raised in the above background art.
[0006] To solve the above technical problems, the object of the present invention is to provide an intelligent toilet with functions of human health monitoring, analysis and early warning, including:
[0007] Identity recognition module: used to perform multi-modal identity recognition on users to determine user identities;
[0008] Multi-source sensing module: used to collect user physiological parameters and environmental parameters in real time;
[0009] Internet of Things module: used to store and encrypt and transmit the user physiological data, environmental data and behavior data collected by the multi-source sensing module to the cloud database, and support users to input real-time health label data, device collaboration and remote service interaction;
[0010] Intelligent analysis module: based on a large language model, deeply integrate and analyze multi-modal time series data in the cloud database, generate personalized health portraits, identify potential pathological phenomena and trigger disease early warnings, and build a health assessment model by combining with a medical knowledge base through model fine-tuning methods, and output personalized health analysis reports and intervention suggestions;
[0011] User terminal module: used to support users to obtain health analysis reports through active query and passive reception methods, and support the generation of family health analysis and assessment reports.
[0012] As a further improvement of this technical solution, the multi-modal identity recognition in the identity recognition module includes at least one or a combination of voiceprint recognition, live fingerprint verification and dynamic QR code scanning, and further includes:
[0013] Users initiate identity verification instructions through voice, fingerprint or dynamic QR code;
[0014] User data without identity recognition is not included in health monitoring;
[0015] Multiple intelligent toilet devices are associated with the same user identity to achieve unified data management.
[0016] As a further improvement of this technical solution, the multi-source sensing module includes a basic sub-module and an extended sub-module. The basic sub-module is an essential module of the intelligent toilet, and the extended sub-module is a module selectively installed by users according to their needs.
[0017] As a further improvement of this technical solution, the basic sub-module includes a temperature monitoring sensing unit and a time unit. The temperature monitoring sensing unit is used for non-contact body surface temperature measurement and environmental temperature monitoring, and the time unit is used for accurate timestamp marking, behavior event time series analysis and system task scheduling.
[0018] As a further improvement of this technical solution, the expansion sub-module includes a blood oxygen monitoring unit, an odor monitoring sensing unit, an optical fiber sensing unit, an image monitoring unit, a urine analysis sensing unit, and a toilet seat pressure sensing unit. The blood oxygen monitoring unit is used to detect the user's blood oxygen saturation and pulse rate in real time. The odor monitoring sensing unit is used to detect volatile organic compounds in excrement and the environment in real time. The optical fiber sensing unit is used for contactless vital sign monitoring and defecation behavior analysis. The image monitoring unit is used to collect and transmit the color and shape of feces and the color of urine. The urine analysis sensing unit is used to perform real-time and non-invasive detection of biochemical indicators in the user's urine. The toilet seat pressure sensing unit is used to monitor the user's sitting posture pressure distribution, analyze defecation behavior characteristics, and track weight dynamics in real time.
[0019] As a further improvement of this technical solution, the specific steps for the intelligent analysis module to construct a health assessment model are as follows:
[0020] S1. Multi-source data integration and preprocessing, fine-tuning dataset construction, combining medical knowledge bases, de-identified physical examination data, and data generated by human-machine mixing to form a training set covering multiple diseases and multiple health labels;
[0021] S2. LoRA parameter optimization, using low-rank adaptation technology to inject trainable parameters into the attention layer of the pre-trained large model;
[0022] S3. Multi-task joint training, designing a cross-entropy loss function to optimize the health report generation task, and at the same time introducing a weighted multi-modal cross-entropy loss function;
[0023] S4. Multi-modal time series analysis, integrating the user's historical data and real-time data, extracting time series features, and combining the thresholds in the medical knowledge base to construct a dynamic health portrait;
[0024] S5. Potential pathology identification, through the large model inference engine, correlating multi-dimensional data to identify compound health risks;
[0025] S6. Early warning trigger mechanism, if an emergency indicator is detected, directly send an alarm to the emergency contact through the Internet of Things module. For non-emergency risks, generate a hierarchical early warning and push it to the user terminal module.
[0026] As a further improvement of this technical solution, in S1, for multi-source data integration and preprocessing, the specific steps are as follows:
[0027] S1.1. The Internet of Things module receives the real-time data from the multi-source sensing module and the user identity information from the identity recognition module;
[0028] S1.2. Denoise, fill in missing values, and remove outliers from the original data, and align the multi-modal time series data through the time unit;
[0029] S1.3. Normalize the sensor data with different dimensions;
[0030] S1.4. Collect and desensitize the physical examination data from the physical examination institution, and construct a data set with the assistance of relevant standards and specifications;
[0031] S1.5. Construct a fine-tuning data set in the following two ways:
[0032] Manually construct a data set relying on the knowledge and experience of experts;
[0033] Construct a data set through human-machine hybrid combination of humans and machines, and use a pre-trained large model to automatically generate a data set through specific prompts and instructions.
[0034] As a further improvement of this technical solution, in S2, the LoRA parameter optimization is as follows:
[0035] S2.1. Divide the data set into a training set, a validation set, and a test set for use in the fine-tuning process;
[0036] S2.2. Explain the fine-tuning of the model by integrating the LoRA technology with the Unsloth framework and deploy it through Ollama. The specific steps are as follows:
[0037] Before loading the model, set the quantization method, use BitsAndBytesConfig, and load the model in 4-bit format;
[0038] When loading the model, specify a maximum sequence length parameter. During the model loading process, specify the loading accuracy of the model, which GPUs to load for training, and specify the model parameters to be fine-tuned;
[0039] For the fine-tuning of large models for small-scale data, adopt a full-memory loading strategy and load the data set into memory at one time;
[0040] Set the parameter rank r of LoRA, the scaling coefficient lora_alpha, the target attention layer parameter target_modules, the regularization technology parameter lora_dropout, and the parameter task_type specifying the model task type, where:
[0041] Given a dense neural network layer with its parameter matrix , to adapt to the downstream task, it is necessary to learn the parameter update matrix , update the original parameter matrix, and for full-scale fine-tuning, the update formula is:
[0042] ;
[0043] Among them, is the updated parameter matrix;
[0044] The learning parameter update matrix is decomposed into two matrices with low parameter quantities and , such that the update process is transformed into:
[0045] ;
[0046] Among them, is a set parameter, adopting a dynamic adjustment strategy, and the setting formula is:
[0047] ;
[0048] When is selected, can be selected;
[0049] For the target module parameters, multiple components applicable to the model can be selected, including the attention mechanism, output projection, feed-forward block, and linear output layer;
[0050] S2.3. Training parameters, and the corresponding specific methods are:
[0051] Adopt a cosine annealing dynamic learning rate scheduler;
[0052] The batch size is maximized based on the hardware memory to improve the training efficiency;
[0053] Select the Adam / SGD optimizer and adjust the momentum and weight decay parameters to optimize the convergence path;
[0054] Suppress overfitting through Dropout and L2 regularization;
[0055] The number of training epochs, which is the number of times the model traverses the entire training set;
[0056] S2.4. Adopt the early stopping method to perform fine-tuning training on the model;
[0057] S2.5. Save the LoRA parameters, merge the weights with the base model, and then convert the model to the GGUF format for local deployment by Ollama.
[0058] As a further improvement of this technical solution, in S3, different loss functions are designed for different tasks. One task is to enable the large model to generate professional health analysis reports, and the other task is to give early warnings for diseases. Design a multi-task training joint loss function, and the specific steps are:
[0059] S3.1. Design the cross-entropy loss as the core loss function for fine-tuning the language model, enabling the large model to generate professional health analysis reports. The corresponding formula is:
[0060] ;
[0061] where, is the core loss function, is the label sequence, is the total number of health label categories, is the true label, is the model prediction probability;
[0062] S3.2. Design the multi-modal weighted cross-entropy loss function to adapt to disease early warning. The corresponding formula is:
[0063] ;
[0064] ;
[0065] where, is the multi-modal weighted cross-entropy loss function, is the batch size, representing the number of samples input in one training, is the total number of health label categories, is the th sample's th true value of the health label, , is the probability that the model predicts the th health label as positive, is the disease weight coefficient, is the th positive sample quantity of the health problem. Its ratio to the total number of samples is used to dynamically adjust the loss weight, ensuring that the model balances the attention to common and rare diseases during the fine-tuning process and improving the comprehensiveness and reliability of health early warning;
[0066] S3.3. Construct the joint loss function to optimize the main task and the auxiliary task simultaneously, and define the weighted total loss:
[0067] ;
[0068] ;
[0069] where, is the joint loss function, and are both weight coefficients.
[0070] As a further improvement of this technical solution, in the user terminal module, the active user obtains a health assessment report through the terminal according to their own needs and through communication with the large model, and generates a personalized health report. The passive mode is to passively receive the health report from the system. The report uses fine-tuned prompt words. When the user actively obtains an individual analysis report, each user constructs an independent conversation flow. The large model queries the Internet of Things data according to the user ID, integrates the individual's needs, and generates a health report. In addition, for families that often use the same toilet ID, a family health analysis and assessment report is generated.
[0071] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0072] 1. In the intelligent toilet with the function of human health monitoring, analysis and early warning, a multi-modal sensing module is integrated, covering a variety of modules such as a blood oxygen monitoring unit, an odor monitoring sensing unit, an optical fiber sensing unit, an image monitoring unit, and a seat ring pressure sensing unit. It can collect multi-dimensional physiological data in real time, break through the problems of single data collection dimension and limited means in the prior art, comprehensively reflect the complex physiological state of the human body, and improve the data accuracy and diversity.
[0073] 2. In the intelligent toilet with the function of human health monitoring, analysis and early warning, based on the deep integration and analysis of individual data by the large language model, it breaks through the limitation of single existing analysis methods, fully explores the potential value of data, realizes the closed-loop management from data to personalized health intervention, and better copes with the complex scenarios of individual differences and coexistence of multiple diseases.
[0074] 3. In the intelligent toilet with the function of human health monitoring, analysis and early warning, a personalized health portrait is constructed, potential pathological phenomena are initially identified, and disease early warning is actively triggered, comprehensively covering multi-dimensional health problems such as cardiovascular and metabolic syndrome, making up for the deficiency of the existing system in health assessment dimensions.
[0075] 4. In the intelligent toilet with the function of human health monitoring, analysis and early warning, a health examination report is generated through the large model, reducing the complicated programming process. There are two ways for users to obtain a health analysis report, active and passive. They can obtain a personalized report and can also generate a family health analysis and assessment report, breaking through traditional limitations and meeting the needs of different users. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 is the overall structure diagram of the present invention;
[0077] Figure 2 is the internal structure diagram of the multi-source sensing module in the present invention;
[0078] Figure 3 is the working flow chart of the intelligent analysis module in the present invention;
[0079] The meanings of the various marks in the figure are as follows:
[0080] 1. Identity recognition module;
[0081] 2. Multi-source sensing module; 20. Basic sub-module; 200. Temperature monitoring and sensing unit; 201. Time unit; 21. Extended sub-module; 210. Blood oxygen monitoring unit; 211. Odor monitoring and sensing unit; 212. Fiber optic sensing unit; 213. Image monitoring unit; 214. Urine analysis sensing unit; 215. Toilet seat pressure sensing unit;
[0082] 3. Internet of Things module;
[0083] 4. Intelligent analysis module;
[0084] 5. User terminal module. Detailed implementation manners
[0085] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0086] As Figures 1-3 shown, this embodiment provides an intelligent toilet with functions of human health monitoring, analysis and early warning, including:
[0087] Identity recognition module 1: used for multi-modal identity recognition of users to determine user identities;
[0088] Multi-source sensing module 2: used for real-time collection of user physiological parameters and environmental parameters;
[0089] Internet of Things module 3: used for storing and encrypting and transmitting user physiological data, environmental data and behavior data collected by the multi-source sensing module 2 to the cloud database, and supporting users to input real-time health label data, device collaboration and remote service interaction;
[0090] Intelligent analysis module 4: deployed in the cloud, deeply integrating and analyzing multi-modal time-series data in the cloud database based on a large language model (LLM), generating a personalized health portrait, identifying potential pathological phenomena and triggering disease early warnings, and constructing a health assessment model through model fine-tuning methods combined with medical knowledge bases, and outputting a personalized health analysis report and intervention suggestions;
[0091] User terminal module 5: used for supporting users to obtain health analysis reports through active query and passive reception methods, and supporting the generation of family health analysis and evaluation reports.
[0092] In this embodiment, the multimodal identity recognition in the identity recognition module 1 includes at least one or a combination of voiceprint recognition, live fingerprint verification, and dynamic QR code scanning. By collecting these data, according to requirements, user identity verification can be performed based on the combination of these features. While ensuring user identity security and meeting the needs of the toilet use scenario, it further includes:
[0093] The user initiates an identity verification instruction through voice, fingerprint, or dynamic QR code;
[0094] User data without identity recognition is not included in health monitoring;
[0095] Multiple intelligent toilet devices are associated with the same user identity to achieve unified data management. The same user identity can generate health monitoring data across toilets, not limited to a fixed toilet, and these data are unified under the user's identity.
[0096] In this embodiment, the multi-source sensing module 2 includes a basic sub-module 20 and an extended sub-module 21. The basic sub-module 20 is an essential module of the intelligent toilet, and the extended sub-module 21 is a module selectively installed by the user according to requirements.
[0097] Specifically, the basic sub-module 20 includes a temperature monitoring sensing unit 200 and a time unit 201. The temperature monitoring sensing unit 200 is used for non-contact body surface temperature measurement and environmental temperature monitoring, providing basic parameters for health status assessment and sensor data correction. Its data not only directly serves health warning (such as fever screening), but also provides key environmental correction parameters for multi-sensor collaborative analysis. The time unit 201 is used for accurate timestamp marking, behavioral event time series analysis, and system task scheduling, providing a basic time series framework for the spatio-temporal association and long-term trend mining of health data.
[0098] Specifically, the extended submodule 21 includes a blood oxygen monitoring unit 210, an odor monitoring sensor unit 211, a fiber optic sensor unit 212, an image monitoring unit 213, a urine analysis sensor unit 214 and a seat pressure sensor unit 215. The blood oxygen monitoring unit 210 is used to detect the user's blood oxygen saturation and pulse rate in real time, and provide key physiological parameters for cardiovascular health assessment. The odor monitoring sensor unit 211 is used to detect volatile organic compounds in excrement and the environment in real time, and assist in assessing digestive system health, metabolic abnormalities and infection risks through gas composition analysis. Its data can not only independently warn of disease risks, but also cooperate with urine analysis, pressure sensing and other modules to build a multi-dimensional health portrait. The fiber optic sensor unit 212 is used for contactless vital signs monitoring (such as heart rate, respiratory rate) and defecation behavior analysis, which is based on the optical fiber's detection of physical quantity changes. The sensitivity of the sensor 211 can achieve high-precision and anti-interference physiological signal collection, providing a non-invasive and highly reliable means of vital sign detection for the smart toilet. The image monitoring unit 213 is used to collect and transmit the color, shape of feces and the color of urine. The urine analysis sensor unit 214 is used to perform real-time and non-invasive detection of biochemical indicators in the user's urine, providing key data support for the management of metabolic diseases, urinary system diseases and chronic diseases. The seat pressure sensor unit 215 is used to monitor the user's sitting pressure distribution, defecation behavior characteristics and weight dynamic tracking in real time, providing multi-level functional support for the smart toilet from basic weight monitoring to complex health assessment, and providing key mechanical parameters for digestive tract health assessment and behavior recognition. Its data not only serves the early warning of digestive tract diseases, but also provides core input for user behavior analysis, personalized interaction and safety monitoring.
[0099] In this embodiment, the Internet of Things module 3 is the core communication hub of the smart toilet health monitoring system, responsible for multi-source data encryption transmission, device cloud collaboration and remote service interaction; the Internet of Things module 3 is used to store data from the multi-source sensor module 2; when the user falls or the blood oxygen level drops sharply, the NB-IoT is used to directly connect to the emergency contact to achieve real-time health monitoring; for example, when going to the toilet at night, the heating system is linked to adjust the ambient temperature to achieve smart home linkage; maintenance reminders are triggered by device operation data (such as network quality), and firmware updates can be pushed in batches to avoid server overload and other operation and maintenance management caused by large-scale concurrency; each user can enter personal real-time health status on the Internet of Things platform, such as health, diarrhea, nausea, etc., and combine sensor data for the cloud-based large model to conduct a comprehensive analysis of the health status and provide label data for disease warning; in addition, for users who often use the same toilet ID, a family is built.
[0100] In this embodiment, the specific steps of constructing the health assessment model by the intelligent analysis module 4 include:
[0101] S1. Integrate and preprocess multi-source data, construct a fine-tuning dataset, and combine medical knowledge bases, de-identified physical examination data, and data generated by human-machine hybrid to form a training set covering multiple diseases and multiple health labels;
[0102] S2. Optimize LoRA parameters, adopt low-rank adaptation technology, and inject trainable parameters into the attention layer of the pre-trained large model;
[0103] S3. Conduct multi-task joint training, design a cross-entropy loss function to optimize the health report generation task, and at the same time introduce a weighted multi-modal cross-entropy loss function to dynamically balance the warning weights of common diseases and rare diseases;
[0104] S4. Conduct multi-modal time series analysis, integrate the user's historical data and real-time data, extract time series features, and combine the thresholds in the medical knowledge base to construct a dynamic health portrait;
[0105] S5. Identify potential pathologies, associate multi-dimensional data through the large model inference engine, and identify complex health risks;
[0106] S6. Warning trigger mechanism: If an emergency indicator is detected, directly send an alarm to the emergency contact through the Internet of Things module 3. For non-emergency risks, generate a hierarchical warning and push it to the user terminal module 5.
[0107] Specifically, in S1, for the integration and preprocessing of multi-source data, the specific steps are as follows:
[0108] S1.1. The Internet of Things module 3 receives the real-time data from the multi-source sensing module 2 and the user identity information from the identity recognition module 1;
[0109] S1.2. Denoise, fill in missing values, and remove outliers from the original data, and align the multi-modal time series data through the time unit 20;
[0110] S1.3. Normalize the sensor data with different dimensions to ensure the unity of subsequent analysis;
[0111] S1.4. Collect physical examination data from physical examination institutions and de-identify it, supplemented by relevant standards and specifications, such as the "Dataset of Basic Items for Health Examinations", the "Standard for Common Physical Examination Data", and the "Catalog of Basic Items for Health Examinations", as well as dietary knowledge and medical knowledge such as the "Dietary Guidelines for Chinese Residents" and the "Chronic Disease Management Specifications", including structured data (database), semi-structured data (JSON), and unstructured data (text, image), to construct a dataset;
[0112] S1.5. Construct a fine-tuning dataset through the following two methods:
[0113] Manually construct a dataset relying on experts' knowledge and experience;
[0114] A human-machine hybrid approach combines human creativity and machine efficiency to build a dataset. Using a pre-trained large model, a dataset is automatically generated through specific prompts and instructions.
[0115] In the present invention, a human-machine hybrid mode is adopted to build a model fine-tuning dataset, and through the review of experts, the data quality is ensured. An engineering example of building a model fine-tuning dataset through prompt engineering is as follows:
[0116] Role: You are an artificial intelligence data expert, proficient in data cleaning work.
[0117] Background: In the process of developing an intelligent toilet with functions of human health monitoring, analysis and early warning, it is necessary to combine the data collected from blood oxygen monitoring sensors, optical fiber sensors, urine analysis sensors, seat pressure sensors, and odor monitoring sensor modules with temperature sensing technology and time sensing technology to construct multi-modal time-series data. Now, it is necessary to perform intelligent analysis on this data through a large model to preliminarily judge the user's health condition and give a health assessment report. In order to improve the accuracy of this large model, it is necessary to fine-tune this large model.
[0118] Task: You need to construct question-answer pairs according to the content of the attachment and the following requirements. Note that you must combine the content of the attachment and do not ignore it.
[0119] The required format is json, and the example is as follows:
[0120] {
[0121] "instruction": "According to the content of the attachment, fill in the possible content that the health assessment report may report here. Note that you must combine the content of the attachment.",
[0122] "input": "Questions asked by the large model",
[0123] "output": "According to the content of the attachment, write the corresponding report, including the reporting content, how to think about the reporting content, how to report, and most importantly how to report. Therefore, it is necessary to clearly state how to report in the answer. This is very important. The answer should conform to the following principles:
[0124] 1. Reporting content: It is necessary to determine the reporting content based on the collected data, including whether health problems are found, the degree of health problems, and the living and dietary matters that need to be taken.
[0125] 2. Professionalism of the answer: It is necessary to be professional according to the hospital's physical examination report.
[0126] 3. Accuracy of the answer: Report according to the monitored objective data, and do not fabricate data.
[0127] Note that the above answer must incorporate the content of the attachment
[0128] }
[0129] Attachment: It includes contents such as "Dataset of Basic Items for Health Examinations", "Standards for Common Physical Examination Data", "Catalog of Basic Items for Health Examinations", "Dietary Guidelines for Chinese Residents", and "Chronic Disease Management Specifications".
[0130] Specifically, in S2, the LoRA parameter optimization has the following specific steps:
[0131] S2.1: Divide the dataset into a training set, a validation set, and a test set for use during the fine-tuning process. The common ratio is 70% for the training set, 15% for the validation set, and 15% for the test set;
[0132] S2.2: Explain the fine-tuning of the model by integrating the LoRA technology with the Unsloth framework. Using this method to fine-tune the large model can improve the fine-tuning speed, reduce memory usage, and not reduce the accuracy, and it is deployed through Ollama. The specific steps are as follows:
[0133] Before loading the model, set the quantization method, use BitsAndBytesConfig, and load the model in 4-bit format to reduce memory usage;
[0134] The pre-trained model is the basic model we choose for fine-tuning, which has the generalization abilities of reading, writing, and understanding. These models (such as chatGPT, DeepSeek, etc.) have been trained on a large amount of general data and can handle multiple tasks. Here, the DeepSeek-R1-70b model is selected for fine-tuning. When loading the model, specify a maximum sequence length parameter, which determines the context window size of the model. DeepSeek-R1-70 supports a maximum context length of 128k. In this example, we set it to 2048. A longer context will increase the computational and video memory consumption. During the model loading process, specify parameters such as the loading precision of the model, which GPUs to load for training, and the model to be fine-tuned;
[0135] For the fine-tuning of large models with small-scale data, adopt the full-memory loading strategy, load the dataset into memory at once to accelerate the transfer from CPU to GPU. To prevent overfitting, dynamic resampling can be performed in each epoch to ensure the efficient utilization of small data and the generalization ability of the model;
[0136] Set parameters such as the parameter rank r of LoRA (usually 8 to 32), the scaling factor lora_alpha (usually 2r), the target attention layer parameter target_modules, the regularization technique parameter lora_dropout, and the parameter task_type specifying the model task type. Among them:
[0137] Given a dense neural network layer with a parameter matrix , to adapt to downstream tasks, it is necessary to learn the parameter update matrix , update the original parameter matrix, and for full-scale fine-tuning, the update formula is:
[0138] ;
[0139] Among them, is the updated parameter matrix;
[0140] To learn the parameter update matrix it is necessary to calculate the gradients for all parameters of this layer, which often requires a large amount of GPU memory and is costly. To solve this problem, the learning parameter update matrix is decomposed into two matrices with low parameter quantities and , so that the update process becomes:
[0141] ;
[0142] Among them, is a set parameter, and a dynamic adjustment strategy is adopted. The setting formula is:
[0143] ;
[0144] When is selected, can be selected;
[0145] For the target module parameters, multiple components applicable to the model can be selected, including the attention mechanism (Q, K, V matrices), output projection, feed-forward block, and linear output layer;
[0146] S2.3. Training parameters, and the corresponding specific methods are as follows:
[0147] Adopt a dynamic learning rate scheduler such as cosine annealing. A high learning rate in the initial stage accelerates convergence, and a low learning rate in the later stage fine-tunes;
[0148] The batch size is maximized based on the hardware memory to improve training efficiency;
[0149] Select the Adam / SGD optimizer and adjust the momentum and weight decay parameters to optimize the convergence path;
[0150] Suppress overfitting through Dropout and L2 regularization, and enhance the generalization ability of the model;
[0151] The number of training epochs, which is the number of times the model traverses the entire training set. More training epochs allow the model to learn the data more fully and may lead to better performance. However, too many training epochs may cause overfitting;
[0152] S2.4. Adopt early stopping for fine-tuning the model. During training, monitor the error on the validation set. If the validation error does not improve for several consecutive epochs, even if the training error is still decreasing, stop the training to prevent the model from overfitting on the training set while retaining the model parameters that perform well on the validation set;
[0153] S2.5. Save the LoRA parameters, merge the weights with the base model, and then convert the model to the GGUF format for local deployment by Ollama.
[0154] Specifically, in S3, different loss functions are designed for different tasks. One task is to enable the large model to generate professional health analysis reports, and the other task is to give early warnings about diseases. A multi-task training joint loss function needs to be designed, and appropriate evaluation metrics are selected according to the tasks, such as accuracy, F1 score, AUC, etc. The specific steps are as follows:
[0155] S3.1. Design the cross-entropy loss as the core loss function for fine-tuning the language model to enable the large model to generate professional health analysis reports. Its corresponding formula is:
[0156] ;
[0157] Among them, is the core loss function, is the label sequence, is the total number of health label categories, is the true label, is the model prediction probability;
[0158] S3.2. Design a multi-modal weighted cross-entropy loss function to adapt to giving early warnings about diseases. Its corresponding formula is:
[0159] ;
[0160] ;
[0161] Among them, is the multi-modal weighted cross-entropy loss function, is the batch size, which represents the number of samples input in one training, is the total number of health label categories (such as diabetes, hypertension, constipation, etc.), is the true value of the th health label of the th sample (0 indicates normal, 1 indicates abnormal), is the probability that the model predicts the th health label as positive, is the disease weight coefficient, is the number of positive samples of the
[0162] th type of health problem. The ratio of it to the total number of samples is used to dynamically adjust the loss weight to ensure that the model balances the attention to common diseases and rare diseases during the fine-tuning process, improving the comprehensiveness and reliability of health warnings; represents the loss weight of the
[0163] th type, which is used to adjust the model's attention to minority classes. The role of this weight is as follows: When the number of positive samples of a certain type of health problem is relatively small, the value of
[0164] will be relatively large, resulting in a significant increase in the disease weight coefficient forcing the model to pay more attention to the categories with scarce samples (such as rare diseases) during training, avoiding prediction biases caused by uneven data distribution;
[0165] S3.3. Construct a joint loss function to optimize the main task (such as text generation) and the auxiliary task (such as disease warning) simultaneously, and define the weighted total loss:
[0166] ;
[0167] ;
[0168] Among them, is the joint loss function, and are both weight coefficients.
[0169] In this embodiment, in the user terminal module 5, the active user obtains a health assessment report through the terminal according to his own needs and generates a personalized health report by communicating with the large model, such as blood pressure trend and weight trend reports, weekly trend reports, quarterly trend reports, and annual trend reports. The passive mode is to passively receive health reports from the system. Such reports use fine-tuned prompts to generate more accurate user health reports. When the user actively obtains an individual analysis report, each user constructs an independent conversation flow, and the large model queries the Internet of Things data according to the user ID, integrates the individual's needs, and generates a health report. In addition, for families that often use the same toilet ID, a family health analysis and assessment report is generated, breaking through the limitation of only generating a single user health analysis and assessment report.
[0170] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and the descriptions in the specification are only preferred examples of the present invention and are not used to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended claims and their equivalents.
Claims
1. A smart toilet with human health monitoring, analysis and early warning functions, characterized in that: include: Identity recognition module (1): used to perform multi-modal identity recognition on the user and determine the user's identity; Multi-source sensor module (2): used to collect user health data and environmental data in real time; Internet of Things module (3): used for storing and encrypting the user health data, environmental data and behavior data collected by the multi-source sensor module (2) to a cloud database, and supporting users to input real-time health tag data, equipment coordination and remote service interaction; Intelligent Analysis Module (4): Based on the large language model, the multimodal time series data in the cloud database is deeply integrated and analyzed to generate personalized health portraits, identify potential pathological phenomena and trigger disease warnings, and build a health assessment model through model fine-tuning methods combined with the medical knowledge base to output personalized health analysis reports and health intervention recommendations; User terminal module (5): used to support users to obtain health analysis reports through active query and passive reception, and to support the generation of family-level health analysis and evaluation reports.
2. The smart toilet with human health monitoring, analysis and early warning functions according to claim 1 is characterized in that: The multimodal identity recognition in the identity recognition module (1) includes at least one or more combinations of voiceprint recognition, live fingerprint verification and dynamic QR code scanning, and further includes: The user initiates identity authentication instructions through voice, fingerprint or dynamic QR code; Unidentified user data is not included in health monitoring; The same user identity is associated with multiple smart toilet devices to achieve unified data management.
3. The smart toilet with human health monitoring, analysis and early warning functions according to claim 1 is characterized by: The multi-source sensing module (2) comprises a basic submodule (20) and an extended submodule (21); the basic submodule (20) is a necessary module for the smart toilet, and the extended submodule (21) is a module that is selectively installed by a user according to needs.
4. The smart toilet with human health monitoring, analysis and early warning functions according to claim 3 is characterized by: The basic submodule (20) comprises a temperature monitoring sensor unit (200) and a time unit (201); the temperature monitoring sensor unit (200) is used for contactless body surface temperature measurement and environmental temperature monitoring; and the time unit (201) is used for accurate time stamp marking, behavioral event time alignment and system task scheduling.
5. The smart toilet with human health monitoring, analysis and early warning functions according to claim 3 is characterized by: The expansion submodule (21) comprises a blood oxygen monitoring unit (210), an odor monitoring sensor unit (211), an optical fiber sensing unit (212), an image monitoring unit (213), a urine analysis sensor unit (214), and a seat pressure sensor unit (215); the blood oxygen monitoring unit (210) is used to detect the blood oxygen saturation and pulse rate of the user in real time; the odor monitoring sensor unit (211) is used to detect volatile organic compounds in excrement and the environment in real time; the optical fiber sensing unit (212) is used for contactless vital sign monitoring and defecation behavior analysis; the image monitoring unit (213) is used to collect and transmit the color and shape of feces and the color of urine; the urine analysis sensor unit (214) is used to perform real-time, non-invasive detection of biochemical indicators in the user's urine; and the seat pressure sensor unit (215) is used to monitor the user's sitting pressure distribution, defecation behavior feature analysis, and weight dynamic tracking in real time.
6. The smart toilet with human health monitoring, analysis and early warning functions according to claim 4 is characterized in that: The specific steps of constructing the health assessment model by the intelligent analysis module (4) include: S1. Multi-source data integration and preprocessing, large language model fine-tuning data set construction, combining medical knowledge base, desensitized physical examination data and human-machine hybrid generated data to form a training set covering multiple diseases and multiple health labels; S2, LoRA parameter optimization, uses low-rank adaptive technology to inject trainable parameters into the attention layer of the pre-trained large model; S3, multi-task joint training, designing the cross entropy loss function to optimize the health report generation task, and introducing the weighted multimodal cross entropy loss function; S4, multimodal health time series data analysis, integrating user historical data and real-time data, and performing time alignment, extracting time series features, combining thresholds in the medical knowledge base, and building a dynamic health portrait; S5, potential pathology identification, through the large model reasoning engine, correlating multi-dimensional data to identify complex health risks; S6, an early warning trigger mechanism, if an emergency indicator is detected, an alarm is directly sent to the emergency contact through the Internet of Things module (3), and a graded early warning is generated for non-emergency risks and pushed to the user terminal module (5).
7. The smart toilet with human health monitoring, analysis and early warning functions according to claim 6 is characterized in that: In S1, multi-source data integration and preprocessing, the specific steps are as follows: S1.1, the Internet of Things module (3) receives the real-time data of the multi-source sensor module (2) and the user identity information of the identity recognition module (1); S1.2, denoising, filling missing values, and removing outliers on the original data, and aligning the multimodal time series data through the time unit (201); S1.3, normalize sensor data of different dimensions; S1.
4. Collect and desensitize physical examination data from physical examination institutions, and construct a data set based on relevant standards and specifications; S1.
5. Construct a fine-tuning dataset in the following two ways: The dataset is constructed manually, relying on the knowledge and experience of experts; The data set is constructed by combining human and machine hybrids, and the pre-trained large model is used to automatically generate the data set through specific prompts and instructions.
8. The smart toilet with human health monitoring, analysis and early warning functions according to claim 6 is characterized in that: In S2, LoRA parameters are optimized, and the specific steps are as follows: S2.
1. Divide the dataset into training, validation, and test sets for use in the fine-tuning process. S2.2, the Unsloth framework is used to integrate LoRA technology to fine-tune the model, and it is deployed through the ollama reasoning framework. The specific steps are as follows: Before loading the model, set the quantization method, use BitsAndBytesConfig, and load the model in 4-bit format; When loading the model, specify a maximum sequence length parameter. During the model loading process, specify the model loading accuracy, which GPUs to load it on for training, and specify the model parameters that need to be fine-tuned; For fine-tuning of large models with small-scale data, a full memory loading strategy is adopted to load the dataset into memory at one time; Set the parameter rank r of LoRA, the scaling factor lora_alpha, the target attention layer parameter target_modules, the regularization technology parameter lora_dropout, and the parameter task_type that specifies the model task type, where: Given a dense neural network layer, its parameter matrix is , in order to adapt to downstream tasks, it is necessary to learn the parameter update matrix , update the original parameter matrix, fine-tune the whole amount, and update the learning parameter matrix Decompose into two matrices with low parameter count and ; For the target module parameter, you can select multiple components that can be applied to the model, including the attention mechanism, output projection, feedforward block, and linear output layer; S2.3, training parameters, the corresponding specific methods are: Adopt cosine annealing dynamic learning rate scheduler; Batch size is maximized based on hardware memory to improve training efficiency; Use Adam / SGD optimizer and adjust momentum and weight decay parameters to optimize the convergence path; Suppress overfitting through Dropout and L2 regularization; The number of training rounds, the number of times the model traverses the entire training set; S2.4, use early stopping method to fine-tune the model; S2.
5. Save the LoRA parameters and merge the weights with the basic model, then convert the model into GGUF format for local deployment of the Ollama inference framework.
9. The smart toilet with human health monitoring, analysis and early warning functions according to claim 6, characterized in that: In S3, different loss functions are designed for different tasks. One task is to enable the large model to produce a professional health analysis report, and the other task is to warn of the disease. A multi-task training joint loss function is designed. The specific steps are as follows: S3.
1. Design cross entropy loss as the core loss function for fine-tuning the language model, so that the large model can produce professional health analysis reports; S3.
2. Design a multimodal weighted cross entropy loss function to adapt to early warning of diseases; S3.
3. Construct a joint loss function to optimize the main task and auxiliary tasks at the same time.
10. The smart toilet with human health monitoring, analysis and early warning functions according to claim 1 is characterized by: In the active mode in the user terminal module (5), the user generates a personalized health report through the terminal according to his or her own needs and based on the interaction with the big model. Each user constructs an independent dialogue flow. The big model queries the IoT data according to the user ID, integrates the individual needs, and generates a health report. The passive mode is to passively receive the health assessment report from the system. The report uses fine-tuned prompt words to generate a more accurate user health report. In addition, for families who often use the same toilet ID, a family-level health analysis and assessment report is generated.
Citation Information
Patent Citations
Intelligent toilet lid for health monitoring and intelligent toilet
CN118187227A
Intelligent toilet bowl
CN107224239A
Self-supervised learning and multi-mode biomedical signal processing method, system and terminal
CN119202700A
Multi-modal model training fine tuning optimization method based on artificial intelligence
CN119442128A
Personal health evaluation method based on lightweight large language model
CN119889704A
Cited By
Human-computer interaction speech recognition system and method based on deep learning
CN120279921A
Constipation prediction system based on artificial intelligence large model
CN120448994A