Automatic excrement water content detection system and method and input and output balance management method
The automated fecal moisture content detection system achieves uniform distribution and accurate detection of fecal samples, solving the problems of odor, cross-contamination and detection errors in traditional detection methods, and providing efficient and accurate detection results to support personalized management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GENERAL HOSPITAL OF SOUTHERN THEATRE COMMAND OF PLA
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-08
AI Technical Summary
Existing methods for detecting fecal moisture content are prone to odor, visual contamination, and cross-infection due to manual operation. Furthermore, visual recognition methods cannot accurately capture the true differences in overall moisture content, resulting in large errors in test results and failing to meet clinical needs.
An automated fecal moisture content detection system is employed, combining sealed bag homogenization, multimodal detection, and a pre-trained model to achieve uniform distribution and accurate detection of fecal samples. The system includes a dispensing unit, a mixing unit, a sampling unit, a multimodal detection unit, and a data transmission unit. It utilizes a near-infrared spectrometer and a temperature compensation device to perform temperature correction and calculation of spectral characteristic data, and combines this with a pre-trained model to obtain the moisture content of the fecal sample.
It avoids direct contact between medical staff and feces, eliminates odor and the risk of cross-infection, improves the accuracy and efficiency of test results, ensures the reliability and synchronization of test data, and supports the development of personalized solutions.
Smart Images

Figure CN121994737A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent detection technology, specifically to an automated fecal moisture content detection system, method, and inflow / outflow balance management method. Background Technology
[0002] In clinical diagnosis and treatment and individual health management, fecal water content is one of the key indicators for assessing the body's water metabolism balance, digestive system function and disease status.
[0003] In existing methods for testing the moisture content of hospital excrement, traditional drying methods require manual operation, which can easily produce odors, cause visual pollution, and pose a risk of cross-infection. On the other hand, simple visual identification methods, due to the discrete distribution of fecal components, can only reflect local appearance features through single-point visual observation and cannot accurately capture the true differences in overall moisture content. As a result, the test results have large errors and cannot meet the clinical demand for accurate data.
[0004] Therefore, finding a suitable fecal moisture content detection system is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] Based on this, in order to solve the problems of difficult operation and low accuracy of fecal moisture content detection mentioned in the prior art, this application provides an automated fecal moisture content detection system, method and intake-output balance management method. The main purpose is to disclose a precise and scientific intake-output balance management method. As an important part of the intake-output balance management method, accurately and simply obtaining the moisture content of feces is a key link that urgently needs to be solved.
[0006] In a first aspect, this application provides an automated fecal moisture content detection system, comprising: The dispensing unit obtains and seals the packaging bags containing the fecal samples; The mixing unit obtains the packaging bag and performs a homogenization operation to ensure that the fecal components are evenly distributed. The sampling unit performs quantitative sampling on uniformly distributed fecal samples to obtain quantitative samples and injects them into the test bottle; The multimodal detection unit obtains the net total weight of the fecal sample in the packaging bag through the weight detection unit, acquires the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer, and detects the temperature of the near-infrared detection environment in real time through the temperature compensation device and performs temperature correction on the spectral characteristic data. The large model calculation unit inputs the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample, and calculates the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. The data transmission unit sends the total moisture content of the fecal sample inside the sealed bag to the processing module of the inflow-outflow balance management system.
[0007] Further, the steps of obtaining the packaging bag and performing a homogenization process to ensure uniform distribution of fecal components include: The packaging bag is placed in a negative pressure homogenization chamber, which is equipped with a low-speed rotating motor. The low-speed rotating motor drives the packaging bag to rotate and achieves uniform distribution of fecal components.
[0008] Furthermore, the packaging bag is provided with a sampling positioning area, in which a highly elastic thickened composite film or an embedded highly elastic reinforcing layer is used to allow the sampling needle to be automatically sealed after being pulled out and to prevent sample leakage.
[0009] Furthermore, fecal samples are quantitatively sampled using a disposable sampling needle through the sampling positioning area; The disposable sampling needle includes a self-sealing silicone spring cap, which includes a silicone body, a built-in stainless steel spring spring, and a sealing lip. When the disposable sampling needle pierces the sampling positioning area of the packaging bag, the silicone body is compressed by pressure and drives the spring spring to store energy. When the disposable sampling needle is pulled out, the spring spring releases its elasticity to reset the spring cap, and the sealing lip seals the sampling hole to prevent leakage of fecal samples.
[0010] Furthermore, before the step of homogenizing the packaged bag containing the fecal sample by the mixing unit, the method further includes: obtaining the net total weight of the fecal sample from the weight detection unit, and calculating the operation time and / or homogenization speed based on the net total weight.
[0011] Furthermore, the steps for acquiring spectral characteristic data of the quantitative sample inside the detection bottle using a near-infrared spectrometer include: The near-infrared spectrometer used is a small grating-type near-infrared spectrometer with a spectral coverage range of 780-1700 nm and a resolution of 8-16 cm⁻¹. -1 Configured with a single InGaAs detector and temperature compensation module; The test bottle is made of quartz glass. After homogenization, the quantitative sample is placed in a constant temperature environment to equilibrate after eliminating air bubbles. During spectral acquisition, the baseline spectrum is obtained by scanning against the background of the test bottle. The balanced test bottle is placed in the sample cell and aligned with the center of the optical path. The number of scans, integration time, and single detection time are set. The original spectrum is preprocessed by normalization and spectral features of 1450nm and 1550-1700nm in the 780-1700nm band are extracted. Among them, 1450nm is the water characteristic peak and 1550-1700nm is the protein characteristic region. Principal component analysis is used to reduce the dimensionality to the top 5 principal components, which are then converted to JSON format and transmitted to the large model computing unit.
[0012] Furthermore, the step of normalizing the original spectrum includes: The original spectra of the collected fecal samples were smoothed by local low-order polynomial fitting with a window size of 5-7 points and a polynomial order of 2 to eliminate random noise caused by uneven fecal particle size and viscosity, while preserving the shape and position of spectral characteristic peaks. By iteratively reweighting the baseline, high weights are assigned to background areas such as food residue and microorganisms in fecal samples, while low weights are assigned to peak areas of target components such as moisture and protein. Combined with a penalty term, baseline drift is suppressed, eliminating baseline shift and interference from non-target components caused by the complex background of fecal samples. The first derivative calculation with a difference interval of 5 points is used to enhance the resolution of overlapping peaks of water and protein in fecal samples, highlight the position of characteristic peaks and eliminate peak overlap caused by the mixing of fecal components. For each fecal sample spectrum, normalization was performed sample by sample. The mean of the spectrum was subtracted and the result was divided by the standard deviation to eliminate the heat dissipation effect caused by the difference in fecal viscosity, so that the spectra of fecal samples in different physical states are comparable.
[0013] Furthermore, the temperature correction algorithm for temperature correction of spectral feature data is as follows: A temperature-spectral characteristic correction model was pre-established for the characteristic peaks of moisture and the characteristic regions of protein in fecal samples. The model training steps include collecting spectral data of standard fecal samples in the 20℃-30℃ range, and fitting a second-order polynomial relationship between the characteristic peak intensity and temperature: I corr =I raw +a×(T-T0)+b×(T-T0) 2 , among which, I corr To determine the intensity of the corrected characteristic peak, I raw The original spectral intensity is given, with T0=25℃ as the reference temperature. The model coefficients optimized for fecal samples are as follows: moisture peak a=-0.003, b=0.0001, protein region a=-0.0025, b=0.00008. The real-time correction step includes using a second-order polynomial relationship to calculate the intensity of the characteristic peaks of the current spectrum in real time, thereby eliminating the influence of temperature fluctuations on the shift of spectral characteristics.
[0014] Furthermore, the temperature-corrected spectral feature data is input into the pre-trained model to obtain the moisture content of the fecal sample. The steps for calculating the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample include: A robust prediction model is constructed and deployed. The spectral characteristic data of the sample to be tested after temperature correction is input into the model and the predicted water content W is output. The net total weight of the fecal sample is calculated as: total weight of the packaging bag and the fecal sample - weight of the packaging bag; The total water content of the fecal sample is calculated as net total weight of the fecal sample × W / 100.
[0015] Furthermore, it also includes: The homogenization unit includes an electromagnetic vibration homogenizer disposed at the bottom of the acquisition cell of the near-infrared spectrometer, the electromagnetic vibration homogenizer carrying the detection bottle and coaxially aligned with the optical path of the spectrometer. The homogenization unit is triggered after the weight detection unit acquires the net total weight of the fecal sample in the sealed bag and before the near-infrared spectrometer acquires the spectral characteristic data of the quantitative sample in the detection bottle. The basic vibration frequency of the homogenization unit is 50Hz±2Hz, amplitude is 0.5mm±0.1mm, duration is 2s±0.2s, and after homogenization, it is left to stand for at least 0.5s and the spectrum is pre-acquired twice. If the intensity deviation of the 1450nm moisture peak is less than 1%, proceed to formal spectral acquisition; otherwise, repeat the homogenization operation a maximum of 2 times.
[0016] Secondly, this application provides an automated method for detecting fecal moisture content, comprising the following steps: S1: Obtain a sealed bag containing a fecal sample and seal the sealed bag; S2: Homogenize the sealed packaging bag to ensure that the fecal components inside the packaging bag are evenly distributed. S3: Quantitatively sample the fecal sample inside the homogenized packaging bag, obtain the quantitative sample and inject it into the test bottle; S4: Obtain the net total weight of the fecal sample in the packaging bag through the weight detection unit; obtain the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer; detect the temperature of the near-infrared detection environment in real time through the temperature compensation device, and use the temperature to perform temperature correction on the spectral characteristic data; S5: Input the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample; calculate the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. S6: Send the total moisture content of the fecal sample in the packaging bag to the processing module of the inflow-outflow balance management system.
[0017] Thirdly, this application provides a method for managing the balance of input and output, including the following steps: P1: Real-time data on an individual's water intake, food water content, and diet type are obtained through smart terminals; P2: Calculate the total water content of an individual's urine output, drainage fluid volume, vomit, and feces. The calculation steps for the total water content of feces include: obtaining a sealed bag containing a fecal sample and sealing the bag; homogenizing the sealed bag to ensure uniform distribution of fecal components within the bag; quantitatively sampling the fecal sample from the homogenized bag and injecting the quantitative sample into a test bottle; obtaining the net total weight of the fecal sample from the sealed bag using a weight detection unit; obtaining the spectral characteristic data of the quantitative sample from the test bottle using a near-infrared spectrometer; real-time monitoring of the near-infrared detection environment temperature using a temperature compensation device and temperature correction of the spectral characteristic data using the temperature; inputting the temperature-corrected spectral characteristic data into a pre-trained model to obtain the water content of the fecal sample; calculating the total water content of the fecal sample based on the water content and the net total weight of the fecal sample; and sending the total water content of the fecal sample from the sealed bag to the processing module of the inflow-outflow balance management system. P3: By integrating an individual's water intake, food water content, diet type data, urine output, and total fecal water content through the processing module, a real-time water metabolism balance model is constructed, and balance status assessment results are generated. P4: Based on the assessment results of the intake-output balance, output suggestions for adjusting water intake or optimization schemes for fecal testing frequency.
[0018] The automated fecal moisture content detection system provided in this application has the following advantages: After sealing the fecal sample in a sealed bag, a high-speed rotating homogenizer is used to homogenize the fecal sample inside the sealed bag, ensuring a uniform distribution of moisture and solid components. The sample is then extracted from the homogenized sealed bag and injected into a detection bottle. A multimodal detection unit performs weight detection, and a high-precision electronic scale is used to obtain the net total weight of the fecal sample inside the sealed bag. A near-infrared spectrometer emits near-infrared light that penetrates the quantitative sample inside the detection bottle to capture the absorption spectrum of moisture. A thermocouple sensor detects the ambient temperature in real time, and a pre-stored temperature-spectrum correction model is used to correct the spectral data. Furthermore, a pre-trained fusion model is used to calculate the total moisture content based on the net total weight. After obtaining the total moisture content data, the data is encrypted and transmitted to the management system. By using a sealed homogenization automated process, direct contact between medical staff and feces is avoided, eliminating the risks of odor, visual pollution, and cross-infection. Homogenization also solves the problem of fecal component dispersion. After homogenization, quantitative sampling and multimodal detection improve the accuracy of test results, improve the accuracy of moisture content detection, and increase testing efficiency. Furthermore, the test data is automatically synchronized to the management system, making it convenient to develop personalized solutions. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a structural block diagram of an automated fecal moisture content detection system in one embodiment; Figure 2 This is a flowchart illustrating an automated method for detecting fecal moisture content in an example. Figure 3 This is a flowchart illustrating one method of managing the balance of input and output in an example. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] Example 1 Existing methods for detecting the moisture content of excrement, such as traditional drying methods, require manual operation, which can easily produce odors, visual pollution, and cross-infection risks. Simple visual identification methods, on the other hand, cannot accurately capture the true differences in overall moisture content because the fecal components are distributed discretely and single-point visual observation can only reflect local appearance features. This results in large errors in the test results and makes it difficult to meet the clinical demand for accurate data.
[0023] See Figure 1 As shown, this embodiment provides an automated fecal moisture content detection system, including: The dispensing unit 10 obtains and seals a packaging bag containing a fecal sample; Mixing unit 20 obtains the packaging bag and performs a homogenization operation to ensure that the fecal components are evenly distributed; Sampling unit 30 performs quantitative sampling on uniformly distributed fecal samples to obtain quantitative samples and injects them into the test bottle; The multimodal detection unit 40 obtains the net total weight of the fecal sample in the packaging bag through the weight detection unit, obtains the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer, and detects the temperature of the near-infrared detection environment in real time through the temperature compensation device and performs temperature correction on the spectral characteristic data. The large model calculation unit 50 inputs the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample, and calculates the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. The data transmission unit 60 sends the total moisture content of the fecal sample inside the sealed bag to the processing module of the inflow-outflow balance management system.
[0024] It should be noted that after the fecal sample is sealed in a sealed bag, a high-speed rotating homogenizer is used to homogenize the feces inside the sealed bag, so that the moisture and solid components are evenly distributed. Then, the sample is extracted from the homogenized sealed bag and injected into the test bottle. The weight is measured by a multimodal detection unit, and the net total weight of the feces in the sealed bag is obtained using a high-precision electronic scale. Near-infrared light emitted by a near-infrared spectrometer penetrates the quantitative sample in the test bottle to capture the absorption spectrum of moisture. The ambient temperature is detected in real time by a thermocouple sensor, and the spectral data is corrected using a pre-stored temperature-spectrum correction model. Then, a pre-trained fusion model is used to calculate the total water content by combining the net total weight. After obtaining the total water content data, the total water content data is encrypted and transmitted to the management system. For example, after the patient excretes feces into a sealed sampling bag with a built-in leak-proof layer, the sampling bag is collected at the inlet of the testing system. A robotic arm grasps the sampling bag, and a thermostatic device is used to reseal the bag opening to ensure no leakage. The sealed bag is then sent to a homogenizer and rotated for 5-10 seconds to uniformly mix the water and solid components in the feces, resulting in a mixed fecal sample to be tested. 5-10 ml of the homogenized sample is then extracted from the sampling port of the sealed bag and injected into a transparent testing bottle. The net total weight of the feces in the sealed bag is measured using an electronic scale, and the sample in the testing bottle is scanned using a near-infrared spectrometer to obtain the absorption spectrum of 780-1700 nm. The ambient temperature is detected by a thermocouple at a standard temperature of 25°C, and the system automatically performs temperature correction on the spectral data. The corrected spectral data is input into a pre-trained model, which outputs the moisture content. The total moisture content is calculated based on the moisture content and transmitted to the management system. Medical staff can view various data related to the patient's fluid balance in real time.
[0025] It is worth noting that by using a sealed homogenization automated operation, direct contact between medical staff and feces is avoided, eliminating the risks of odor, visual pollution, and cross-infection. Furthermore, homogenization solves the problem of fecal component dispersion. After homogenization, quantitative sampling and multimodal detection improve the accuracy of test results, enhance the accuracy of moisture content detection, and increase testing efficiency. In addition, the test data is automatically synchronized to the management system, making it convenient to develop personalized solutions.
[0026] Specifically, the steps of obtaining the packaging bag and performing a homogenization process to ensure uniform distribution of fecal components include: The packaging bag is placed in a negative pressure homogenization chamber, which is equipped with a low-speed rotating motor. The low-speed rotating motor drives the packaging bag to rotate and achieves uniform distribution of fecal components.
[0027] It should be noted that the negative pressure homogenization chamber uses vacuum to make the packaging bag fit tightly against the inner wall of the negative pressure homogenization chamber, forming a stable fixed space. The low-speed rotating motor drives the packaging bag to rotate around the inner axis of the chamber, so that the feces in the sealed bag are fully mixed.
[0028] Specifically, the packaging bag is equipped with a sampling positioning area, in which a highly elastic thickened composite film or an embedded highly elastic reinforcing layer is used to allow the sampling needle to be automatically sealed after being pulled out and to prevent sample leakage.
[0029] It should be noted that an annular high-elasticity silicone reinforcement layer is embedded inside the composite membrane in the sampling positioning area. When the sampling needle punctures, the silicone layer deforms synchronously with the membrane layer. After being pulled out, the elastic contraction force of the silicone layer further squeezes the edge of the hole, accelerating the sealing process. At the same time, the annular structure can disperse the puncture stress, avoid membrane tearing, and prevent leakage after puncture.
[0030] Specifically, fecal samples are quantitatively sampled using a disposable sampling needle through the sampling positioning area; The disposable sampling needle includes a self-sealing silicone spring cap, which includes a silicone body, a built-in stainless steel spring spring, and a sealing lip. When the disposable sampling needle pierces the sampling positioning area of the packaging bag, the silicone body is compressed by pressure and drives the spring spring to store energy. When the disposable sampling needle is pulled out, the spring spring releases its elasticity to reset the spring cap, and the sealing lip seals the sampling hole to prevent leakage of fecal samples.
[0031] It should be noted that the self-sealing silicone spring cap is highly elastic and biocompatible. When the sampling needle punctures the sealing bag, the silicone body undergoes axial compression deformation under the puncture pressure, which drives the built-in stainless steel spring spring to contract and store energy. During sampling, the sealing lip is tightly attached to the surface of the sampling needle to prevent fecal samples from spilling out along the needle body and avoid fecal leakage.
[0032] Specifically, before the step of homogenizing the packaged bag containing the fecal sample by the mixing unit, the process further includes: obtaining the net total weight of the fecal sample from the weight detection unit, and calculating the operation time and / or homogenization speed based on the net total weight.
[0033] It should be noted that before the homogenization operation of the packaging bag containing the fecal sample by the mixing unit, the operation time and / or the homogenization speed are calculated based on the net total weight. The weight detection unit transmits the net total weight data to the control module of the mixing unit in real time. The control module outputs instructions according to the mapping model to drive the low-speed rotating motor to adjust the speed and running time. The optimal speed and time are matched by the net total weight to improve the homogenization effect.
[0034] In summary, by sealing the packaging bags containing fecal samples, the problems of odor diffusion and visual pollution caused by fecal exposure in traditional manual testing are completely solved. At the same time, it avoids direct contact between medical staff and samples, eliminates the risk of cross-infection, and significantly reduces the resistance of medical staff.
[0035] To address the issue of dispersed fecal composition, homogenization is used to ensure uniform distribution of fecal components, overcoming the limitations of traditional visual recognition single-point detection. This provides a uniform sample for subsequent sampling and testing, ensuring that the test results accurately reflect the overall moisture content.
[0036] This method enables the quantitative acquisition and injection of homogeneous samples into test bottles, replacing traditional non-quantitative sampling methods, ensuring the representativeness and consistency of test samples, and further improving the reliability of test data.
[0037] Weight and spectral detection combined: The net total weight is obtained through the weight detection unit, and the spectral characteristic data of the quantitative sample are obtained by the near-infrared spectrometer. This eliminates the need for manual operation and long waiting time required by traditional drying methods, enabling rapid and non-destructive testing. Temperature compensation device: It corrects the interference of ambient temperature on spectral data in real time, solving the problem that spectral detection is easily affected by the environment, ensuring the accuracy of spectral characteristic data, and providing a reliable basis for subsequent calculations.
[0038] The temperature-corrected spectral data is input into the pre-trained model to automatically obtain the moisture content, and the total moisture content is calculated in combination with the net total weight, replacing manual calculation and experience judgment, reducing human error, and improving detection efficiency and result accuracy.
[0039] It automatically sends total water content data to the intake and output balance management system, achieving seamless integration between the detection data and the management system. This provides real-time and reliable data support for the precise management of individual water metabolism balance, solving the problem that traditional detection data cannot be effectively integrated into the management process.
[0040] Example 2 Based on Embodiment 1, this embodiment provides further technical solutions.
[0041] Specifically, the steps for obtaining spectral characteristic data of a quantitative sample inside a test bottle using a near-infrared spectrometer include: The near-infrared spectrometer used is a small grating-type near-infrared spectrometer with a spectral coverage range of 780-1700 nm and a resolution of 8-16 cm⁻¹. -1 Configured with a single InGaAs detector and temperature compensation module; The test bottle is made of quartz glass. After homogenization, the quantitative sample is placed in a constant temperature environment to equilibrate after eliminating air bubbles. During spectral acquisition, the baseline spectrum is obtained by scanning against the background of the test bottle. The balanced test bottle is placed in the sample cell and aligned with the center of the optical path. The number of scans, integration time, and single detection time are set. The original spectrum is preprocessed by normalization and spectral features of 1450nm and 1550-1700nm in the 780-1700nm band are extracted. Among them, 1450nm is the water characteristic peak and 1550-1700nm is the protein characteristic region. Principal component analysis is used to reduce the dimensionality to the top 5 principal components, which are then converted to JSON format and transmitted to the large model computing unit.
[0042] It should be noted that the grating-type spectrometer uses a diffraction grating to decompose near-infrared light from 780-1700 nm into monochromatic light of continuous wavelengths, accurately covering the overtone and combination frequencies of molecular vibrations. The single InGaAs detector exhibits high responsivity to near-infrared light, enabling rapid capture of weak spectral signals. The temperature compensation module monitors the ambient temperature in real time via a built-in thermocouple and performs linear correction on the spectral data, offsetting baseline drift caused by temperature changes. After homogenization, the quantitative sample is degassed and placed in a constant temperature environment (e.g., 25℃ ± 0.5℃) for equilibration, ensuring stable sample temperature and composition distribution and reducing spectral noise caused by temperature fluctuations or air bubbles. The baseline spectrum is scanned against an empty detection vial to remove background interference from the glass and environment. The original spectrum is then normalized to eliminate spectral intensity fluctuations caused by sample concentration differences or optical path shifts.
[0043] Specifically, the step of normalizing the original spectrum includes: The original spectra of the collected fecal samples were smoothed by local low-order polynomial fitting with a window size of 5-7 points and a polynomial order of 2 to eliminate random noise caused by uneven fecal particle size and viscosity, while preserving the shape and position of spectral characteristic peaks. By iteratively reweighting the baseline, high weights are assigned to background areas such as food residue and microorganisms in fecal samples, while low weights are assigned to peak areas of target components such as moisture and protein. Combined with a penalty term, baseline drift is suppressed, eliminating baseline shift and interference from non-target components caused by the complex background of fecal samples. The first derivative calculation with a difference interval of 5 points is used to enhance the resolution of overlapping peaks of water and protein in fecal samples, highlight the position of characteristic peaks and eliminate peak overlap caused by the mixing of fecal components. For each fecal sample spectrum, normalization was performed sample-by-sample to eliminate the heat dissipation effect caused by differences in fecal viscosity, so that the spectra of fecal samples in different physical states are comparable.
[0044] It should be noted that uneven fecal particle size and viscosity variations can introduce random noise into the spectrum, which can be smoothed out by second-order polynomial fitting. The window size controls the smoothing effect, and the second-order polynomial avoids overfitting of characteristic peaks, thus preserving their shape and position. The complex composition of fecal samples, including non-target components such as food residue and microorganisms, can cause baseline shifts. Weighting allows the baseline fitting to focus more on the background region, separating the target signal from background interference. The characteristic peaks of water and protein in feces may overlap due to component mixing. Water characteristic peaks are typically around 1450 nm, while protein characteristic peaks are around 1550-1700 nm. A 5-point differential interval balances noise suppression and peak sharpening, preventing the introduction of new noise due to excessively small intervals. Variations in fecal viscosity lead to different heat dissipation effects. Normalization converts the spectrum into a standard distribution with a mean of 0 and a standard deviation of 1, eliminating spectral intensity fluctuations caused by differences in physical states and making the spectra of different samples comparable. Layered processing gradually purifies the spectral signal, reducing noise and interference and improving the accuracy of fecal component detection.
[0045] Specifically, the temperature correction algorithm for temperature correction of spectral feature data is as follows: A temperature-spectral characteristic correction model was pre-established for the characteristic peaks of moisture and the characteristic regions of protein in fecal samples. The model training steps include collecting spectral data of standard fecal samples in the 20℃-30℃ range, and fitting a second-order polynomial relationship between the characteristic peak intensity and temperature: I corr =I raw +a×(T-T0)+b×(T-T0) 2 , among which, I corr To determine the intensity of the corrected characteristic peak, I raw The original spectral intensity is given, with T0=25℃ as the reference temperature. The model coefficients optimized for fecal samples are as follows: moisture peak a=-0.003, b=0.0001, protein region a=-0.0025, b=0.00008. The real-time correction step includes using a second-order polynomial relationship to calculate the intensity of the characteristic peaks of the current spectrum in real time, thereby eliminating the influence of temperature fluctuations on the shift of spectral characteristics.
[0046] It should be noted that by using the spectral data of standard samples at different temperatures, the model learns how temperature changes affect spectral intensity shifts. Automated homogenization avoids direct contact between medical personnel and feces, eliminating the risks of odor, visual contamination, and cross-infection. Furthermore, homogenization solves the problem of fecal component dispersion. Quantitative sampling and multimodal detection after homogenization improve the accuracy of test results, enhance the accuracy of moisture content detection, and increase testing efficiency. The test data is also automatically synchronized to the management system, facilitating the development of personalized solutions.
[0047] Specifically, the steps of inputting temperature-corrected spectral feature data into a pre-trained model to obtain the moisture content of fecal samples, and calculating the total moisture content of fecal samples based on the moisture content and the net total weight of the fecal samples include: A robust prediction model is constructed and deployed. The spectral characteristic data of the sample to be tested after temperature correction is input into the model and the predicted water content W is output. The net total weight of the fecal sample is calculated as: total weight of the packaging bag and the fecal sample - weight of the packaging bag; The total water content of the fecal sample is calculated as net total weight of the fecal sample × W / 100.
[0048] It should be noted that the robust model can adapt to complex fecal samples containing food residues and microorganisms, improving the accuracy of moisture content detection. The net total weight is traceable through two weighing records, the moisture content prediction is reproducible through model cross-validation, and the total moisture content result can be traced back to the original spectral and weight data, thus improving accuracy.
[0049] Specifically, it also includes: The homogenization unit includes an electromagnetic vibration homogenizer disposed at the bottom of the acquisition cell of the near-infrared spectrometer, the electromagnetic vibration homogenizer carrying the detection bottle and coaxially aligned with the optical path of the spectrometer. The homogenization unit is triggered after the weight detection unit acquires the net total weight of the fecal sample in the sealed bag and before the near-infrared spectrometer acquires the spectral characteristic data of the quantitative sample in the detection bottle. The basic vibration frequency of the homogenization unit is 50Hz±2Hz, amplitude is 0.5mm±0.1mm, duration is 2s±0.2s, and after homogenization, it is left to stand for at least 0.5s and the spectrum is pre-acquired twice. If the intensity deviation of the 1450nm moisture peak is less than 1%, proceed to formal spectral acquisition; otherwise, repeat the homogenization operation a maximum of 2 times.
[0050] It should be noted that a battery vibration homogenizer is incorporated into the homogenization unit to avoid spectral noise caused by uneven particle size. Automated, sealed homogenization avoids direct contact between medical personnel and feces, eliminating the risks of odor, visual contamination, and cross-infection. Furthermore, homogenization resolves the issue of fecal component dispersion. Post-homogenization quantitative sampling and multimodal detection improve the accuracy of test results, enhance the accuracy of moisture content detection, and increase testing efficiency. The test data is automatically synchronized to the management system, facilitating the development of personalized treatment plans.
[0051] Example 3 See Figure 2As shown, this embodiment provides an automated method for detecting fecal moisture content, applied to an automated fecal moisture content detection system of Embodiment 1 or Embodiment 2. The automated fecal moisture content detection method of this embodiment includes the following steps: S1: Obtain a sealed bag containing a fecal sample and seal the sealed bag; S2: Homogenize the sealed packaging bag to ensure that the fecal components inside the packaging bag are evenly distributed. S3: Quantitatively sample the fecal sample inside the homogenized packaging bag, obtain the quantitative sample and inject it into the test bottle; S4: Obtain the net total weight of the fecal sample in the packaging bag through the weight detection unit; obtain the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer; detect the temperature of the near-infrared detection environment in real time through the temperature compensation device, and use the temperature to perform temperature correction on the spectral characteristic data; S5: Input the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample; calculate the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. S6: Send the total moisture content of the fecal sample in the packaging bag to the processing module of the inflow-outflow balance management system.
[0052] It is worth noting the specific process of inputting temperature-corrected spectral feature data into a pre-trained model to obtain the moisture content of fecal samples, and then calculating the total water content of the fecal sample based on the moisture content and the net total weight of the fecal sample: A robust prediction model was constructed and deployed for fecal samples. The model type was partial least squares regression, and it was optimized for fecal moisture and protein characteristics. Using ≥500 standard fecal samples, the top 5 principal components of the temperature-corrected spectra were used as input, and the corresponding measured moisture content by drying method was used as output. The optimal number of principal components was determined by 5-fold cross-validation. The average absolute error of the predicted moisture content is ≤2%, and the coefficient of determination is ≥0.95; The spectral characteristic data of the sample after temperature correction are input into the prediction model and the predicted water content is output.
[0053] It should be noted that the total water content of feces is a key indicator of water metabolism. After calculating the total water content of feces using the automated fecal water content detection system described in Example 1 or Example 2, water metabolism can be assessed based on the total water content and other data. In this example, the sample is sealed in a packaging bag to prevent leakage, and then homogenized mechanically. The net total weight is obtained by weight detection, the component characteristics are obtained by near-infrared spectroscopy, and the environmental parameters are obtained by temperature detection. A pre-trained model establishes a mapping between spectral characteristics and water content, and the total water content is calculated and derived by combining the net total weight.
[0054] Example 4 See Figure 3 As shown, this embodiment provides a method for managing the balance of inflow and outflow, including the following steps: P1: Real-time data on an individual's water intake, food water content, and diet type are obtained through smart terminals; P2: Calculate the total water content of an individual's urine output, drainage fluid volume, vomit, and feces. The calculation steps for the total water content of feces include: obtaining a sealed bag containing a fecal sample and sealing the bag; homogenizing the sealed bag to ensure uniform distribution of fecal components within the bag; quantitatively sampling the fecal sample from the homogenized bag and injecting the quantitative sample into a test bottle; obtaining the net total weight of the fecal sample from the sealed bag using a weight detection unit; obtaining the spectral characteristic data of the quantitative sample from the test bottle using a near-infrared spectrometer; real-time monitoring of the near-infrared detection environment temperature using a temperature compensation device and temperature correction of the spectral characteristic data using the temperature; inputting the temperature-corrected spectral characteristic data into a pre-trained model to obtain the water content of the fecal sample; calculating the total water content of the fecal sample based on the water content and the net total weight of the fecal sample; and sending the total water content of the fecal sample from the sealed bag to the processing module of the inflow-outflow balance management system. P3: By integrating an individual's water intake, food water content, diet type data, urine output, and total fecal water content through the processing module, a real-time water metabolism balance model is constructed, and balance status assessment results are generated. P4: Based on the assessment results of the balance between intake and output, output suggestions for adjusting water intake or optimization of fecal testing frequency.
[0055] It should be noted that total fecal water content is a key indicator of water metabolism. After calculating the total fecal water content using the automated fecal water content detection system described in Example 1 or Example 2, water metabolism is assessed based on the total fecal water content and other data. Based on personalized physiological data, dynamic adjustments to the treatment plan can be achieved. Through automated, sealed homogenization operations, direct contact between medical personnel and feces is avoided, eliminating the risks of odor, visual contamination, and cross-infection. Homogenization also solves the problem of fecal component dispersion. Quantitative sampling and multimodal detection after homogenization improve the accuracy of the test results, enhance the accuracy of water content detection, and increase testing efficiency. Furthermore, the test data is automatically synchronized to the management system, facilitating the development of personalized treatment plans.
[0056] It is important to note that monitoring a patient's fluid balance is the core of disease management, and it is divided into two main categories: intake and output. These are crucial indicators for assessing the patient's condition. Intake includes oral fluids, the water content of food, intravenous fluids, and other fluids received. Output includes urine, feces, vomit, and drainage fluids.
[0057] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size should still fall within the scope of the technical content disclosed in this application, provided that they do not affect the effects and purposes that this application can produce.
[0058] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0059] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0060] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. An automated fecal moisture content detection system, characterized in that, include: The dispensing unit obtains and seals the packaging bags containing the fecal samples; The mixing unit obtains the packaging bag and performs a homogenization operation to ensure that the fecal components are evenly distributed. The sampling unit performs quantitative sampling on uniformly distributed fecal samples to obtain quantitative samples and injects them into the test bottle; The multimodal detection unit obtains the net total weight of the fecal sample in the packaging bag through the weight detection unit, acquires the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer, and detects the temperature of the near-infrared detection environment in real time through the temperature compensation device and performs temperature correction on the spectral characteristic data. The large model calculation unit inputs the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample, and calculates the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. The data transmission unit sends the total moisture content of the fecal sample inside the sealed bag to the processing module of the inflow-outflow balance management system.
2. The automated fecal moisture content detection system according to claim 1, characterized in that, The steps of obtaining the packaging bag and performing homogenization to ensure uniform distribution of fecal components include: The packaging bag is placed in a negative pressure homogenization chamber, which is equipped with a low-speed rotating motor. The low-speed rotating motor drives the packaging bag to rotate and achieves uniform distribution of fecal components.
3. The automated fecal moisture content detection system according to claim 1, characterized in that, The packaging bag is equipped with a sampling positioning area, in which a highly elastic thickened composite film or an embedded highly elastic reinforcing layer is used to allow the sampling needle to be automatically sealed after it is pulled out and to prevent sample leakage.
4. The automated fecal moisture content detection system according to claim 3, characterized in that, Quantitative sampling of fecal samples is performed using a disposable sampling needle through the sampling positioning area; The disposable sampling needle includes a self-sealing silicone spring cap, which includes a silicone body, a built-in stainless steel spring spring, and a sealing lip. When the disposable sampling needle pierces the sampling positioning area of the packaging bag, the silicone body is compressed by pressure and drives the spring spring to store energy. When the disposable sampling needle is pulled out, the spring spring releases its elasticity to reset the spring cap, and the sealing lip seals the sampling hole to prevent leakage of fecal samples.
5. The automated fecal moisture content detection system according to claim 1, characterized in that, Before the step of homogenizing the packaged bag containing the fecal sample by the mixing unit, the process further includes: obtaining the net total weight of the fecal sample from the weight detection unit, and calculating the operation time and / or homogenization speed based on the net total weight.
6. The automated fecal moisture content detection system according to claim 1, characterized in that, The steps for obtaining spectral characteristic data of quantitative samples in a detection bottle using a near-infrared spectrometer include: The near-infrared spectrometer used is a small grating-type near-infrared spectrometer with a spectral coverage range of 780-1700 nm and a resolution of 8-16 cm⁻¹. -1 Configured with a single InGaAs detector and temperature compensation module; The test bottle is made of quartz glass. After homogenization, the quantitative sample is placed in a constant temperature environment to equilibrate after eliminating air bubbles. During spectral acquisition, the baseline spectrum is obtained by scanning against the background of the test bottle. The balanced test bottle is placed in the sample cell and aligned with the center of the optical path. The number of scans, integration time, and single detection time are set. The original spectrum is preprocessed by normalization and spectral features of 1450nm and 1550-1700nm in the 780-1700nm band are extracted. Among them, 1450nm is the water characteristic peak and 1550-1700nm is the protein characteristic region. Principal component analysis is used to reduce the dimensionality to the top 5 principal components, which are then converted to JSON format and transmitted to the large model computing unit.
7. The automated fecal moisture content detection system according to claim 6, characterized in that, The step of normalizing the original spectrum includes: The original spectra of the collected fecal samples were smoothed by local low-order polynomial fitting with a window size of 5-7 points and a polynomial order of 2 to eliminate random noise caused by uneven fecal particle size and viscosity, while preserving the shape and position of spectral characteristic peaks. By iteratively reweighting the baseline, high weights are assigned to background areas such as food residue and microorganisms in fecal samples, while low weights are assigned to peak areas of target components such as moisture and protein. Combined with a penalty term, baseline drift is suppressed, eliminating baseline shift and interference from non-target components caused by the complex background of fecal samples. The first derivative calculation with a difference interval of 5 points is used to enhance the resolution of overlapping peaks of water and protein in fecal samples, highlight the position of characteristic peaks and eliminate peak overlap caused by the mixing of fecal components. For each fecal sample spectrum, normalization was performed sample by sample. The mean of the spectrum was subtracted and the result was divided by the standard deviation to eliminate the heat dissipation effect caused by the difference in fecal viscosity, so that the spectra of fecal samples in different physical states are comparable.
8. The automated fecal moisture content detection system according to claim 1, characterized in that, The temperature correction algorithm for temperature correction of spectral feature data is as follows: A temperature-spectral characteristic correction model was pre-established for the characteristic peaks of moisture and the characteristic regions of protein in fecal samples. The model training steps include collecting spectral data of standard fecal samples in the 20℃-30℃ range, and fitting a second-order polynomial relationship between the characteristic peak intensity and temperature: I corr =I raw +a×(T-T0)+b×(T-T0) 2 , among which, I corr To determine the intensity of the corrected characteristic peak, I raw The original spectral intensity is given, with T0=25℃ as the reference temperature. The model coefficients optimized for fecal samples are as follows: moisture peak a=-0.003, b=0.0001, protein region a=-0.0025, b=0.00008. The real-time correction step includes using a second-order polynomial relationship to calculate the intensity of the characteristic peaks of the current spectrum in real time, thereby eliminating the influence of temperature fluctuations on the shift of spectral characteristics.
9. The automated fecal moisture content detection system according to claim 1, characterized in that, The steps of inputting temperature-corrected spectral feature data into a pre-trained model to obtain the moisture content of fecal samples, and calculating the total moisture content of fecal samples based on the moisture content and the net total weight of the fecal samples include: A robust prediction model is constructed and deployed. The spectral characteristic data of the sample to be tested after temperature correction is input into the model and the predicted water content W is output. The net total weight of the fecal sample is calculated as: total weight of the packaging bag and the fecal sample - weight of the packaging bag; The total water content of the fecal sample is calculated as net total weight of the fecal sample × W / 100.
10. The automated fecal moisture content detection system according to claim 1, characterized in that, Also includes: The homogenization unit includes an electromagnetic vibration homogenizer disposed at the bottom of the acquisition cell of the near-infrared spectrometer, the electromagnetic vibration homogenizer carrying the detection bottle and coaxially aligned with the optical path of the spectrometer. The homogenization unit is triggered after the weight detection unit acquires the net total weight of the fecal sample in the sealed bag and before the near-infrared spectrometer acquires the spectral characteristic data of the quantitative sample in the detection bottle. The basic vibration frequency of the homogenization unit is 50Hz±2Hz, amplitude is 0.5mm±0.1mm, duration is 2s±0.2s, and after homogenization, it is left to stand for at least 0.5s and the spectrum is pre-acquired twice. If the intensity deviation of the 1450nm moisture peak is less than 1%, proceed to formal spectral acquisition; otherwise, repeat the homogenization operation a maximum of 2 times.
11. An automated method for detecting the moisture content of feces, characterized in that, Including the following steps: S1: Obtain a sealed bag containing a fecal sample and seal the sealed bag; S2: Homogenize the sealed packaging bag to ensure that the fecal components inside the packaging bag are evenly distributed. S3: Quantitatively sample the fecal sample inside the homogenized packaging bag, obtain the quantitative sample and inject it into the test bottle; S4: Obtain the net total weight of the fecal sample in the packaging bag through the weight detection unit; obtain the spectral characteristic data of the quantitative sample in the detection bottle through the near-infrared spectrometer; detect the temperature of the near-infrared detection environment in real time through the temperature compensation device, and use the temperature to perform temperature correction on the spectral characteristic data; S5: Input the temperature-corrected spectral feature data into the pre-trained model to obtain the moisture content of the fecal sample; calculate the total moisture content of the fecal sample based on the moisture content and the net total weight of the fecal sample. S6: Send the total moisture content of the fecal sample in the packaging bag to the processing module of the inflow-outflow balance management system.
12. A method for managing the balance of input and output, characterized in that, Including the following steps: P1: Real-time data on an individual's water intake, food water content, and diet type are obtained through smart terminals; P2: Calculate the amount of urine output, drainage fluid, vomit and total water content of feces of an individual, wherein the calculation steps of total water content of feces include obtaining a package containing a fecal sample and sealing the package. The sealed packaging bag is homogenized to ensure uniform distribution of fecal components within it. A quantitative sample of the fecal sample from the homogenized bag is then obtained and injected into a testing bottle. The net total weight of the fecal sample from the packaging bag is determined using a weight detection unit. Spectral characteristic data of the quantitative sample from the testing bottle is acquired using a near-infrared spectrometer. The temperature of the near-infrared detection environment is monitored in real-time using a temperature compensation device, and the spectral characteristic data is temperature-corrected using this temperature. The temperature-corrected spectral characteristic data is input into a pre-trained model to obtain the moisture content of the fecal sample. Based on the moisture content and the net total weight of the fecal sample, the total moisture content of the fecal sample is calculated. The total moisture content of the fecal sample from the packaging bag is then sent to the processing module of the inflow-outflow balance management system. P3: By integrating an individual's water intake, food water content, diet type data, urine output, and total fecal water content through the processing module, a real-time water metabolism balance model is constructed, and balance status assessment results are generated. P4: Based on the assessment results of the balance between intake and output, output suggestions for adjusting water intake or optimization of fecal testing frequency.