Hemorrhoid and fistula risk prediction and prevention system
The hemorrhoid and fistula risk prediction system, which integrates environmental monitoring, sound wave and pressure data analysis, and combines spectral analysis and linear discriminant analysis, accurately classifies risk levels and predicts lesion trends. It solves the problems of insufficient personalization and real-time performance in traditional systems, realizes the accuracy of hemorrhoid and fistula risk assessment and the personalization of preventive measures, and improves the prevention effect.
Patent Information
- Application Number
- CN202411452824.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-10-17
AI Technical Summary
Traditional hemorrhoid and fistula risk prediction systems have shortcomings in real-time and personalized prevention. They lack in-depth consideration of individual differences, resulting in overly generalized and universal intervention measures that cannot accurately match individual needs. Furthermore, they lack monitoring and analysis of real-time changes in health status, leading to increased uncertainty in the effectiveness of preventive measures.
The system employs modules for environmental factor monitoring, acoustic wave acquisition and analysis, anal pressure monitoring, signal feature analysis, risk rating algorithm, and lesion prediction. By integrating modules such as environmental monitoring, acoustic wave and pressure data analysis, and signal feature analysis, and combining spectral analysis and linear discriminant analysis, it accurately classifies risk levels and predicts lesion trends through time series analysis, proposing personalized intervention measures.
It improves the accuracy of hemorrhoid and fistula risk assessment and the timeliness of preventive measures, realizes the refinement and personalization of disease management, can reveal potential health threats in advance, provide a strong basis for intervention, and significantly improve the effectiveness of preventive measures.
Smart Images

Figure CN118969293A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of risk prediction, and in particular to a hemorrhoidal fistula risk prediction and prevention system. Background Art
[0002] The field of risk prediction technology involves the use of data analysis, machine learning, statistical methods and other technical means to predict and evaluate potential risks. In the field of medical health, it aims to identify the health risks that patients may face at an early stage, so as to achieve early intervention, disease prevention and health management. By analyzing and learning a large amount of data, it is possible to discover the patterns and risk factors of disease development, and provide scientific decision-making support for medical professionals and patients.
[0003] The hemorrhoidal fistula risk prediction and prevention system is a system specifically designed to predict and prevent the risk of hemorrhoidal fistula. Its main purpose is to evaluate the probability of developing hemorrhoidal fistula by analyzing multi-dimensional data such as an individual's medical history, lifestyle, genetic factors, etc. It can propose personalized preventive measures based on risk assessment to help individuals take effective changes in their lifestyles and eating habits, thereby reducing the incidence of hemorrhoidal fistulas, improving the initiative and preventive nature of hemorrhoidal fistula disease management, reducing the health burden and medical costs caused by hemorrhoidal fistulas, and improving people's quality of life.
[0004] Traditional technologies have obvious shortcomings in the comprehensive use of multi-dimensional data, especially in real-time and personalized prevention. They rely on overly generalized risk assessments and lack in-depth consideration of individual differences, resulting in intervention measures that are too universal and generalized, making it difficult to accurately match individual actual needs. In addition, the lack of monitoring and analysis of changes in immediate health conditions makes disease prevention strategies slow to respond and unable to fully tap the potential of early intervention, resulting in increased uncertainty in the effectiveness of preventive measures, which may increase patients' health risks, increase medical costs, and reduce quality of life. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a hemorrhoidal fistula risk prediction and prevention system.
[0006] In order to achieve the above-mentioned object, the present invention adopts the following technical scheme: the hemorrhoid fistula risk prediction and prevention system includes an environmental factor monitoring module, an acoustic wave acquisition and analysis module, an anal pressure monitoring module, a signal feature analysis module, a risk rating algorithm module, a lesion prediction module, and an intervention measure recommendation module;
[0007] The environmental factor monitoring module collects external temperature, humidity and individual activity data based on environmental sensors and individuals to obtain an environmental activity data set;
[0008] The sound wave collection and analysis module combines the environmental activity data set to capture the sound waves generated by intestinal activities, analyzes the relationship between the two, and obtains the sound wave activity feature set;
[0009] The anal pressure monitoring module records the pressure fluctuations in the anal area in combination with the acoustic wave activity feature set, and associates the pressure fluctuations with the features in the acoustic wave activity feature set to obtain pressure fluctuation data;
[0010] The signal feature analysis module uses a spectrum analysis method to extract vibration frequency components and energy distribution based on pressure fluctuation data and construct a feature parameter matrix;
[0011] The risk rating algorithm module analyzes the data in the characteristic parameter matrix, performs linear discriminant analysis, and obtains risk level indicators;
[0012] The lesion prediction module uses the risk level index and the autoregressive moving average method to predict the lesion development trend and generate a lesion development prediction record;
[0013] The intervention measure recommendation module proposes dietary adjustment and lifestyle improvement measures based on the lesion development prediction record and obtains an intervention measure list.
[0014] As a further scheme of the present invention, the environmental activity data set includes the average daily temperature, maximum humidity, and average number of active steps; the sound wave activity feature set includes the intestinal peristalsis sound wave frequency, the maximum sound wave intensity, and the sound wave duration; the pressure fluctuation data includes the maximum pressure value of anal contraction, the pressure release rate, and the pressure stability index; the characteristic parameter matrix includes the main frequency of anal pressure fluctuation, the correlation between sound waves and pressure fluctuation energy, and the time-frequency feature clustering index; the risk level index includes the probability score of hemorrhoidal fistula, the contribution of risk factors, and the emergency warning level; the lesion development prediction record includes the expected lesion occurrence month, the lesion development rate, and the critical prevention time window; the intervention measures list includes necessary dietary fiber increase recommendations, recommended daily activity amount, and regular medical examination frequency.
[0015] As a further solution of the present invention, the environmental factor monitoring module includes an environmental data acquisition submodule, a data optimization submodule, and a result analysis submodule;
[0016] The environmental data acquisition submodule activates the temperature and humidity sensor and the activity monitoring device to continuously collect environmental temperature, humidity and individual activity information within a set time interval, timestamps and preliminarily classifies the collected raw data, and generates raw data records;
[0017] The data optimization submodule receives the original data records, screens the data according to a preset threshold, removes outliers, performs linear interpolation on the data set, fills in missing values, segments the data, and performs normalization based on the time series to obtain a standardized data set;
[0018] The result analysis submodule analyzes the data change trend based on the standardized data set, identifies the correlation between the ambient temperature and humidity and the individual activity amount by calculating the data change rate within the difference time window, and constructs the environmental activity data set.
[0019] As a further solution of the present invention, the sound wave collection and analysis module includes a sound wave capture submodule, a sound wave data screening submodule, and a sound environment feature mapping submodule;
[0020] The sound wave capture submodule configures a microphone array in the environment, starts capturing intestinal activity sound waves at a fixed time, records basic properties of the sound waves, including frequency range, intensity and timestamp, organizes the information into a sequence, and generates a sound wave sequence record;
[0021] The sound wave data screening submodule performs preliminary screening based on the sound wave sequence record according to the intensity and frequency range of the sound wave, removes background noise interference items, performs time series analysis on the remaining sound waves, identifies the repeatability of the sound wave pattern, and obtains the sound wave pattern after screening;
[0022] The acoustic environment feature mapping submodule matches and analyzes the screened sound wave patterns with the data in the environmental activity data set, analyzes the interaction between the intestinal activity sound waves and environmental factors and the amount of individual activity, and constructs a sound wave activity feature set.
[0023] As a further solution of the present invention, the anal pressure monitoring module includes a pressure data acquisition submodule, a data integration submodule, and a feature matching submodule;
[0024] The pressure data acquisition submodule deploys sensors in the anal area to record pressure changes in real time, including the magnitude of change, frequency of occurrence, and duration. Data is continuously acquired to form a serialized record to generate a pressure change record.
[0025] The data integration submodule performs preliminary processing on the pressure change record, including removing interference signals introduced by body movement or external factors, reducing data fluctuations, ensuring signal continuity and analyzability, and obtaining a preprocessed pressure signal;
[0026] The feature matching submodule is based on the preprocessed pressure signal, analyzes the key features in the signal, including the pattern of pressure peaks, the changing laws of frequency and amplitude, and identifies the correlation pattern between pressure changes and intestinal activities in combination with the acoustic wave activity feature set to obtain pressure fluctuation data.
[0027] As a further solution of the present invention, the signal feature analysis module includes a frequency analysis submodule, an energy distribution analysis submodule, and a feature parameter construction submodule;
[0028] The frequency analysis submodule performs frequency domain conversion based on the pressure fluctuation data, identifies and records the occurrence frequency and intensity of the frequency components, extracts the key frequency components of the signal, and generates frequency characteristic data;
[0029] The energy distribution analysis submodule performs energy spectrum analysis on the frequency characteristic data, uses spectrum analysis method to calculate the energy value of each frequency component, analyzes the energy distribution of the entire spectrum, and obtains energy distribution data;
[0030] The spectrum analysis method is according to the formula:
[0031]
[0032]
[0033] Calculate the energy value of each frequency component to obtain energy distribution data, where: is the signal in the frequency domain, is the window function adjustment coefficient, is the signal in the time domain, is the window function, is the sampling rate adjustment factor, For frequency The energy spectral density at is the frequency correction offset value, is the signal enhancement factor;
[0034] The characteristic parameter construction submodule comprehensively analyzes the energy distribution data and the identified frequency characteristics, combines data points according to specific rules, constructs a matrix that fully describes the signal characteristics, and obtains a characteristic parameter matrix.
[0035] As a further solution of the present invention, the risk rating algorithm module includes a data preparation submodule, a linear discriminant analysis submodule, and a risk level generation submodule;
[0036] The data preparation submodule performs data standardization based on the characteristic parameter matrix to ensure the scale consistency of variables during the analysis process and obtain standardized characteristic data;
[0037] The linear discriminant analysis submodule uses the standardized feature data to perform linear discriminant analysis, calculates the contribution of features to classification, extracts feature combinations that can distinguish different risk levels, and generates risk discrimination features;
[0038] The risk level generation submodule classifies data samples based on risk discrimination features, assigns each sample to a corresponding risk level, obtains the risk level of each sample, and acquires a risk level indicator.
[0039] As a further solution of the present invention, the lesion prediction module includes a risk level data analysis submodule, a time series modeling submodule, and a trend prediction submodule;
[0040] The risk level data analysis submodule collects risk level indicators, analyzes the changing rules within a time span, identifies the changing trends and patterns of risk levels, and obtains risk level trend data;
[0041] The time series modeling submodule uses the autoregressive moving average method based on the risk level trend data to analyze the relationship between the risk level and time, determine the model parameters, establish a mathematical basis for the prediction of the lesion development trend, and generate a time series model;
[0042] The autoregressive moving average method is based on the formula:
[0043]
[0044] Generate a time series model where is the order of the autoregressive term, is the number of differences required for the original sequence, is the seasonal adjustment factor, is the order of the moving average term, is the autoregression coefficient, is the trend smoothing coefficient, is the moving average coefficient, is the fluctuation adjustment coefficient, is the error adjustment margin, is the lag operator, is the observed value at time point t, is the error term at time point t;
[0045] The trend prediction submodule uses a time series model to predict the changing trend of the risk level in the future, predicts the development of the lesion based on the trend, and obtains the lesion development prediction record.
[0046] As a further solution of the present invention, the intervention measure recommendation module includes a lesion development analysis submodule, a lifestyle improvement suggestion submodule, and a diet adjustment suggestion submodule;
[0047] The lesion development analysis submodule analyzes the potential development trend and key influencing factors of the lesion based on the lesion development prediction record, identifies risk points, and obtains lesion risk analysis results;
[0048] The lifestyle improvement suggestion submodule proposes targeted lifestyle improvement measures based on the lesion risk analysis results, including improving sleep quality and regular physical activities, and generates lifestyle improvement suggestions;
[0049] The dietary adjustment suggestion submodule combines the lesion risk analysis results and lifestyle improvement suggestions to propose a dietary adjustment plan based on individual conditions and development trends, including dietary structure optimization, specific nutrient intake, and obtaining a list of intervention measures.
[0050] Compared with the prior art, the advantages and positive effects of the present invention are:
[0051] In the present invention, modules such as environmental monitoring, sound wave and pressure data analysis, and signal feature analysis are integrated to provide a comprehensive solution for hemorrhoid and fistula risk assessment and prevention. A signal feature analysis module is introduced to deeply mine subtle changes in pressure fluctuation data through spectrum analysis, and linear discriminant analysis is used to accurately divide risk levels. This not only improves the accuracy of risk assessment, but also can customize preventive measures based on specific risk levels to achieve refined and personalized disease management. At the same time, by predicting lesion trends through time series analysis, the system can reveal potential health threats in advance, provide a strong basis for intervention, and significantly improve the timeliness and effectiveness of preventive measures. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 is a system flow chart of the present invention;
[0053] Figure 2 It is a schematic diagram of the system framework of the present invention;
[0054] Figure 3 It is a flow chart of the environmental factor monitoring module of the present invention;
[0055] Figure 4 This is a flow chart of the sound wave collection and analysis module of the present invention;
[0056] Figure 5 It is a flow chart of the anal pressure monitoring module of the present invention;
[0057] Figure 6 It is a flow chart of the signal feature analysis module of the present invention;
[0058] Figure 7 This is a flow chart of the risk rating algorithm module of the present invention;
[0059] Figure 8 This is a flow chart of the lesion prediction module of the present invention;
[0060] Fig. 9 A modular flow chart is proposed for the intervention measures of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0062] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.
[0063] Example 1: Please refer to Figure 1 and Figure 2 ,The hemorrhoid fistula risk prediction and prevention system includes an environmental factor monitoring module, an acoustic wave acquisition and analysis module, anal pressure monitoring module, signal feature analysis module, risk rating algorithm module, lesion prediction module, and intervention measure recommendation module;
[0064] The environmental factor monitoring module collects external temperature, humidity and individual activity data based on environmental sensors and individuals to obtain environmental activity data sets;
[0065] The sound wave acquisition and analysis module combines the environmental activity data set to capture the sound waves generated by intestinal activities, analyzes the relationship between the two, and obtains the sound wave activity feature set;
[0066] The anal pressure monitoring module combines the acoustic wave activity feature set to record the pressure fluctuations in the anal area, and associates them with the features in the acoustic wave activity feature set to obtain the pressure fluctuation data;
[0067] The signal feature analysis module uses spectrum analysis method to extract vibration frequency components and energy distribution based on pressure fluctuation data and construct a feature parameter matrix;
[0068] The risk rating algorithm module analyzes the data in the characteristic parameter matrix, performs linear discriminant analysis, and obtains risk level indicators;
[0069] The lesion prediction module uses the risk level index and the autoregressive moving average method to predict the lesion development trend and generate lesion development prediction records;
[0070] The intervention measure recommendation module proposes dietary adjustments and lifestyle improvement measures based on the lesion development prediction records and obtains a list of intervention measures.
[0071] The environmental activity data set includes the average daily temperature, maximum humidity, and average number of active steps. The sound wave activity feature set includes the intestinal peristalsis sound wave frequency, maximum sound wave intensity, and sound wave duration. The pressure fluctuation data includes the maximum pressure value of anal contraction, pressure release rate, and pressure stability index. The characteristic parameter matrix includes the main frequency of anal pressure fluctuation, the correlation between sound wave and pressure fluctuation energy, and the time-frequency feature clustering index. The risk level indicators include the probability score of hemorrhoidal fistula, the contribution of risk factors, and the emergency warning level. The lesion development prediction record includes the expected month of lesion occurrence, the lesion development rate, and the critical prevention time window. The list of intervention measures includes recommendations for increasing necessary dietary fiber, recommended daily activity, and the frequency of regular medical examinations.
[0072] In the environmental factor monitoring module, data is collected through environmental sensors and individual activity monitoring devices, including information such as average daily temperature, maximum humidity, and average number of steps. The data is first cleaned and normalized to ensure data quality and consistency. Next, the collected data is subjected to trend analysis and pattern recognition through statistical analysis methods to identify potential associations between environmental factors and individual activity and health status. Finally, an environmental activity data set is generated, providing basic data support for subsequent module analysis.
[0073] In the sound wave acquisition and analysis module, the microphone array is used to capture the sound waves generated by intestinal activities, including the frequency of intestinal peristalsis sound waves, the maximum intensity of sound waves, the duration of sound waves and other characteristics. The collected sound wave signals are processed by denoising and spectrum analysis to extract key sound wave feature parameters. Subsequently, the sound wave features are correlated with the environmental activity data set based on the machine learning algorithm to identify the interaction pattern between the two. The generation of the sound wave activity feature set provides important information for understanding the intestinal activity pattern.
[0074] In the anal pressure monitoring module, the pressure fluctuations in the anal area are recorded by the pressure sensor, and the data obtained include information such as the maximum pressure value of anal contraction, pressure release speed, and pressure stability index. The data is processed by signal processing techniques such as filtering and signal enhancement to improve the analyzability of the signal. Subsequently, the correlation analysis is performed based on the acoustic wave activity feature set and the pressure fluctuation data, and the relationship between the two is explored using statistical analysis methods to generate pressure fluctuation data, which provides accurate quantitative indicators for studying the physiological activities of the anal area.
[0075] In the signal feature analysis module, the vibration frequency components and energy distribution in the pressure fluctuation data are carefully analyzed by spectrum analysis. The specific operation includes extracting the signal frequency characteristics by Fourier transform, and then calculating the energy values of different frequency components by energy spectrum analysis. It not only reveals the main frequency components of the signal, but also analyzes the overall pattern of energy distribution. Finally, combining the frequency characteristics and energy distribution, a characteristic parameter matrix is constructed to provide a detailed signal description for assessing the risk level.
[0076] In the risk rating algorithm module, the data in the feature parameter matrix is processed by linear discriminant analysis to identify the feature combination that best represents the risk level. The algorithm first calculates the contribution of each feature to the classification result, and then selects the features with the highest contribution for linear combination to achieve effective distinction between different risk levels. Finally, risk level indicators are generated, including the probability score of hemorrhoid fistula, the contribution of risk factors, and the emergency warning level, which provide a scientific basis for the accurate assessment of lesion risk.
[0077] In the lesion prediction module, the autoregressive moving average method is used to perform time series analysis on the risk level indicators to predict the development trend of the lesions. The analysis process is refined to include information such as the month when the lesions are expected to occur, the speed of lesion development, and the key prevention time window. Through in-depth analysis of past and current risk level data, the model can predict the possible trend of lesions in the future and generate lesion development prediction records, providing an important reference for formulating timely and effective preventive measures.
[0078] In the intervention recommendation module, based on the lesion development prediction records and taking into account the individual's specific situation, targeted dietary adjustments and lifestyle improvement measures are proposed. The operation is refined to include specific content such as recommendations for increasing necessary dietary fiber, recommended daily activity, and the frequency of regular medical examinations. Personalized intervention measures are designed to reduce the incidence of hemorrhoids and fistulas. Through scientific lifestyle adjustments and dietary management, a comprehensive health protection plan is provided for individuals, and a list of intervention measures is obtained, which is an important reference for individuals and medical professionals to guide health management and disease prevention.
[0079] See also Figure 2 and Figure 3 ,The environmental factor monitoring module includes an environmental data acquisition submodule, a data optimization submodule, and a result analysis submodule;
[0080] The environmental data acquisition submodule activates the temperature and humidity sensors and the activity monitoring device to continuously collect the environmental temperature, humidity and individual activity information within the set time interval, timestamps and preliminarily classifies the collected raw data, and generates raw data records;
[0081] In the environmental data collection submodule, the temperature and humidity sensors and activity monitoring devices are activated to collect environmental temperature, humidity and individual activity data at regular intervals. The Python Pandas library is used for data preprocessing, including adding a timestamp pd.to_datetime() to each piece of data, and preliminarily classifying it according to the data type, using the .groupby() method to group the data, and finally forming the original data records.
[0082] The data optimization submodule receives the original data records, filters the data according to the preset threshold, removes outliers, performs linear interpolation on the data set, fills in missing values, segments the data, and normalizes it based on the time series to obtain a standardized data set;
[0083] In the data optimization submodule, the original data records are received, the NumPy library is used to filter the data, and the np.where() function is used to set the outlier threshold for elimination. For missing data, np.interp() is used to implement linear interpolation. In order to perform data standardization, the StandardScaler() function is used to normalize the time series data, and the .reshape() function is used to adjust the data shape to meet the needs of subsequent analysis and generate a standardized data set.
[0084] The result analysis submodule analyzes the data change trend based on the standardized data set, identifies the correlation between the ambient temperature and humidity and the individual activity amount by calculating the data change rate within the difference time window, and constructs the environmental activity data set;
[0085] In the result analysis submodule, based on the standardized data set, the statistical function stats.pearsonr() of the SciPy library was used to analyze the correlation between environmental temperature and humidity and individual activity. The Matplotlib library was used to draw a data trend graph, and plt.plot() was used to show the data change rate in different time windows, so as to identify the change trend and finally construct and generate an environmental activity data set. This step deeply explored the interaction between environmental factors and individual activity, laying the foundation for further health risk analysis.
[0086] See also Figure 2 and Figure 4 ,The sound wave acquisition and analysis module includes a sound wave capturing submodule, a sound wave data screening submodule, and a sound environment feature mapping submodule;
[0087] The sound wave capture submodule configures the microphone array in the environment, starts to capture the sound waves of intestinal activities at a fixed time, records the basic properties of the sound waves, including frequency range, intensity and timestamp, organizes the information into a sequence, and generates a sound wave sequence record;
[0088] In the sound wave capture submodule, the microphone array in the environment is configured, and the Audacity software is used to automatically start recording and regularly collect the sound waves generated by intestinal activities. The recorded sound wave data is read through the Python wave library, and the sound wave file is obtained using the wave.open() function. The basic properties of the sound wave, such as the frequency range and intensity, are extracted using the readframes() method. A timestamp is added to each sound wave sample, and the acquisition time is recorded using datetime.now(), which is organized into a sound wave sequence record.
[0089] The sound wave data screening submodule performs preliminary screening based on the sound wave sequence records according to the intensity and frequency range of the sound waves, removes background noise interference, performs time series analysis on the remaining sound waves, identifies the repeatability of the sound wave pattern, and obtains the sound wave pattern after screening;
[0090] In the acoustic wave data screening submodule, based on the acoustic wave sequence records, the signal.spectrogram() function in the SciPy library is used to perform spectrum analysis on the acoustic wave to identify the acoustic wave frequency range. Then, the intensity threshold is set, and numpy.where() is used to filter out acoustic wave signals that are higher than the background noise to eliminate invalid data. The pandas.Series.rolling() method is used to perform time series analysis on the filtered acoustic wave data, identify and mark the repeatability of the acoustic wave pattern, and finally obtain the filtered acoustic wave pattern.
[0091] The acoustic environment feature mapping submodule matches and analyzes the filtered sound wave patterns with the data in the environmental activity data set, analyzes the interaction between intestinal activity sound waves and environmental factors and individual activity levels, and constructs a sound wave activity feature set;
[0092] In the acoustic environment feature mapping submodule, the filtered sound wave patterns are associated with the data in the environmental activity dataset. The correlation coefficient between the sound wave features and environmental factors (such as temperature and humidity) and the amount of individual activity is calculated using numpy.corrcoef() of the NumPy library to analyze the interaction between intestinal activity sound waves and environmental factors. Based on the analysis results, the sound wave activity feature set is constructed using Pandas' DataFrame. The feature set contains correlation indicators between intestinal peristalsis sound wave frequency, sound wave maximum intensity, sound wave duration and environmental activity data, providing comprehensive information for further analysis.
[0093] See also Figure 2 and Figure 5 ,The anal pressure monitoring module includes a pressure data acquisition submodule, a data integration submodule, and a feature matching submodule;
[0094] The pressure data acquisition submodule deploys sensors in the anal area to record pressure changes in real time, including the magnitude of change, frequency of occurrence, and duration. Data is continuously collected to form a serialized record to generate a pressure change record.
[0095] In the pressure data acquisition submodule, the sensor deployed in the anal area realizes real-time data acquisition through Arduino programming, recording the pressure changes including the amplitude, frequency and duration. The collected data is transmitted to the computer through serial communication, and the Python script is used to realize automatic reading, and the Serial.read() method in the serial library is used to capture the sensor data. Each data is timestamped by the datetime library, and the pandas library is used to build a DataFrame to realize data serialization and form a record of pressure changes.
[0096] The data integration submodule performs preliminary processing on the pressure change records, including removing interference signals introduced by body movement or external factors, reducing data fluctuations, ensuring signal continuity and analyzability, and obtaining preprocessed pressure signals;
[0097] In the data integration submodule, the pressure change records are preliminarily processed, and the data are averaged using the pandas.DataFrame.rolling(window=3).mean() method to reduce interference signals and data fluctuations introduced by body movement or external factors. In addition, the numpy.clip() method is used to set the threshold range of the signal and remove outliers to ensure the continuity and analyzability of the signal. The processed data is standardized by sklearn.preprocessing.StandardScaler() to obtain the preprocessed pressure signal.
[0098] The feature matching submodule is based on the preprocessed pressure signal, analyzing the key features in the signal, including the pattern of pressure peaks, the changing rules of frequency and amplitude, and identifying the correlation pattern between pressure changes and intestinal activities in combination with the acoustic wave activity feature set to obtain pressure fluctuation data;
[0099] In the feature matching submodule, based on the preprocessed pressure signal, numpy.fft.fft() is used for fast Fourier transform to extract the frequency components in the signal. Combined with the acoustic activity feature set, scipy.stats.pearsonr() is used to calculate the correlation coefficient between the pressure signal and the acoustic wave feature, and the correlation pattern between the pressure peak and intestinal activity is analyzed. Cluster analysis is performed using the sklearn.cluster.KMeans(n_clusters=3) method to identify different pressure change patterns and generate pressure fluctuation data. This process deeply explores the interaction between pressure signals and intestinal activity sound waves, providing key data support for further health status assessment and risk prediction.
[0100] See also Figure 2 and Figure 6 ,The signal feature analysis module includes a frequency analysis submodule, an energy distribution analysis submodule, and a feature parameter construction submodule;
[0101] The frequency analysis submodule performs frequency domain conversion based on pressure fluctuation data, identifies and records the occurrence frequency and intensity of frequency components, extracts key frequency components of the signal, and generates frequency characteristic data;
[0102] In the frequency analysis submodule, based on the pressure fluctuation data, the fast Fourier transform (FFT) method is first used to convert the signal to the frequency domain through the numpy.fft.fft() function to identify the frequency and intensity of each frequency component. In this step, the number of sampling points of the FFT transformation is set to the signal length to ensure that subtle frequency changes can be captured. After the analysis is completed, the key frequency components are extracted, including the main vibration frequency and its corresponding intensity, and numpy.argmax() is used to find the frequency point with the largest energy to form frequency characteristic data.
[0103] The energy distribution analysis submodule performs energy spectrum analysis on the frequency characteristic data, uses spectrum analysis methods to calculate the energy value of each frequency component, analyzes the energy distribution of the entire spectrum, and obtains energy distribution data;
[0104] Spectrum analysis method, according to the formula:
[0105]
[0106]
[0107] Calculate the energy value of each frequency component to obtain energy distribution data, where: is the signal in the frequency domain, is the window function adjustment coefficient, is the signal in the time domain, is the window function, is the sampling rate adjustment factor, For frequency The energy spectral density at is the frequency correction offset value, is the signal enhancement factor;
[0108] The execution process is as follows:
[0109] Signal preprocessing optimizes the signal by applying window functions and adjusting coefficients. It will be multiplied by a window function and window function adjustment coefficient , to reduce spectrum leakage and improve spectrum smoothness;
[0110] Sampling rate adjustment, It is used to adjust the sampling rate according to the frequency domain characteristics of the signal, which helps to find the best balance between improving frequency resolution and reducing computational complexity;
[0111] Perform an improved FFT to transform the preprocessed signal Passed to the FFT algorithm, frequency domain conversion is performed, taking into account signal enhancement and frequency correction, which directly affects the accuracy of subsequent energy spectrum calculations;
[0112] Energy spectrum calculation and enhancement, calculation of the signal after FFT conversion The energy spectrum of , combined with signal enhancement factors and frequency correction offset value , to ensure the accuracy and reliability of the energy spectrum.
[0113] By introducing improved parameters, the energy distribution analysis submodule can more accurately calculate the energy value of each frequency component and analyze the energy distribution of the entire spectrum, which not only improves the accuracy and reliability of spectrum analysis, but also increases the flexibility and adaptability of the analysis process, making it better able to meet the needs of complex signal processing.
[0114] The characteristic parameter construction submodule comprehensively analyzes the energy distribution data and the identified frequency characteristics, combines the data points according to specific rules, constructs a matrix that fully describes the signal characteristics, and obtains the characteristic parameter matrix;
[0115] In the feature parameter construction submodule, the energy distribution data and the identified frequency feature data are comprehensively analyzed, and the data frame is constructed using pandas.DataFrame(), combining the energy value and frequency value of each frequency component. These data points are combined by setting specific rules, such as the proportion of energy value to total energy, the cumulative contribution of frequency components, etc. Finally, a feature parameter matrix that fully describes the signal characteristics is constructed, which includes the main frequency of anal pressure fluctuations, the energy correlation with the sound wave characteristics, and the time-frequency feature clustering index, providing a detailed signal description for risk rating and lesion prediction.
[0116] See also Figure 2 and Figure 7 ,The risk rating algorithm module includes a data preparation submodule, a linear discriminant analysis submodule, and a risk level generation submodule;
[0117] The data preparation submodule performs data standardization based on the feature parameter matrix to ensure the scale consistency of variables during the analysis process and obtain standardized feature data;
[0118] In the data preparation submodule, we first extract data from the feature parameter matrix and use sklearn.preprocessing.StandardScaler() to standardize the features to ensure the scale consistency of each variable in subsequent analysis. This step calculates the mean and standard deviation of each feature, applies the transformation (data-mean) / standard deviation to standardize the original data, and generates standardized feature data. This eliminates the impact of different dimensions on model training and improves the accuracy and generalization ability of the model.
[0119] The linear discriminant analysis submodule uses standardized feature data to perform linear discriminant analysis, calculates the contribution of features to classification, extracts feature combinations that can distinguish different risk levels, and generates risk discrimination features;
[0120] In the linear discriminant analysis submodule, linear discriminant analysis (LDA) is performed on the standardized feature data. Through LDA, the statistical contribution of each feature to the classification is calculated, so as to identify the most discriminating feature combination. The ratio of intra-class divergence to inter-class divergence is calculated, and the features that maximize the difference between classes are selected to form risk discriminant features. LDA aims to reduce the dimensionality of the feature space while retaining the key information for class distinction.
[0121] The risk level generation submodule classifies data samples based on risk discrimination features, assigns each sample to a corresponding risk level, obtains the risk level of each sample, and obtains the risk level indicator;
[0122] In the risk level generation submodule, based on the risk discrimination features, the classification algorithms in the sklearn library, such as LogisticRegression, are used to classify the samples, and each sample is classified into the corresponding risk level according to its features. The classification process is based on the relationship model between features and risk levels. After the model training is completed, the risk level of new samples can be automatically identified and the risk level indicator of each sample can be output. The complex feature data is effectively converted into an intuitive risk level assessment, providing a basis for subsequent prevention and intervention measures.
[0123] See also Figure 2 and Figure 8 ,The lesion prediction module includes a risk level data analysis submodule, a time series modeling submodule, and a trend prediction submodule;
[0124] The risk level data analysis submodule collects risk level indicators, analyzes the changing rules within the time span, identifies the changing trends and patterns of risk levels, and obtains risk level trend data;
[0125] In the risk level data analysis submodule, after collecting the risk level indicators, the pandas library is used to perform time series analysis on the data. The .resample() method is used to resample the data according to the time span in order to identify the changing patterns of the risk level in different time periods. Then, the .diff() method is used to calculate the change in the risk level at adjacent time points, and the .rolling(window=3).mean() method is used to smooth the changing trend, identify the changing trend and pattern of the risk level, and form the risk level trend data, which reveals the evolution of the risk level over time and provides a basis for building a time series model.
[0126] The time series modeling submodule uses the autoregressive moving average method based on the risk level trend data to analyze the relationship between the risk level and time, determine the model parameters, establish a mathematical basis for the prediction of the lesion development trend, and generate a time series model;
[0127] Autoregressive moving average method, according to the formula:
[0128]
[0129] Generate a time series model where is the order of the autoregressive term, is the number of differences required for the original sequence, is the seasonal adjustment factor, is the order of the moving average term, is the autoregression coefficient, is the trend smoothing coefficient, is the moving average coefficient, is the fluctuation adjustment coefficient, is the error adjustment margin, is the lag operator, is the observed value at time point t, is the error term at time point t;
[0130] The execution process is as follows:
[0131] Seasonal analysis, analyzing the seasonal characteristics of time series data to determine seasonal adjustment factors The value of helps to accurately reflect seasonal changes in the model;
[0132] Trend analysis, by calculating the long-term trend of the time series and determining the trend smoothing coefficient , in order to adjust for the effect of trend in the autoregressive term;
[0133] Volatility analysis, analyzing short-term fluctuations in time series and determining volatility adjustment coefficients , which helps adjust the impact of volatility in the moving average term;
[0134] Error analysis, assessing the volatility of time series forecast errors to determine the magnitude of error adjustments , thus reflecting the error volatility at different time points in the error term;
[0135] Parameter estimation and model fitting, based on the above analysis, estimate the model parameters and fit the improved ARIMA model;
[0136] Model testing: Use statistical test methods (such as AIC, residual analysis, etc.) to verify the accuracy and predictive ability of the model.
[0137] By applying this improved formula, the autoregressive moving average (ARIMA) method can more accurately analyze and predict the relationship between risk level and time, provide a solid mathematical foundation for the prediction of lesion development trends, and effectively generate a time series model that reflects the dynamic changes in risk level.
[0138] The trend prediction submodule uses the time series model to predict the changing trend of the risk level in the future, predicts the development of the lesion based on the trend, and obtains the lesion development prediction record;
[0139] In the trend prediction submodule, the trained time series model is used to predict the risk level change trend at N time points in the future through the .forecast(steps=N) method. This process calculates the possible trend of the risk level in the future based on the model parameters and historical risk level data, thereby predicting the development of the lesion. Finally, a lesion development prediction record is generated, which describes in detail the expected time of lesion occurrence, development speed and key prevention time window, providing important information for formulating effective intervention measures.
[0140] See also Figure 2 and Fig. 9 ,The intervention measure recommendation module includes the lesion development analysis submodule, the lifestyle improvement suggestion submodule, and the diet adjustment suggestion submodule;
[0141] The lesion development analysis submodule analyzes the potential development trend and key influencing factors of lesions based on the lesion development prediction records, identifies risk points, and obtains lesion risk analysis results;
[0142] In the lesion development analysis submodule, we first conduct an in-depth analysis of the lesion development prediction records, use Python's pandas library to read the record data, and apply the .describe() method to perform statistical analysis on key indicators to reveal the potential development trend of the lesion. Subsequently, we use the logical functions of the numpy library to identify high-risk points, such as screening out samples with high emergency warning levels based on the lesion development speed and expected occurrence month, to form lesion risk analysis results. This analysis helps identify key factors that may lead to the acceleration of lesions and provides a scientific basis for the formulation of targeted intervention measures.
[0143] The lifestyle improvement suggestion submodule proposes targeted lifestyle improvement measures based on the results of the lesion risk analysis, including improving sleep quality and regular physical activities, and generates lifestyle improvement suggestions;
[0144] In the lifestyle improvement suggestion submodule, based on the lesion risk analysis results, the rule engine method is used to formulate improvement measures. This process sets a series of logical rules. If the lesion development speed exceeds the threshold, it is recommended to increase the frequency of physical activity, which is implemented using if-else statements. In this way, personalized lifestyle improvement suggestions are proposed for different risk levels and key influencing factors, including improving sleep quality and regular physical activity, to generate lifestyle improvement suggestions. These suggestions are aimed at slowing the development of lesions and improving the quality of life of individuals by adjusting lifestyle habits.
[0145] The dietary adjustment suggestion submodule combines the results of the lesion risk analysis and the suggestions for improving living habits, and proposes a dietary adjustment plan based on the individual's condition and development trend, including optimizing the dietary structure, the intake of specific nutrients, and obtaining a list of intervention measures;
[0146] In the dietary adjustment suggestion submodule, the results of the lesion risk analysis and the suggestions for improving living habits are combined to comprehensively consider the individual's condition and development trend, and design a dietary adjustment plan. The process uses MinMaxScaler in sklearn.preprocessing to quantify the individual's nutritional intake needs, and uses the data processing function of pandas to match individual needs with the nutritional database, formulate a plan for dietary structure optimization and specific nutrient intake, and generate a list of intervention measures. Through precise dietary adjustments, it aims to provide individuals with scientific nutritional support, assist in lesion prevention and health management.
[0147] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A system for predicting and preventing hemorrhoidal fistula risk, characterized by: The hemorrhoid fistula risk prediction and prevention system includes an environmental factor monitoring module, an acoustic wave acquisition and analysis module, anal pressure monitoring module, a signal feature analysis module, a risk rating algorithm module, a lesion prediction module, and an intervention measure recommendation module; The environmental factor monitoring module collects external temperature, humidity and individual activity data based on environmental sensors and individuals to obtain an environmental activity data set; The sound wave acquisition and analysis module combines the environmental activity data set to capture the sound waves generated by intestinal activity, analyzes the correlation between the two, and obtains the sound wave activity feature set; The anal pressure monitoring module records the pressure fluctuations in the anal area in combination with the acoustic wave activity feature set, and correlates the pressure fluctuations with the features in the acoustic wave activity feature set to obtain pressure fluctuation data; The signal feature analysis module uses a spectrum analysis method to extract vibration frequency components and energy distribution based on pressure fluctuation data and construct a feature parameter matrix; The signal feature analysis module includes a frequency analysis submodule, an energy distribution analysis submodule, and a feature parameter construction submodule; The frequency analysis submodule performs frequency domain conversion based on the pressure fluctuation data, identifies and records the occurrence frequency and intensity of the frequency components, extracts the key frequency components of the signal, and generates frequency characteristic data; The energy distribution analysis submodule performs energy spectrum analysis on the frequency characteristic data, calculates the energy value of each frequency component using a spectrum analysis method, analyzes the energy distribution of the entire spectrum, and obtains energy distribution data; The spectrum analysis method is based on the formula: ; ; Calculate the energy value of each frequency component to obtain energy distribution data, where: is the signal in the frequency domain, is the window function adjustment coefficient, is the signal in the time domain, is the window function, is the sampling rate adjustment factor, Frequency The energy spectral density at is the frequency correction offset value, is the signal enhancement factor; The characteristic parameter construction submodule comprehensively analyzes the energy distribution data and the identified frequency characteristics, combines the data points according to specific rules, constructs a matrix that fully describes the signal characteristics, and obtains the characteristic parameter matrix; The risk rating algorithm module analyzes the data in the characteristic parameter matrix, performs linear discriminant analysis, and obtains risk level indicators; The lesion prediction module uses the risk level index and the autoregressive moving average method to predict the lesion development trend and generate a lesion development prediction record; The intervention measure recommendation module proposes dietary adjustments and lifestyle improvement measures based on the lesion development prediction record and obtains a list of intervention measures.
2. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The environmental activity data set includes the average daily temperature, maximum humidity, and average number of active steps; the sound wave activity feature set includes the intestinal peristalsis sound wave frequency, maximum sound wave intensity, and sound wave duration; the pressure fluctuation data includes the maximum pressure value of anal contraction, pressure release rate, and pressure stability index; the characteristic parameter matrix includes the main frequency of anal pressure fluctuation, the energy correlation between sound waves and pressure fluctuations, and the time-frequency feature clustering index; the risk level index includes the probability score of hemorrhoidal fistula, the contribution of risk factors, and the emergency warning level; the lesion development prediction record includes the expected month of lesion occurrence, the lesion development rate, and the critical prevention time window; the intervention measures list includes necessary dietary fiber increase recommendations, recommended daily activity amount, and regular medical examination frequency.
3. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The environmental factor monitoring module includes an environmental data acquisition submodule, a data optimization submodule, and a result analysis submodule; The environmental data acquisition submodule activates the temperature and humidity sensors and the activity monitoring device to continuously collect environmental temperature, humidity, and individual activity information within a set time interval, timestamps and preliminarily classifies the collected raw data, and generates raw data records; The data optimization submodule receives the original data records, filters the data according to the preset threshold, removes outliers, performs linear interpolation on the data set, fills missing values, segments the data, and performs normalization based on the time series to obtain a standardized data set; The result analysis submodule analyzes the data change trend based on the standardized data set, identifies the correlation between ambient temperature and humidity and individual activity level by calculating the data change rate within the difference time window, and constructs an environmental activity data set.
4. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The acoustic wave acquisition and analysis module includes an acoustic wave capture submodule, an acoustic wave data screening submodule, and an acoustic environment feature mapping submodule; The sound wave capture submodule configures a microphone array within the environment, starts capturing intestinal activity sound waves at regular intervals, records basic sound wave properties, including frequency range, intensity, and timestamp, organizes the information into a sequence, and generates a sound wave sequence record; The acoustic wave data screening submodule performs preliminary screening based on the acoustic wave sequence records according to the intensity and frequency range of the acoustic waves, removes background noise interference items, performs time series analysis on the remaining acoustic waves, identifies the repeatability of the acoustic wave pattern, and obtains the screened acoustic wave pattern; The acoustic environment feature mapping submodule matches and analyzes the filtered sound wave patterns with the data in the environmental activity dataset, analyzes the interaction between intestinal activity sound waves and environmental factors and individual activity levels, and constructs a sound wave activity feature set.
5. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The anal pressure monitoring module includes a pressure data acquisition submodule, a data integration submodule, and a feature matching submodule; The pressure data acquisition submodule deploys sensors in the anus area to record pressure changes in real time, including the magnitude of the change, the frequency of occurrence, and the duration. The data is continuously collected to form a serialized record to generate a pressure change record. The data integration submodule performs preliminary processing on the pressure change records, including removing interference signals introduced by body movement or external factors, reducing data fluctuations, ensuring signal continuity and analyzability, and obtaining a preprocessed pressure signal; The feature matching submodule is based on the preprocessed pressure signal, analyzes the key features in the signal, including the pattern of pressure peaks, and the changing laws of frequency and amplitude. Combined with the acoustic activity feature set, it identifies the correlation pattern between pressure changes and intestinal activity and obtains pressure fluctuation data.
6. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The risk rating algorithm module includes a data preparation submodule, a linear discriminant analysis submodule, and a risk level generation submodule; The data preparation submodule performs data standardization based on the characteristic parameter matrix to ensure the scale consistency of variables during the analysis process and obtain standardized characteristic data; The linear discriminant analysis submodule uses standardized feature data to perform linear discriminant analysis, calculates the contribution of features to classification, extracts feature combinations that can distinguish different risk levels, and generates risk discrimination features; The risk level generation submodule classifies data samples based on risk discrimination features, assigns each sample to a corresponding risk level, obtains the risk level of each sample, and acquires a risk level indicator.
7. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The lesion prediction module includes a risk level data analysis submodule, a time series modeling submodule, and a trend prediction submodule; The risk level data analysis submodule collects risk level indicators, analyzes the changing patterns within a time span, identifies the changing trends and patterns of risk levels, and obtains risk level trend data; The time series modeling submodule uses the autoregressive moving average method based on the risk level trend data to analyze the relationship between the risk level and time, determine the model parameters, establish a mathematical basis for the prediction of the lesion development trend, and generate a time series model; The autoregressive moving average method is based on the formula: ; Generate a time series model where is the order of the autoregressive term, is the number of differences required for the original sequence, is the seasonal adjustment factor, is the order of the moving average term, is the autoregressive coefficient, is the trend smoothing coefficient, is the moving average coefficient, is the fluctuation adjustment coefficient, is the error adjustment margin, is the lag operator, is the observed value at time point t, is the error term at time point t; The trend prediction submodule uses a time series model to predict the changing trend of the risk level in the future, predicts the development of the lesion based on the trend, and obtains the lesion development prediction record.
8. The hemorrhoidal fistula risk prediction and prevention system according to claim 1, characterized in that: The intervention measure recommendation module includes a lesion development analysis submodule, a lifestyle improvement suggestion submodule, and a diet adjustment suggestion submodule; The lesion development analysis submodule analyzes the potential development trend and key influencing factors of the lesion based on the lesion development prediction record, identifies risk points, and obtains lesion risk analysis results; The lifestyle improvement suggestion submodule proposes targeted lifestyle improvement measures based on the results of the pathology risk analysis, including improving sleep quality and regular physical activities, and generates lifestyle improvement suggestions; The dietary adjustment suggestion submodule combines the lesion risk analysis results and lifestyle improvement suggestions to propose a dietary adjustment plan based on the individual's condition and development trend, including dietary structure optimization, specific nutrient intake, and obtaining a list of intervention measures.
Citation Information
Patent Citations
Method and apparatus for converting bioelectric signal data into numerical vector, and method and apparatus for analyzing disease using same
CN116782829A
Method and system for predicting risk of cardiovascular and cerebrovascular diseases
CN118711822A
Diabetes risk early warning system
US20220301708A1
Cited By
Perianal health risk assessment and dynamic intervention management system for military flight personnel
CN121641464A
