A defecation difficulty detection method, device, equipment and storage medium
By acquiring defecation point cloud data using millimeter-wave radar, extracting features, and calculating defecation frequency and strain index, behavioral sequences are constructed, solving the problem of low accuracy in detecting defecation difficulties and enabling personalized defecation difficulty detection and graded early warning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI SONGCHUNGUO HEALTH TECH CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-05-29
Smart Images

Figure CN122117422A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent health monitoring technology, and in particular to a method, device, equipment, and storage medium for detecting defecation difficulties. Background Technology
[0002] With the acceleration of population aging and the improvement of health management awareness, the demand for home-based elderly care and remote health monitoring is becoming increasingly prominent. The demand for long-term monitoring and abnormal detection of defecation behavior is growing. Symptoms such as abnormal defecation frequency and difficulty in defecation are not only manifestations of digestive system diseases such as constipation, but may also indicate health problems such as pelvic floor muscle weakness, nervous system lesions, or even colorectal tumors.
[0003] Currently, the diagnosis of functional constipation or defecation difficulty uses the internationally recognized Rome IV criteria, which comprehensively assesses indicators such as defecation frequency and effort. However, traditional diagnostic methods rely on patient self-reporting, which suffers from recall bias and the inability to continuously monitor, making it difficult to objectively quantify long-term changes in defecation behavior. Millimeter-wave radar, as a non-contact sensor, has advantages in toilet behavior recognition, including non-contact sensing, privacy protection, and strong environmental adaptability. However, existing radar-based toilet behavior recognition methods lack the ability to quantify indicators such as defecation duration and effort, and have not established a correlation mapping with the Rome IV criteria, thus reducing the accuracy of identifying defecation difficulties. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and storage medium for detecting defecation difficulties, the main purpose of which is to solve the problem of low accuracy in detecting defecation difficulties.
[0005] To achieve the above objectives, the present invention provides a method for detecting defecation difficulties, comprising: Acquire defecation point cloud data in a restroom setting, and extract micro-motion features, temporal dynamic features, and behavioral features of the target user from the defecation point cloud data; The defecation frequency, defecation duration, and defecation effort index of the target user are calculated based on the micro-motion characteristics, the temporal dynamic characteristics, and the behavioral characteristics, respectively. A defecation behavior sequence is constructed based on the defecation frequency, defecation duration, and defecation effort index, and the defecation habit intervals in the defecation behavior sequence are analyzed. The proportion of abnormal bowel movements of the target user is calculated based on the bowel habit interval and the bowel behavior sequence. The level of defecation difficulty for the target user is determined based on the proportion of abnormal defecation.
[0006] The present invention also provides a device for detecting defecation difficulties, the device comprising: The feature extraction module is used to acquire defecation point cloud data in a restroom setting, and extract the micro-motion features, temporal dynamic features, and behavioral features of the target user from the defecation point cloud data. The defecation index calculation module is used to calculate the defecation frequency, defecation duration, and defecation effort index of the target user based on the micro-motion characteristics, the temporal dynamic characteristics, and the behavioral characteristics, respectively. The defecation habit interval analysis module is used to construct a defecation behavior sequence based on the defecation frequency, the defecation duration, and the defecation effort index, and to analyze the defecation habit intervals in the defecation behavior sequence. The defecation abnormality ratio calculation module is used to calculate the defecation abnormality ratio of the target user based on the defecation habit interval and the defecation behavior sequence. The defecation difficulty level determination module is used to determine the defecation difficulty level of the target user based on the proportion of abnormal defecation.
[0007] The present invention also provides an electronic device, the electronic device comprising: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the defecation difficulty detection method described above.
[0008] The present invention also provides a computer-readable storage medium storing at least one computer program, which is executed by a processor in an electronic device to implement the above-described method for detecting defecation difficulties.
[0009] This invention acquires defecation point cloud data in a restroom setting using millimeter-wave radar, extracting the target user's micro-motion features, temporal dynamic features, and behavioral features. This allows for the quantification of defecation effort, and the construction of a defecation behavior sequence based on defecation frequency, duration, and effort index. Further analysis of defecation habit intervals allows for adaptation of defecation difficulty detection to different individual habits, improving accuracy. By combining the proportion of abnormal defecation with the Rome IV standard to analyze the level of defecation difficulty, it effectively identifies functional constipation, defecation difficulty, and normal defecation states, generating tiered early warning results. This improves the accuracy of defecation difficulty detection in intelligent health monitoring scenarios. Therefore, the defecation difficulty detection method, device, equipment, and storage medium proposed in this invention can solve the problem of low accuracy in defecation difficulty detection. Attached Figure Description
[0010] Figure 1This is a flowchart illustrating a method for detecting defecation difficulties according to an embodiment of the present invention. Figure 2 This is a schematic flowchart illustrating the calculation of the comprehensive index of defecation effort according to an embodiment of the present invention; Figure 3 This is a functional block diagram of a defecation difficulty detection device provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device for implementing the defecation difficulty detection method according to an embodiment of the present invention.
[0011] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0012] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0013] To address the problems of inaccurate assessment of defecation effort, insufficient adaptation to individual habit differences, and low clinical diagnostic accuracy caused by the lack of multidimensional quantification of defecation behavior and mapping to the Rome IV standard in existing defecation difficulty detection methods, an embodiment of the present invention provides a defecation difficulty detection method. This method collects defecation point cloud data using millimeter-wave radar, extracts micro-motion features, temporal dynamic features, and behavioral features, and then calculates defecation frequency, defecation duration, and defecation effort index through feature fusion to construct defecation habit intervals. The level of defecation difficulty is determined based on the proportion of abnormal defecation, which can improve the accuracy of defecation difficulty detection.
[0014] Reference Figure 1 The diagram shown is a flowchart illustrating a method for detecting defecation difficulties according to an embodiment of this application. In this embodiment, the method for detecting defecation difficulties includes: S1. Obtain defecation point cloud data in the bathroom scenario, and extract the micro-motion features, temporal dynamic features, and behavioral features of the target user from the defecation point cloud data.
[0015] In this embodiment of the invention, the defecation point cloud data is a set of three-dimensional spatial points of the target user during defecation. Each three-dimensional spatial point contains the horizontal coordinate information, vertical coordinate information, height information, velocity information, and energy information of that point in the bathroom scene. The velocity information reflects the speed of movement of the three-dimensional spatial point in the line of sight of the millimeter-wave radar. This invention can reflect the spatial position changes and subtle movements of the human body during defecation through the horizontal coordinate information, vertical coordinate information, height information, and velocity information in the defecation point cloud data without collecting image or audio information.
[0016] In detail, a multi-channel millimeter-wave radar, either one transmitting and multiple receiving or multiple transmitting and multiple receiving, can be selected to continuously transmit electromagnetic waves into the restroom scene. The millimeter-wave radar receives the echo signals reflected by the human body and the environment, and after amplification, mixing, ADC sampling, fast Fourier transform, clutter suppression, target detection and angle estimation, defecation point cloud data containing rich human physical information is obtained.
[0017] Among them, millimeter-wave radar continuously acquires data at a fixed frame rate. Each frame corresponds to a frame of point cloud data acquired at a sampling time. This frame of point cloud data contains the set of all detected three-dimensional spatial points at that sampling time.
[0018] In this embodiment of the invention, micro-motion characteristics refer to the quantitative indicators of subtle tremors or high-frequency vibrations produced by the human body during defecation due to abdominal straining and muscle tension; temporal dynamic characteristics refer to the temporal change pattern of the overall movement of the human body during defecation, such as the changing trend of the speed and intensity of body swaying; behavioral characteristics refer to the movement patterns of the human body during toileting, including behavioral transitions such as sitting down and standing up, as well as the posture category of the body.
[0019] In this embodiment of the invention, the extraction of micro-motion features, temporal dynamic features, and behavioral features of a target user from defecation point cloud data includes: calculating the temporal dynamic features of the target user based on the horizontal coordinate information, vertical coordinate information, height information, and energy information in the defecation point cloud data; analyzing the micro-motion features of the target user based on the velocity information in the defecation point cloud data; obtaining the centroid height of the target user; and calculating the behavioral features of the target user based on the centroid height.
[0020] In this embodiment of the invention, the energy information of each three-dimensional spatial point in the defecation point cloud data reflects the intensity of electromagnetic wave reflection by the human target at that location. Because the main torso (chest, abdomen, and back) of the human body has a larger radar cross-section than the limbs, the energy information of the torso region is significantly higher than that of the limbs region. In order to improve the accuracy of calculating the centroid position of the target user, this invention uses the energy information of each three-dimensional spatial point as weights and performs a weighted average of the abscissa, ordinate, and height information of all three-dimensional spatial points at each sampling time to obtain the centroid coordinates (x, y, z) of the target user at each sampling time.
[0021] In detail, the Euclidean distance between the centroid coordinates at adjacent sampling times is calculated, and the Euclidean distance is divided by the time difference between adjacent sampling times to obtain the movement speed at adjacent times. All movement speeds of the target user during defecation are summarized in chronological order to obtain the speed time series.
[0022] Specifically, the first-order difference of all motion velocities in the velocity time series is calculated to obtain the velocity change rate within adjacent sampling times. All velocity change rates are then summarized in chronological order to obtain a velocity change rate sequence. The mean and variance of the motion velocities in the velocity time series, as well as the mean of the velocity change rate sequence, are calculated. Simultaneously, the peak velocity change rate in the velocity change rate sequence is extracted. The mean, variance, mean change rate, and peak velocity change rate are combined to form the temporal dynamic features.
[0023] In this embodiment of the invention, the velocity variance of the velocity information corresponding to all three-dimensional spatial points in the defecation point cloud data at each sampling time is calculated, and the velocity variances are arranged in chronological order to obtain a velocity variance sequence. The velocity variance sequence can be subjected to bandpass filtering or wavelet decomposition. The passband frequency range of the bandpass filter or the characteristic frequency range of the wavelet decomposition is set to 0.5 to 5 Hz. This frequency range corresponds to the high-frequency components of defecation-related micro-movements such as abdominal strain and muscle tension, thereby obtaining a high-frequency micro-movement signal sequence. The time integral or root mean square value of each high-frequency micro-movement signal in the high-frequency micro-movement signal sequence at multiple sampling times is calculated to obtain the high-frequency micro-movement energy. The number of sampling times where the high-frequency micro-movement energy exceeds a preset energy threshold is counted. The number of sampling times is multiplied by the frame interval time to obtain the duration of the high-frequency micro-movement. The frame interval time is the reciprocal of the fixed frame rate. The high-frequency micro-movement energy and the duration of the high-frequency micro-movement are combined to form a micro-movement feature.
[0024] Furthermore, the centroid height (y) in the centroid coordinates of the target user at each sampling time is extracted. When the centroid height is detected to drop rapidly from the standing threshold (e.g., above 1.2 meters) to the sitting threshold (e.g., below 0.8 meters), it is identified as a sitting action. The total value of the centroid height drop is recorded as the sitting action amplitude, and the duration of the drop is recorded. The end time of the drop duration is taken as the start time of the defecation behavior. In this embodiment of the invention, when the target user's center of gravity height is detected to rise rapidly from the sitting threshold to the standing threshold, it is identified as a standing action. The duration of the rise is recorded, and the end time of the rise duration is taken as the end time point of the defecation behavior. At the same time, a posture classification model can be used to determine the posture category of the human body at the sampling time (such as sitting, half-squatting, or standing). Finally, the sitting action amplitude, start time point, rise duration, end time point, and posture category are encoded and combined to obtain behavioral features.
[0025] S2. Calculate the defecation frequency, defecation duration, and defecation effort index of the target user based on micro-motion characteristics, temporal dynamic characteristics, and behavioral characteristics, respectively.
[0026] In this embodiment of the invention, defecation frequency is the total number of defecation behaviors that the target user has in a single day; defecation duration is the duration of a single defecation behavior from the start time to the end time; and defecation effort index is the degree of physiological effort exerted by the target user during defecation, such as the intensity of abdominal strain, muscle tension, and other behaviors, which is indirectly quantified.
[0027] In this embodiment of the invention, the defecation frequency, defecation duration, and defecation effort index of the target user are calculated based on micro-motion characteristics, temporal dynamic characteristics, and behavioral characteristics, respectively. This includes: extracting the start and end times of defecation behavior within a single day from the behavioral characteristics, and calculating the defecation duration of a single defecation session based on the start and end times; counting the start times to obtain the defecation frequency of the target user within a single day; and calculating the maximum micro-motion intensity during a single defecation session based on the micro-motion characteristics and temporal dynamic characteristics, using the maximum micro-motion intensity as the defecation effort index of the target user.
[0028] In detail, the start and end times of each defecation behavior are extracted from behavioral characteristics, and the time difference between the two is calculated as the duration of a single defecation. The start times of all defecation behaviors within a single day are counted to obtain the number of defecation occurrences per day, i.e., the defecation frequency. At the same time, the maximum value of all defecation durations within a single day is recorded as the longest defecation duration per day.
[0029] Specifically, high-frequency micro-motion energy is extracted from micro-motion characteristics during a single defecation process, and the peak value of the rate of change of velocity during a single defecation process is extracted from temporal dynamic characteristics. The product of high-frequency micro-motion energy and peak value of rate of change of velocity is calculated to obtain the maximum micro-motion intensity during a single defecation process. The maximum micro-motion intensity is determined as the defecation effort index for a single defecation process. The defecation effort index reflects the maximum physiological effort during a single defecation process.
[0030] S3. Construct a defecation behavior sequence based on defecation frequency, defecation duration, and defecation effort index, and analyze the defecation habit intervals in the defecation behavior sequence.
[0031] In this embodiment of the invention, the defecation behavior sequence is a structured data set formed by arranging the quantitative characteristics of defecation events of a target user over multiple consecutive days in chronological order. A single defecation event includes defecation indices such as the date of occurrence, start time, end time, duration of defecation, and force index of defecation. Defecation events are aggregated daily to form daily-scale statistics such as daily defecation frequency, longest daily defecation duration, and maximum force exerted during daily defecation. The daily-scale statistics and defecation events are aggregated in chronological order to obtain the defecation behavior sequence.
[0032] In detail, multiple statistics such as the daily defecation frequency f1(d), the set of defecation indices corresponding to each defecation event within the day f2(d), the longest daily defecation duration f3(d), and the maximum daily defecation effort index f4(d) are integrated to form a multi-dimensional vector such as Fdefec(d)=[f1(d),f2(d),f3(d),f4(d)], where d is the time identifier of a certain day. The daily defecation behavior statistical vectors are arranged into a time series {Fdefec(1),Fdefec(2),...,Fdefec(D)} according to the date sequence, which is the defecation behavior sequence of the target user.
[0033] In this embodiment of the invention, the defecation habit range is derived from the statistical analysis of long-term defecation behavior data of the target user. It reflects the range of characteristic values of the target user's normal defecation behavior pattern. Within this range of characteristic values, the user's habitual defecation state can be regarded.
[0034] In this embodiment of the invention, analyzing the defecation habit interval in the defecation behavior sequence includes: combining the defecation behavior sequence into a defecation behavior matrix according to a preset time window; performing probability distribution fitting on each behavior component in the defecation behavior matrix to obtain a probability model for each behavior component; calculating the lower bound and upper bound of the quantile for each behavior component based on a preset confidence criterion and probability model; and determining the interval between the lower bound and the upper bound of the quantile as the defecation habit interval of the behavior component.
[0035] In detail, an analysis window of length D days can be selected (e.g., D=30 days or 90 days). The statistics of defecation behavior for each day within the analysis window are stacked row by row to form a multidimensional matrix M_defec. The row index of the multidimensional matrix corresponds to different behavioral components (such as f1(d), f2(d) etc.), and the column index corresponds to different dates (day 1 to day D). That is, M_defec=[[f1(1),f1(2),...,f1(D)]...[f4(1),f4(2),...,f4(D)]]. The defecation behavior matrix records the quantitative characteristics of the user's defecation behavior over D consecutive days.
[0036] Specifically, by using a predefined mapping function Φ (Φ: fi(1:D)→βfi), each behavioral component in the defecation behavior matrix is mapped to a probability model βfi. The probability models corresponding to all behavioral components are combined to obtain the set of probability models for each behavioral component, Bdefec={βf1,βf2,...βfn}.
[0037] In this embodiment of the invention, the probabilistic model is a defecation behavior matrix constructed based on the defecation behavior data of the target user over several consecutive days. A mathematical distribution model is established after statistical analysis of each behavioral component (such as defecation frequency, defecation duration, defecation force index, etc.) in the defecation behavior matrix. The mathematical distribution model describes the distribution law of the behavioral component under normal physiological conditions through the form of probability density function or cumulative distribution function. The mathematical distribution model can be fitted using parametric distribution (such as normal distribution, gamma distribution, lognormal distribution, etc.) or non-parametric distribution (such as kernel density estimation), transforming the user's defecation behavior data into a quantifiable probabilistic description.
[0038] Furthermore, a confidence criterion α (e.g., α = 0.05) is set for the probability model βf of each behavioral component. i Using the inverse function of the cumulative distribution function of the probability model (i.e., the quantile function Q_f) i (p)), calculate the lower bound L_f of the quantile. i (α)=Q_f i (α / 2), which is the value at α / 2 on the left side of the probability density, and the upper bound U_f of the quantile is also calculated. i (α)=Q_f i (1-α / 2), which is the value at α / 2 on the right side of the probability density, and the lower and upper bounds of the quantiles are the lower and upper limits of the normal fluctuation range of the component, respectively.
[0039] In this embodiment of the invention, for each behavioral component, the lower bound L_f of the quantile corresponding to the behavioral component is... i (α) and the upper bound of the quantile U_f i The closed interval between (α) is defined as the defecation habit interval of this behavioral component [L_f] i (α),U_f i (α)], which ultimately forms a set containing multiple behavioral component habit intervals for subsequent defecation abnormality detection.
[0040] In the embodiments of the present invention, see Figure 2 As shown, the analysis of defecation habit intervals in the defecation behavior sequence also includes: S21, calculating the mean and standard deviation of defecation duration and defecation effort index according to the probability model; S22, calculating the duration behavior score and effort behavior score of a single defecation behavior within a day according to the mean and standard deviation; S23, weighting and fusing the duration behavior score and effort behavior score to obtain the comprehensive defecation effort index of the target user for each defecation behavior within a day.
[0041] In detail, if the probability model corresponding to defecation duration or defecation effort index is fitted with a normal distribution, the mean and standard deviation of the probability model can be obtained directly; if other distributions (such as gamma distribution or log-normal distribution) are used for fitting, the expected value and variance of the other distribution are calculated first, and then converted into equivalent mean and standard deviation, so as to obtain the mean and standard deviation of defecation duration and defecation effort index.
[0042] In this embodiment of the invention, for a single defecation event within a single day, the defecation duration and defecation effort index of that single defecation event are obtained, and the duration behavior score and effort behavior score are calculated respectively according to the following formulas:
[0043] in, Indicates the number of days within a single day Behavioral score for each defecation event This represents the mean. Indicates standard deviation, Indicates that the index is The numerical value of the behavioral component at time.
[0044] In this embodiment of the invention, the behavior score reflects the degree to which a single defecation deviates from personal habits. A positive score indicates that the level is higher than the habitual level, and a negative score indicates that the level is lower than the habitual level. The larger the absolute value, the greater the degree of deviation.
[0045] Specifically, the duration score and strain score of a single defecation event are weighted and combined according to the following formula:
[0046] in, Indicates the first The overall index of defecation effort in each defecation event. and The preset weighting coefficients, Indicates that the index is Duration of behavior score, Indicates that the index is The score for the forceful action.
[0047] In this embodiment of the invention, the weighting coefficients are configured based on the importance of each behavioral component in representing the effort required for defecation. and Must meet + =1.
[0048] S4. Calculate the proportion of abnormal bowel movements of the target user based on the bowel habit interval and bowel behavior sequence.
[0049] In this embodiment of the invention, the abnormal defecation ratio is the proportion of abnormal defecation events in which the defecation behavior parameters of the target user exceed the defecation habit range within a set time window (such as one week) to the total number of defecation events. This includes the abnormal ratio of daily defecation strain index, the abnormal ratio of daily defecation duration, the abnormal ratio of weekly defecation strain index, and the abnormal ratio of weekly defecation duration. The abnormal defecation ratio is used to quantify the severity of defecation difficulties and the degree to which they meet the Rome IV diagnostic criteria.
[0050] The diagnostic criteria for functional constipation cited in this application under the Rome IV criteria must meet two or more of the following six conditions: ① experiencing straining in more than 25% of bowel movements; ② having hard or dry stools in more than 25% of bowel movements; ③ experiencing a feeling of incomplete evacuation in more than 25% of bowel movements; ④ experiencing a feeling of anorectal obstruction in more than 25% of bowel movements; ⑤ requiring manual assistance in more than 25% of bowel movements; ⑥ having fewer than 3 spontaneous bowel movements per week.
[0051] In this embodiment of the invention, the defecation abnormality ratio of the target user is calculated based on the defecation habit interval and defecation behavior sequence, including: counting the number of times the comprehensive defecation effort index of each defecation behavior in a single day is greater than a preset effort threshold, to obtain the number of effort abnormalities; counting the number of times the defecation duration of each defecation behavior in a single day is greater than the upper bound of the quantile of the defecation habit interval, to obtain the number of duration abnormalities; extracting the defecation frequency in a single day from the defecation behavior sequence, and calculating the ratio of the number of effort abnormalities and the number of duration abnormalities to the defecation frequency, to obtain the proportion of effort abnormalities and the proportion of duration abnormalities in a single day; counting the total number of effort abnormalities, the total number of duration abnormalities, and the total number of defecations in a preset period; calculating the ratio of the total number of effort abnormalities and the total number of duration abnormalities to the total number of defecations, to obtain the weekly proportion of effort abnormalities and the weekly proportion of duration abnormalities; and summing the weekly proportion of effort abnormalities and the weekly proportion of duration abnormalities to obtain the defecation abnormality ratio of the target user.
[0052] In detail, the defecation effort index of a single defecation event is obtained, and the defecation effort index is compared with a preset effort threshold (the effort threshold can be calibrated based on group experimental data). If the defecation effort index is greater than the effort threshold, the defecation event is determined to be a strained defecation and marked as an abnormal effort event.
[0053] In this embodiment of the invention, the defecation exertion comprehensive index is compared with the upper bound of the quantile of the defecation habit interval corresponding to the defecation exertion index behavioral component. If the defecation exertion comprehensive index is greater than the upper bound of the quantile, the defecation event is determined to be a significantly strained defecation event and marked as an abnormal exertion event. The determination of abnormal exertion events adopts a dual mechanism combining a preset fixed threshold and a habit interval. As long as either condition is met, it is determined to be an abnormal exertion event and recorded as one abnormal exertion event. This dual determination mechanism ensures both the universality based on group statistics and the adaptability to individual differences.
[0054] Specifically, for each defecation behavior within a single day, the defecation duration is extracted from the defecation behavior sequence. The defecation duration is compared with the upper bound of the quantile of the defecation duration habit interval. When the defecation duration is greater than the upper bound of the quantile, the defecation is determined to be an abnormal defecation in duration. After traversing all defecation behaviors within a single day, the number of abnormal defecations in duration is accumulated to obtain the number of abnormal defecations in duration for a single day.
[0055] In this embodiment of the invention, the frequency of defecation per day is extracted from the defecation behavior sequence as the denominator, and the number of abnormal straining times and the number of abnormal duration times are used as the numerators. The ratios are calculated to obtain the proportion of abnormal straining times and the proportion of abnormal duration times within a single day. These two ratios reflect the prevalence of abnormal straining times and abnormal duration times in defecation per day and can be used to determine whether there are symptoms of defecation difficulty within a single day.
[0056] Furthermore, the preset period can be a natural week as the time window (dividing the analysis window of length D days into multiple weeks). Within the time window, the number of straining abnormalities on each day is accumulated to obtain the total number of straining abnormalities, the number of duration abnormalities on each day is accumulated to obtain the total number of duration abnormalities, and the number of defecation frequencies on each day is accumulated to obtain the total number of defecations. The total number of straining abnormalities is divided by the total number of defecations to obtain the weekly straining abnormality ratio, and the total number of duration abnormalities is divided by the total number of defecations to obtain the weekly duration abnormality ratio. These two weekly scale ratios directly correspond to the core quantitative indicator in the Rome IV criteria of "feeling strain in more than 25% of defecations", which is used to determine whether the defecation difficulty criteria of functional constipation are met.
[0057] In this embodiment of the invention, the abnormal proportion of weekly exertion and the abnormal proportion of weekly duration within a cycle are structurally combined to obtain the abnormal defecation proportion of the target user.
[0058] S5. Determine the level of defecation difficulty for the target user based on the proportion of abnormal defecation.
[0059] In this embodiment of the invention, the defecation difficulty level is an assessment result that grades the severity of defecation difficulty of the target user based on the degree of conformity between the proportion of abnormal defecation and the Rome IV diagnostic criteria. The levels include no defecation difficulty, defecation difficulty (mild / moderate / severe), and meeting the Rome IV functional constipation criteria. The Rome IV criteria require that the diagnosis of functional constipation meet two or more of the six conditions, and that the symptoms have been present for at least 6 months and have met the diagnostic criteria in the past 3 months.
[0060] In this embodiment of the invention, determining the defecation difficulty level of a target user based on the proportion of abnormal defecation includes: The abnormal proportions of weekly straining and weekly duration within the abnormal defecation proportions are compared with preset abnormal thresholds, and the total number of defecations is compared with a preset weekly frequency threshold. If the abnormal proportions of weekly straining and weekly duration are both less than the abnormal thresholds, and the total number of defecations is greater than or equal to the weekly frequency threshold, the target user's defecation difficulty level is determined to be no defecation difficulty. If the abnormal proportions of weekly straining or weekly duration are both greater than or equal to the abnormal thresholds, and the total number of defecations is less than the weekly frequency threshold, the target user's defecation difficulty level is determined to be constipation. If the abnormal proportions of weekly straining or weekly duration are both greater than or equal to the abnormal thresholds, and the total number of defecations is greater than or equal to the weekly frequency threshold, the target user's defecation difficulty level is determined to be defecation difficulty. If the abnormal proportions of weekly straining and weekly duration are both less than the abnormal thresholds, and the total number of defecations is less than the weekly frequency threshold, the target user's defecation difficulty level is determined to be defecation difficulty.
[0061] In detail, based on the judgment logic of exceeding 25% in the Rome IV standard, the preset abnormal threshold is set to 25%. Then, the relationship between the abnormal weekly force ratio and the abnormal threshold, and the relationship between the abnormal weekly duration ratio and the abnormal threshold are judged respectively, and two Boolean comparison results are obtained. In this invention, both excessive defecation time and excessive defecation force index are mapped to the clinical symptom of feeling strained during defecation. Therefore, if either one is satisfied, it is considered that there is a strained performance.
[0062] In this embodiment of the invention, based on the judgment logic of "less than 3 spontaneous bowel movements per week" in the Rome IV standard, the preset weekly frequency threshold is set to 3 times, and the relationship between the total number of bowel movements per week and the weekly frequency threshold is judged to obtain the comparison result.
[0063] Specifically, if the proportion of abnormal straining and the proportion of abnormal duration in a week are both below the abnormal threshold, it indicates that the proportion of bowel movements with abnormal straining and duration in a week is lower than the Rome IV diagnostic criteria. Furthermore, if the total number of bowel movements is greater than or equal to three, it indicates that the frequency of bowel movements is normal. Based on this comprehensive assessment, the target user does not have symptoms of difficulty in defecation, and the level of difficulty in defecation is determined to be no difficulty in defecation. There is no need to trigger a health warning, and it is recommended to maintain the routine health monitoring mode.
[0064] In this embodiment of the invention, when the proportion of abnormal exertion per week is greater than or equal to the abnormal threshold or the proportion of abnormal duration per week is greater than or equal to the abnormal threshold, the condition of "feeling strain in more than 25% of defecation times" in the Rome IV criteria is met, and the total number of defecation times is less than three, which meets the condition of "less than three spontaneous defecation times per week" in the Rome IV criteria, the target user simultaneously meets two necessary conditions in the Rome IV diagnostic criteria for functional constipation. The level of defecation difficulty is determined to be constipation, triggering a functional constipation warning, and it is recommended to conduct clinical evaluation and specialist treatment intervention as soon as possible.
[0065] Furthermore, if the proportion of abnormal exertion per week is greater than or equal to the abnormal threshold, or the proportion of abnormal duration per week is greater than or equal to the abnormal threshold, it indicates the presence of symptoms of straining or prolonged defecation, meeting the straining condition in the Rome IV criteria. However, if the total number of defecations is greater than or equal to three, it indicates that the defecation frequency is normal and does not meet the frequency condition in the Rome IV criteria. In this case, the target user only meets one of the six conditions of functional constipation in the Rome IV criteria, and the level of defecation difficulty is determined to be defecation difficulty rather than constipation.
[0066] In this embodiment of the invention, based on the degree of deviation of the comprehensive index of defecation effort and the extreme degree of the longest defecation time per day, defecation difficulties are subdivided into mild (weekly abnormality rate between 25% and 40%, and slight deviation of the comprehensive index of effort), moderate (weekly abnormality rate between 40% and 60%, or moderate deviation of the comprehensive index of effort, or extreme abnormality of the longest defecation time), or severe (weekly abnormality rate exceeding 60%, or severe deviation of the comprehensive index of defecation effort, and extreme abnormality of the longest defecation time), and corresponding graded warning results are output.
[0067] In this embodiment of the invention, when the proportion of abnormal exertion during the week is less than the abnormal threshold and the proportion of abnormal duration during the week is less than the abnormal threshold, it indicates that the degree and duration of exertion during defecation are normal, and there are no symptoms of straining or difficulty in defecation. However, if the total number of defecations is less than three, it indicates that the frequency of defecation has decreased and there is an abnormal situation of prolonged defecation intervals. At this time, although the target user does not meet the straining condition in the Rome IV criteria, there is a subclinical state of abnormal defecation frequency. The level of defecation difficulty is determined to be defecation difficulty (reduced frequency type). Then, it is graded according to the degree of deviation of the total number of defecations from the three-times threshold (two times is mild, one time is moderate, and zero times is severe), and the corresponding graded warning results are output. It is recommended to pay attention to dietary regulation and lifestyle intervention, and to seek clinical consultation when necessary.
[0068] like Figure 3 The diagram shown is a functional block diagram of a defecation difficulty detection device provided in an embodiment of the present invention.
[0069] The defecation difficulty detection device 300 of this invention can be installed in an electronic device. Depending on the functions implemented, the defecation difficulty detection device 300 may include a feature extraction module 301, a defecation index calculation module 302, a defecation habit interval analysis module 303, a defecation abnormality ratio calculation module 304, and a defecation difficulty level determination module 305. The module described in this invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0070] In this embodiment, the functions of each module / unit are as follows: The feature extraction module 301 is used to acquire defecation point cloud data in the restroom scene, and extract the micro-motion features, temporal dynamic features and behavioral features of the target user from the defecation point cloud data. The defecation index calculation module 302 is used to calculate the defecation frequency, defecation duration and defecation effort index of the target user based on the micro-motion characteristics, the temporal dynamic characteristics and the behavioral characteristics, respectively. The defecation habit interval analysis module 303 is used to construct a defecation behavior sequence based on the defecation frequency, the defecation duration and the defecation effort index, and analyze the defecation habit intervals in the defecation behavior sequence. The defecation abnormality ratio calculation module 304 is used to calculate the defecation abnormality ratio of the target user based on the defecation habit interval and the defecation behavior sequence. The defecation difficulty level determination module 305 is used to determine the defecation difficulty level of the target user based on the defecation abnormality ratio.
[0071] In detail, each module in the defecation difficulty detection device 300 described in this embodiment of the invention uses the same technical means as the defecation difficulty detection method described in the accompanying drawings, and can produce the same technical effect, which will not be repeated here.
[0072] like Figure 4 The diagram shown is a schematic diagram of an electronic device for implementing a method for detecting defecation difficulties according to an embodiment of the present invention.
[0073] The electronic device 400 may include a processor 401, a memory 402, a communication bus 403, and a communication interface 404. It may also include a computer program, such as a defecation difficulty detection program, stored in the memory 402 and capable of running on the processor 401.
[0074] Figure 4 Only electronic devices with components are shown; those skilled in the art will understand that... Figure 4The structure shown does not constitute a limitation on the electronic device 400, and may include fewer or more components than shown, or combine certain components, or have different component arrangements.
[0075] For example, although not shown, the electronic device may also include a power supply (such as a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 401 through a power management device, thereby enabling functions such as charging management, discharging management, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.
[0076] It should be understood that the embodiments described are for illustrative purposes only and are not limited to this structure in the scope of the patent application.
[0077] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the defecation difficulty detection method of any of the above embodiments. It should be noted that the computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard disk, a magnetic disk, an optical disk, a computer memory, or a read-only memory (ROM).
[0078] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0079] Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within the invention. No appended diagram markings in the claims should be construed as limiting the scope of the claims.
[0080] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in a system claim may also be implemented by a single unit or device through software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any specific order.
[0081] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for detecting defecation difficulties, characterized in that, The method includes: Acquire defecation point cloud data in a restroom setting, and extract micro-motion features, temporal dynamic features, and behavioral features of the target user from the defecation point cloud data; The defecation frequency, defecation duration, and defecation effort index of the target user are calculated based on the micro-motion characteristics, the temporal dynamic characteristics, and the behavioral characteristics, respectively. A defecation behavior sequence is constructed based on the defecation frequency, defecation duration, and defecation effort index, and the defecation habit intervals in the defecation behavior sequence are analyzed. The proportion of abnormal bowel movements of the target user is calculated based on the bowel habit interval and the bowel behavior sequence. The level of defecation difficulty for the target user is determined based on the proportion of abnormal defecation.
2. The method for detecting defecation difficulties as described in claim 1, characterized in that, The step of calculating the defecation frequency, defecation duration, and defecation effort index of the target user based on the micro-motion characteristics, the temporal dynamic characteristics, and the behavioral characteristics includes: Extract the start and end times of defecation behavior within a single day from the behavioral characteristics, and calculate the defecation duration of a single defecation of the target user based on the start and end times; The start time points are counted to obtain the frequency of bowel movements of the target user within a single day; The maximum micro-motion intensity during a single defecation process is calculated based on the micro-motion characteristics and the temporal dynamic characteristics, and the maximum micro-motion intensity is used as the defecation effort index of the target user.
3. The method for detecting defecation difficulties as described in claim 1, characterized in that, The analysis of the defecation habit intervals in the defecation behavior sequence includes: The defecation behavior sequence is combined into a defecation behavior matrix according to a preset time window; The probability distribution of each behavioral component in the defecation behavior matrix is fitted to obtain the probability model of each behavioral component. Based on the preset confidence criteria and the probability model, the lower bound and upper bound of the quantile for each behavioral component are calculated. The interval between the lower bound and the upper bound of the quantile is defined as the defecation habit interval of the behavioral component.
4. The method for detecting defecation difficulties as described in claim 3, characterized in that, The analysis of the defecation habit interval in the defecation behavior sequence also includes: The mean and standard deviation of the defecation duration and the defecation effort index are calculated based on the probability model. Calculate the duration score and strain score of a single defecation behavior within a single day based on the mean and the standard deviation, respectively. The duration behavior score and the exertion behavior score are weighted and fused to obtain the comprehensive defecation exertion index of the target user for each defecation behavior within a single day.
5. The method for detecting defecation difficulties as described in claim 1, characterized in that, The step of calculating the proportion of abnormal bowel movements of the target user based on the bowel habit interval and the bowel behavior sequence includes: The number of times the combined force index of each defecation behavior within a single day exceeds a preset force threshold is counted to obtain the number of times of abnormal force exertion. The number of times the duration of each defecation behavior within a single day exceeds the upper bound of the quantile of the defecation habit interval is counted to obtain the number of duration abnormalities. The frequency of defecation within a single day is extracted from the defecation behavior sequence. The ratios of the number of abnormal strains and the number of abnormal durations are calculated with the frequency of defecation to obtain the proportion of abnormal strains and the proportion of abnormal durations within a single day. Statistically analyze the total number of abnormal straining events, the total number of abnormal duration events, and the total number of bowel movements within a preset period; The ratios of the total number of abnormal straining events and the total number of abnormal duration events to the total number of defecation events are calculated to obtain the weekly abnormal straining ratio and the weekly abnormal duration ratio. By summing the weekly abnormal force ratio and the weekly abnormal duration ratio, the defecation abnormality ratio of the target user is obtained.
6. The method for detecting defecation difficulties as described in claim 1, characterized in that, The extraction of the target user's micro-motion features, temporal dynamic features, and behavioral features from the defecation point cloud data includes: The temporal dynamic characteristics of the target user are calculated based on the horizontal coordinate information, vertical coordinate information, height information, and energy information in the defecation point cloud data. Analyze the micro-motion characteristics of the target user based on the speed information in the defecation point cloud data; Obtain the centroid height of the target user, and calculate the behavioral characteristics of the target user based on the centroid height.
7. The method for detecting defecation difficulties as described in claim 1, characterized in that, Determining the defecation difficulty level of the target user based on the proportion of abnormal defecation includes: The abnormal proportion of weekly exertion and the abnormal proportion of weekly duration in the abnormal defecation proportion are compared with preset abnormal thresholds, and the total number of defecations in the preset cycle is compared with the preset weekly frequency threshold. If the weekly force abnormality ratio is less than the abnormal threshold and the weekly duration abnormality ratio is less than the abnormal threshold, and the total number of defecations is greater than or equal to the weekly frequency threshold, then the target user's defecation difficulty level is determined to be no defecation difficulty. If the abnormal proportion of weekly exertion is greater than or equal to the abnormal threshold or the abnormal proportion of weekly duration is greater than or equal to the abnormal threshold, and the total number of bowel movements is less than the weekly frequency threshold, then the target user's bowel movement difficulty level is determined to be constipation. If the abnormal proportion of weekly exertion is greater than or equal to the abnormal threshold or the abnormal proportion of weekly duration is greater than or equal to the abnormal threshold, and the total number of bowel movements is greater than or equal to the weekly frequency threshold, then the target user's bowel movement difficulty level is determined to be bowel movement difficulty. If the weekly abnormal force ratio is less than the abnormal threshold, the weekly abnormal duration ratio is less than the abnormal threshold, and the total number of bowel movements is less than the weekly frequency threshold, then the target user's bowel movement difficulty level is determined to be bowel movement difficulty.
8. A device for detecting defecation difficulties, characterized in that, The device includes: The feature extraction module is used to acquire defecation point cloud data in a restroom setting, and extract the micro-motion features, temporal dynamic features, and behavioral features of the target user from the defecation point cloud data. The defecation index calculation module is used to calculate the defecation frequency, defecation duration, and defecation effort index of the target user based on the micro-motion characteristics, the temporal dynamic characteristics, and the behavioral characteristics, respectively. The defecation habit interval analysis module is used to construct a defecation behavior sequence based on the defecation frequency, the defecation duration, and the defecation effort index, and to analyze the defecation habit intervals in the defecation behavior sequence. The defecation abnormality ratio calculation module is used to calculate the defecation abnormality ratio of the target user based on the defecation habit interval and the defecation behavior sequence. The defecation difficulty level determination module is used to determine the defecation difficulty level of the target user based on the proportion of abnormal defecation.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the defecation difficulty detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the defecation difficulty detection method as described in any one of claims 1 to 7.