Borborygmus signal classification method based on adaptive threshold and priority strategy

The bowel sound signal classification method based on adaptive threshold and priority strategies solves the problem of the inability to distinguish and identify bowel sound event types in existing technologies. It enables accurate detection of single bursts, multiple bursts, and continuous random sound events, improves the adaptability and accuracy of bowel sound analysis, and provides a reliable basis for clinical diagnosis.

CN121545558APending Publication Date: 2026-02-17HEFEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511762827.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Current bowel sound detection technologies cannot effectively distinguish between three types of bowel sound events (single burst events, multiple burst events, and continuous random sound events), and cannot correctly identify and separate events when they overlap or are adjacent, affecting the accuracy of clinical diagnosis.

Method used

A bowel sound signal classification method based on adaptive threshold and priority strategy is adopted. The adaptive threshold is calculated by signal statistical features, and the event interval merging and priority swallowing processing are combined to achieve accurate classification and detection of three types of bowel sound events.

Benefits of technology

It enables accurate classification and detection of three types of bowel sound events, solves the problem of inability to identify them in existing technologies, improves the adaptability and accuracy of bowel sound analysis, and provides a reliable basis for clinical diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121545558A_ABST
    Figure CN121545558A_ABST
Patent Text Reader

Abstract

The invention discloses a borborygmus signal classification method based on an adaptive threshold value and a priority strategy, and the method comprises the steps: 1, obtaining a borborygmus signal data set, and carrying out the short-time Fourier transform of the data set, and obtaining a sound intensity sequence; 2, calculating signal statistical characteristics (a mean value and a standard deviation), and calculating an adaptive detection threshold value based on the signal statistical characteristics; 3, sequentially detecting a single burst (SB) event, identifying a multiple burst (MB) event sequence, and detecting a continuous random sound (CRS) event; 4, performing merging processing on the event intervals of the same type, and performing priority swallowing processing on the event intervals of different types; and 5, outputting a final borborygmus event classification detection result. The self-adaptive threshold value method is adopted, parameters do not need to be set manually, automatic classification detection of three types of borborygmus events of SB, MB and CRS is achieved, the problem of separation and recognition when different types of events are adjacent is systematically solved through the priority strategy, and the method has the advantages of being high in automation degree and high in classification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of signal processing and medical diagnosis, and particularly relates to a bowel sound signal classification method based on adaptive threshold and priority strategy. BACKGROUND

[0002] Bowel sound is a sound signal generated by gastrointestinal peristalsis and content movement, and its frequency, intensity and duration characteristics reflect the physiological and pathological state of the gastrointestinal tract. The collection and analysis of bowel sound signals are important means for non-invasive gastrointestinal function evaluation, and have wide application value in clinical diagnosis, disease monitoring and postoperative recovery evaluation. However, bowel sound signals have the characteristics of weak signal, strong background noise, large individual difference and strong randomness, and the effective frequency is mainly concentrated within 1500Hz, which makes the automatic detection and analysis of bowel sound face many challenges. Bowel sound signals can be divided into three basic types according to their time domain characteristics: Single Burst (SB) is a short-time high-intensity pulse signal, and its duration is usually between 0.03 seconds and 0.5 seconds; Multiple Burst (MB) is composed of multiple short-interval single bursts, showing a sequential feature; Continuous Random Sound (CRS) event has a long duration and relatively stable sound intensity.

[0003] Early bowel sound detection technology mainly adopts a fixed threshold method, which identifies bowel sound events by setting a single sound intensity threshold, but this method has problems such as dependence on manual experience for threshold setting and inability to adapt to individual differences. The traditional manual auscultation method relies on the experience of medical staff, and has problems such as strong subjectivity, time-consuming and laborious, and inability to long-term monitoring, which is difficult to meet the clinical large-scale application demand.

[0004] To improve the fixed threshold method, researchers have proposed adaptive endpoint detection techniques based on single features. Wang Guojing et al. (2019) proposed an endpoint detection method based on short-time energy (STE) in "Recognition of full-abdominal bowel sounds signal based on speech endpoint detection." Drawing on speech endpoint detection techniques, they identified valid bowel sounds by setting energy thresholds and duration thresholds. The method uses adaptive noise cancellation and wavelet threshold denoising for preprocessing, and experiments show that the recognition accuracy is high. Hao Yali et al. (2024) pointed out in "Bowel sound detection method based on residual neural network, bidirectional long short-term memory network and attention mechanism" that methods based on fractal dimension (FD) and high-order statistics (HOS) can be used for bowel sound detection, using the sudden change in signal complexity to detect endpoints. However, single-feature-based endpoint detection methods are simple to implement but have limited robustness, are easily disturbed by background noise, and have decreased detection performance in complex environments; methods based on fractal dimension and high-order statistics can capture nonlinear features of signals, but have high computational complexity, which is not conducive to real-time processing and long-term monitoring applications, and these methods do not involve event type classification.

[0005] To overcome the limitations of single-feature methods, researchers have further proposed multi-feature joint detection techniques. Li Jiahe et al. proposed a multi-parameter three-level decision method based on STE, FD, and zero-crossing rate (ZCR) in "Diagnosis of NEC using a Multi-Feature Fusion Machine Learning Algorithm," which gradually determines the boundaries of bowel sound events through coarse judgment, fine judgment, and end judgment, achieving an accuracy of 83.51% and a sensitivity of 72.23%. The study also proposed a multi-domain feature fusion method that combines mel-frequency cepstral coefficients (MFCC), STE, and ZCR, using machine learning algorithms such as support vector machines (SVM) for classification, achieving an accuracy of 88.00% and a sensitivity of 100.00% in the diagnosis of neonatal necrotizing enterocolitis (NEC), significantly improving classification performance.

[0006] Hao Yali et al. (2024) also proposed a deep learning-based bowel sound detection method, constructing a ResNet-BiLSTM+Att model combining residual neural networks (ResNet), bidirectional long short-term memory networks (BiLSTM), and convolutional block attention modules (CBAM). The model achieved an accuracy of 83%, a recall rate of 76%, and an F1 score of 79% on a clinical dataset containing 10,688 bowel sound events, effectively detecting bowel sound segments and locating their start and end times, outperforming previous algorithms.

[0007] However, the existing endpoint detection technology, whether based on single feature or multi-feature joint method, still has the following key technical defects in practical application: First, the existing automatic detection method only performs endpoint detection and positioning, does not classify and identify the event type, and the output result is only a binary judgment of "whether there is bowel sound", which cannot distinguish SB, MB and CRS three types of events. Different types of bowel sound events reflect different physiological and pathological states of the gastrointestinal tract. The lack of event type classification ability limits the clinical application value of bowel sound analysis. The classification method based on artificial annotation needs professional personnel to listen and annotate one by one, which is time-consuming and laborious and subjective, and is difficult to meet the demand of large-scale clinical application.

[0008] Second, when multiple different types of bowel sound events overlap or are adjacent in time, the existing method lacks effective event separation and priority processing strategy, and cannot correctly identify the boundary and type of each event, which affects the accurate evaluation of the intestinal peristalsis rhythm and further affects the reliability of clinical diagnosis. SUMMARY

[0009] In order to solve the above-mentioned problems existing in the prior art, the present application provides a bowel sound signal classification method based on adaptive threshold and priority strategy, so as to improve the deficiencies of the prior art in event type classification and identification, overlapping event processing, and serialized feature identification, thereby realizing accurate classification and detection of SB, MB and CRS three types of bowel sound events and feature quantization analysis more effectively.

[0010] In order to achieve the above-mentioned application purposes, the following technical solutions are adopted: The bowel sound signal classification method based on adaptive threshold and priority strategy has the characteristics that the following steps are included: Step 1, acquiring a bowel sound signal data set , wherein represents the time stamp of the i-th sampling point, represents the corresponding bowel sound signal amplitude of the i-th sampling point, represents the corresponding bowel sound signal amplitude of the i-th sampling point, represents the corresponding bowel sound signal amplitude of the i-th sampling point, is the total number of sampling points; Step 2, performing short-time Fourier transform on to obtain a sound intensity sequence , wherein is the sound intensity value at the time stamp ; Step 3, based on , calculating signal statistical features, including signal mean and signal standard deviation ; Step 4, calculate the detection threshold of single burst SB event and continuous random sound CRS event using formula (1) and formula (2) respectively : : (1) (2) In formula (1) and formula (2), SB threshold adjustment parameter, CRS threshold adjustment parameter; Step 5, based on , perform layer-by-layer detection processing on to obtain the initial SB event interval set ; Step 6, perform sequence identification of multiple burst MB event interval on the initial SB event interval set to form the initial MB event interval set , and update based on to obtain the updated independent SB event interval set ; Step 7, based on , perform independent detection processing on to obtain the initial CRS event interval set ; Step 8, perform overlapping same type event interval merging processing on , , to obtain the merged SB event interval set , the merged MB event interval set , and the merged CRS event interval set ; Step 9, perform priority swallowing processing on adjacent and non-overlapping different type event intervals in , , to obtain the final SB event interval set , the final MB event interval set , and the final CRS event interval set ; Step 10, output the final SB event interval set , the final MB event interval set The final set of CRS event intervals Complete the classification and detection of bowel sound event intervals.

[0011] The bowel sound signal classification method based on adaptive threshold and priority strategy described in this invention is characterized in that step 5 includes the following: Step 5.1: Define the SB index set ,in and For the first The candidate intervals for each SB event in the original time series The start and end index positions in the data, and satisfying the following conditions: , This represents the total number of candidate intervals. Step 5.2, Index From 1 to Sequential traversal, when index satisfy and At that time, set For the first The starting position of each SB event candidate interval; and continue traversing to the index. satisfy and At that time, set For the first The end position of each SB event candidate interval; and and exist The corresponding timestamps are respectively denoted as and And the first All indexes within the candidate range of SB events The corresponding sound intensities all satisfy ; Step 5.3: Set the boundary extension time length of the SB event interval as... Calculate the first Start time of each SB event interval , No. End time of each SB event interval , No. Duration of each SB event interval ; Step 5.4: Set the minimum duration threshold for the SB event interval as follows. and the maximum duration threshold is ; Step 5.5, for those that satisfy... Filter the candidate intervals of SB events by time range; Step 5.6: For the first [item] filtered by time range... For each candidate interval of SB events, calculate the peak sound intensity within that interval. And based on whether the peak intensity satisfies The candidate interval is subjected to peak intensity verification. The candidate interval is considered to have passed the peak intensity verification only if the above conditions are met. Peak validation coefficient Step 5.7: Arrange the SB event intervals that simultaneously meet the time range condition and the peak intensity condition in order of their starting time to form the initial SB event interval set. ,in, for The total number of SB event intervals; Indicates the first The start time of a qualified SB event interval. Indicates the first The end time of a qualified SB event interval Indicates the first The duration of a qualified SB event interval.

[0012] Furthermore, step 6 includes the following: Step 6.1: Initialize an empty sequence group; set the gap range. ,in, This represents the minimum time interval threshold between adjacent SB events within a sequence. This represents the maximum time interval threshold between adjacent SB events within the sequence, initialized... =1; Step 6.2, Calculation The Middle The time interval between the j+1th SB event interval and the j+1th SB event interval ; Step 6.3, when the following conditions are met At that time, the first The first SB event interval and the (j+1)th SB event interval are added to the sequence group, and step 6.4 is executed; otherwise, it is determined whether there is an SB event interval in the sequence group. If there is, all the SB event intervals in the sequence group are combined into a candidate MB sequence; if there is no SB event interval, step 6.4 is executed. After assigning j+1 to j in step 6.4, return to step 6.2 and execute sequentially until... This process yields several candidate MB sequences. Step 6.5: Set the minimum event interval number threshold. This represents the minimum number of SB events required to form an MB sequence; events with fewer than SB events will be considered. The SB event intervals in the candidate MB sequences and the SB event intervals not included in any candidate MB sequences are all regarded as independent SB event intervals, forming a set of independent SB event intervals; Step 6.6, for quantities not less than For each candidate MB sequence, calculate its start time. End time and duration ,in, This represents the start time of the first SB event interval. This is the end time of the last SB event interval; Step 6.7: Set the duration range of the MB event interval to... ,in, This represents the minimum duration threshold for an MB event interval. This represents the maximum duration threshold for an MB event interval; Step 6.8, satisfying The candidate MB sequences, arranged in chronological order of their start times, constitute the initial set of MB event intervals. ,in, for The total number of MB event intervals, Indicates the first The start time of a MB event interval Indicates the first The end time of a MB event interval Indicates the first The duration of a MB event interval; For duration not satisfied The candidate MB sequences are processed by treating the SB event intervals within them as independent SB event intervals and incorporating them into step 6.5. This process yields a set of independent SB event intervals, which are then sorted by their start times to obtain an updated set of independent SB event intervals. .

[0013] Furthermore, step 7 includes the following: Step 7.1: Define the CRS index set ,in, and For the first The candidate intervals of CRS events in the original time series The starting and ending index positions in the array, and satisfying the following conditions: , This represents the total number of candidate intervals. Step 7.2, set the index From 1 to Sequential traversal, when index satisfy and At that time, set For the first The starting position of each CRS event candidate interval; and continue traversing to the index. satisfy and At that time, set For the first The end position of each CRS event candidate interval; and and exist The corresponding timestamps are respectively denoted as and And the first All indexes within the CRS event candidate interval The corresponding sound intensities all satisfy ; Step 7.3: Set the boundary extension time length of the CRS event interval as... Calculate the first Start time of each CRS event interval , No. End time of each CRS event interval , No. Duration of each CRS event interval ; Step 7.4: Set the minimum duration threshold for the CRS event interval as follows. and the maximum duration threshold is ; Step 7.5, satisfying The CRS event intervals are arranged in chronological order of their start times to form the initial set of CRS event intervals. ,in, for The total number of qualified CRS event intervals; Indicates the first The start time of a qualified CRS event interval. Indicates the first The end time of a qualified CRS event interval Indicates the first The duration of a qualified CRS event interval.

[0014] Furthermore, step 8 includes the following: Step 8.1: Set the overlap detection time tolerance and merge time threshold ; in the same type of event interval set , and In this context, for each set, the preceding event intervals are arranged in chronological order of their start times. and the next event interval ,in and event intervals The start and end times, and event intervals The start and end times; define the time interval between adjacent events. ; Step 8.2: If the overlap condition is met or adjacent conditions Then the event interval and event interval Merged into a new event interval The new event interval replaces the original event interval. and If none of the above conditions are met, the event intervals will not be merged and will be retained separately. and event interval constant; Step 8.3: Perform the following steps respectively, as per steps 8.1 and 8.2. , , Perform the merging operation until merging is no longer possible, thereby obtaining the merged set of SB event intervals. Merged MB event interval set The merged CRS event interval set .

[0015] Furthermore, step 9 includes the following: Step 9.1, for , , Define a higher-priority event interval from any two different event intervals. and low priority event range ,in, and These are the start and end times of the high-priority event interval, respectively. and These are the start and end times of the low-priority event intervals, respectively, with the priority relationship set as: CRS > MB > SB; Step 9.2: Define the minimum time interval Set the CRS to consume MB time threshold. The time threshold for CRS to acquire SB The time threshold for MB to acquire SB ; Step 9.3, Define the swallowing conditions as follows: ,in, Represents any throughput time threshold, and ∈{ , , }; Step 9.4, when , , When any two different types of event intervals satisfy the merging condition, the time range of the higher-priority event interval is expanded to... This process involves merging low-priority event intervals into high-priority event intervals until no further merging is possible, thus obtaining the final set of SB event intervals. The final set of MB event intervals The final set of CRS event intervals .

[0016] Furthermore, step 10 includes the following: Step 10.1: Output the final set of SB event intervals. ,in This represents the total number of SB event intervals. Indicates the first The start time of each final SB event interval, Indicates the first The end time of each final SB event interval, Indicates the first The duration of each final SB event interval; Step 10.2: Output the final set of MB event intervals. ,in This represents the total number of MB event intervals in the final event range; Indicates the first The start time of each final MB event interval, Indicates the first The end time of each final MB event interval. Indicates the first The duration of each final MB event interval; Step 10.3: Output the final CRS event interval set. ,in This represents the total number of CRS event intervals. Indicates the first The start time of each final CRS event interval, Indicates the first The end time of each final CRS event interval, Indicates the first The duration of each final CRS event interval.

[0017] The present invention provides an electronic device, including a memory and a processor, characterized in that the memory is used to store a program that supports the processor in executing the bowel sound signal classification method, and the processor is configured to execute the program stored in the memory.

[0018] The present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, performs the steps of the bowel sound signal classification method.

[0019] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention employs an adaptive threshold calculation method based on signal statistical characteristics. It automatically calculates the detection thresholds for SB and CRS events based on the mean and standard deviation of the sound intensity sequence, and can dynamically adjust the detection thresholds according to the actual statistical characteristics of each signal segment. This eliminates the need for manual parameter setting, solving the problems of fixed thresholds failing to adapt to individual differences among subjects and threshold settings relying on human experience, thus improving the adaptability and accuracy of the detection.

[0020] 2. This invention achieves automatic classification and detection of single-burst SB events, multiple-burst MB events, and continuous random CRS events, overcoming the core deficiency of existing technologies that can only perform endpoint detection and cannot distinguish event types. Specifically, the detection of MB events employs a sequence recognition method. By analyzing the time interval between adjacent SB events, multiple SB events that meet the interval condition are identified as a single MB event, and the serialization features of the MB event are extracted. This avoids the problem of misclassifying multiple burst sequences as multiple independent single-burst events and can capture the rhythmic features of continuous intestinal peristalsis. It elevates bowel sound analysis from a simple presence / absence judgment to type recognition, providing a reliable basis for clinical diagnosis.

[0021] 3. This invention establishes a complete four-stage processing flow from initial detection, sequence identification, merging of similar events, to priority merging. Event intervals are processed according to the priority order CRS > MB > SB, solving the problem of incorrect separation and identification when different types of bowel sound events are temporally adjacent. The priority merging mechanism determines proximity relationships and merges low-priority event intervals into high-priority event intervals, avoiding problems such as blurred event boundaries and incorrect type determination. Attached Figure Description

[0022] Figure 1 This is a flowchart of the bowel sound event detection algorithm of the present invention; Figure 2 This is a schematic diagram illustrating the merging of event intervals of the same type according to the present invention; Figure 3 This is a schematic diagram illustrating the priority processing of different types of events according to the present invention. Detailed Implementation

[0023] This embodiment proposes a bowel sound signal classification method based on an adaptive threshold and priority strategy. This method features high automation, strong classification accuracy, and good robustness, effectively detecting and quantifying three types of bowel sound events: single burst (SB), multiple bursts (MB), and continuous random sounds (CRS). Specifically, the complete process of this method consists of the following steps: Figure 1 The method consists of an initial detection stage and subsequent post-processing stages. The initial detection stage mainly includes short-time Fourier transform, signal statistical feature calculation, and adaptive threshold setting, based on which SB event detection, MB event sequence recognition, and CRS event detection are completed. Building upon this, the method further performs interval merging of similar event types and priority merging of different event types, ultimately outputting the classification result. Specifically, the method includes: Step 1: Obtain the bowel sound signal dataset. An electronic stethoscope is used at a sampling frequency... Long-term continuous signals of abdominal bowel sounds were collected from the subjects, and then... Segmentation, with each segment treated as a sequence of bowel sound signals. Analysis is performed. For any sequence of bowel sound signals, denoted as... ,in For the first Each sampling point timestamp for The corresponding bowel sound signal amplitude, This represents the total number of sampling points for the sequence; in this embodiment, when the sampling frequency is... The duration of each segment is At that time, the total number of sampling points for a single signal segment is .

[0024] Step 2: Process the bowel sound signal sequence Short-time Fourier Transform (SFT) is performed. In this embodiment, the SFT parameters are set as follows: time window width. The overlap rate of adjacent time windows is approximately 88.5%, and the number of Fast Fourier Transform points is... Point; Under this parameter setting, calculate the spectral energy within each time window and map it to the corresponding timestamp. The sound intensity sequence is obtained. ,in, Indicates the timestamp The sound intensity value within the corresponding time window.

[0025] Step 3: Based on the sound intensity sequence obtained in Step 2 Calculate the statistical characteristics of the signal, including the signal mean. and signal standard deviation The arithmetic mean method is used to calculate the signal mean. , sound intensity sequence The total number of sampling points; then the standard deviation of the signal is calculated using the standard deviation formula. Used to measure the sound intensity sequence relative to the signal mean. The degree of dispersion.

[0026] Step 4: Calculate the adaptive threshold. Based on the signal mean obtained in Step 3... and signal standard deviation Set the threshold adjustment parameters for single burst SB events and continuous random sound CRS events. and In this embodiment, it is preferred that... , And satisfy This ensures that the SB event detection threshold is higher than the CRS event detection threshold. Substituting the threshold adjustment parameters into equations (1) and (2), the adaptive thresholds for SB event detection are obtained respectively. Adaptive threshold for CRS event detection : (1) (2) Step 5: Detect Single Burst (SB) events. Based on the single burst (SB) event detection threshold obtained in Step 4. For bowel sound signal sequences By performing layer-by-layer detection and combining it with preset boundary extension time, duration thresholds, and peak validation coefficients, an initial set of SB event intervals is obtained. ; Step 5.1: Define the SB index set ,in, and The first The candidate intervals for each SB event in the original time series The starting and ending index positions in the array, and satisfying the following conditions. , This represents the total number of candidate intervals for SB events; Step 5.2: Identify candidate intervals for SB events using a layer-by-layer detection method. (Index) From 1 to Sequential traversal, when index satisfy and At that time, set For the first The starting position of each SB event candidate interval; and continue traversing to the index. satisfy and At that time, set For the first The end position of each SB event candidate interval; and and exist The corresponding timestamps are respectively denoted as and And the first All indexes within the candidate range of SB events The corresponding sound intensities all satisfy ;; Step 5.3: Set the SB event interval boundary extension time length This is used to expand the time boundary of the candidate interval for SB events; in this embodiment, Preferred .according to and Calculate the first Start time of each SB event interval End time and duration To capture the complete SB event waveform; Step 5.4: Set the duration range of the SB event interval. In this embodiment, the minimum duration threshold for the SB event interval is... Preferred Maximum duration threshold Preferred ; Step 5.5, for those that satisfy... The candidate intervals of SB events are filtered by time range to exclude candidate intervals with too short or too long durations, and only candidate intervals with durations within the set range are retained. Step 5.6: Verify the peak intensity of the SB event candidate intervals filtered by time range. Set the peak intensity verification coefficient. In this embodiment Preferred ; Calculate the first Peak sound intensity within each candidate interval and require it to meet ,Right now Only when the above conditions are met is the candidate interval considered to have passed the peak intensity verification, thereby further eliminating low-intensity interference signals.

[0027] Step 5.7: Arrange the SB event intervals that simultaneously satisfy the duration range condition and the peak intensity condition in order of their start time to form the initial SB event interval set. ,in, for Total number of SB event intervals For the first The start time of a qualified SB event interval. Its end time, Its duration.

[0028] Step 6: Identify multiple burst (MB) event sequences. Based on the initial single burst event interval set obtained in Step 5. By comparing the time intervals of adjacent SB event intervals and performing clustering, multiple bursts of MB event sequences are identified, resulting in an initial set of MB event intervals. At the same time, a new set of SB event intervals is obtained through updating. .

[0029] Step 6.1: Set the time interval range between adjacent SB event intervals and initialize the loop variable. In this embodiment, it is preferable to set the interval range to... seconds, of which The second is used to allow for slight overlap between adjacent SB event intervals after the boundary is extended. The second is used to limit the maximum interval between adjacent SB events within the same MB sequence. The current sequence, used to temporarily store intervals of adjacent SB events, is initialized to empty, and the index is set... .

[0030] Step 6.2: Calculate the time interval between adjacent SB event intervals. For the current index... ,exist Get the first place The and the first Calculate the interval of each SB event. .

[0031] Step 6.3: Determine whether adjacent SB event intervals belong to the same sequence based on the time gap. When At that time, it was believed that the first The and the first Each SB event interval belongs to the same MB sequence: if the current sequence is empty, then the SB event interval will be... The and the first The SB event interval is added to the current sequence; if the current sequence already contains the SB event interval... The interval of the SB event will then be the 1st SB event interval. Each SB event interval is appended to the end of the current sequence. If the current sequence is not empty and the SB event intervals are not within the above range, save all SB event intervals in the current sequence as a candidate MB sequence and clear the current sequence; if the current sequence is empty, proceed directly to the next step.

[0032] Step 6.4: Update the index and complete the traversal. Updated to Return to step 6.2 and continue calculating the adjacent time intervals until... The traversal ends when the specified time is reached. After the traversal, if the current sequence still contains at least two SB event intervals, then the sequence is saved as a candidate MB sequence. Through the above traversal, several candidate MB sequences consisting of multiple SB event intervals can be obtained.

[0033] Step 6.5: Differentiate candidate MB sequences from independent SB events based on a minimum event count threshold. Set a minimum SB event count threshold that constitutes an MB sequence. In this embodiment, the preferred embodiment is... That is, a sequence consisting of at least two or more SB event intervals is considered an MB sequence. For each candidate MB sequence obtained in step 6.4, the number of SB event intervals it contains is counted: when the number is not less than... When the number is less than 1, the sequence is retained as a candidate MB sequence for subsequent calculation of the start and end times and duration of the MB event interval; when the number is less than 1, the sequence is retained as a candidate MB sequence for subsequent calculation of the start and end times and duration of the MB event interval. At that time, each SB event interval in the sequence is considered an independent SB event interval. Simultaneously, SB event intervals that did not participate in any candidate MB sequences are also considered independent SB event intervals, and are merged with the aforementioned independent SB event intervals to obtain a set of independent SB event intervals, which is used for subsequent updates of the SB event interval set. .

[0034] Step 6.6: Calculate the start time, end time, and duration of the candidate MB sequence. For each candidate MB sequence retained in Step 6.5, sort the SB event intervals within the sequence in ascending order of start time, and denote the start time of the first SB event interval as... The end time of the last SB event interval is Define the start and end times of the MB event interval as follows: , And calculate the duration. .

[0035] Step 6.7: Set the duration range of the MB event interval to eliminate abnormal sequences. In this embodiment, the duration range is preferably set to... seconds, of which Seconds are the minimum duration threshold. The second is the maximum duration threshold.

[0036] Step 6.8: Construct the initial MB event interval set and update the SB event interval set. For each candidate MB sequence obtained in Step 6.6, if its duration satisfies... If the sequence is not found, it is retained and recorded as an MB event interval. All MB event intervals that satisfy the duration range condition are then sorted by their start time. The order in which they are arranged forms the initial set of MB event intervals. ,in for The total number of MB event intervals. For those not satisfied... The candidate MB sequence is selected, and each SB event interval within this sequence is treated as an independent SB event interval and added to the set of independent SB event intervals obtained in step 6.5. The set containing all independent SB event intervals from step 6.5 and this step is sorted by start time to form the updated set of SB event intervals. .

[0037] Step 7: Detect Continuous Random Sound (CRS) events. Based on the detection threshold obtained in Step 4... By detecting the sound intensity sequence point by point, it can identify sound intensities that are continuously higher than a certain value. The candidate interval, combined with the boundary extension time and duration threshold , After filtering, an initial set of CRS event intervals is obtained. .

[0038] Step 7.1: Define the CRS index set ,in and The first The candidate intervals of CRS events in the original time series The start and end indices in the data satisfy the following conditions: , This represents the total number of candidate intervals for CRS events.

[0039] Step 7.2: Identify candidate intervals for CRS events using a layer-by-layer detection method. (Index) from to Sequential traversal, when satisfy and At that time, set For the first The starting position of each CRS event candidate interval; continue traversing to the index. satisfy and At that time, set This is the end position of the candidate interval for the CRS event, and... Assign to To record the next candidate interval; and exist The corresponding timestamps are denoted as follows: and This allows for the identification of sound intensities higher than a certain threshold through threshold comparison. The CRS event candidate interval.

[0040] Step 7.3: Set the boundary extension time length of the CRS event interval. In this embodiment, preferably... .according to and Calculate the first Start time of each CRS event interval End time and duration The candidate interval is then expanded by boundary expansion.

[0041] Step 7.4: Set the duration range of the CRS event interval. In this embodiment, preferably... , This is used to exclude candidate intervals with significantly shorter or longer durations.

[0042] Step 7.5: Construct the initial set of CRS event intervals. Retain those that satisfy... The CRS event interval, and sorted by start time Sort in ascending order and renumber them sequentially as number 1. Given several CRS event intervals, we obtain the initial set of CRS event intervals. ,in for The total number of CRS event intervals in the middle; Indicates the first The start time of a qualified CRS event interval. Indicates the first The end time of a qualified CRS event interval Indicates the first The duration of a qualified CRS event interval.

[0043] Step 8: Merge event intervals of the same type. Based on the results obtained in Step 7... , , After initial detection of the three types of events, to avoid excessive segmentation of the same physical event, time merging is performed on event intervals of the same type. Specifically, this is achieved by setting an overlap detection time tolerance. and merge time threshold The process involves detecting and merging adjacent event intervals in each set, sorted by start time, to obtain the final merged event interval set. , , .

[0044] Step 8.1: Set the overlap detection time tolerance and merge time threshold And define the time interval. In this embodiment, the overlap detection time tolerance is... Preferred setting is This is used to allow for slight temporal overlap caused by sampling and boundary extension. For any event type, the preceding event intervals are sequentially adjacent in time within the event set. and the next event interval ,in , event intervals The start and end times, , event intervals The start and end times are defined, and the time interval between them is defined as... .

[0045] Step 8.2: Determine whether to merge adjacent event intervals based on overlap and proximity conditions. For a given merging time threshold... If adjacent event intervals and Satisfy the overlap condition or adjacent conditions If the two events are considered to be consecutive parts of the same event, they need to be merged; the new event interval after merging is defined as... That is, the earlier start time is retained, and the later end time of the two is taken as the end time of the merged event interval; if neither of the above conditions is met, the two event intervals are not merged.

[0046] Step 8.3, respectively for , , The merging operations in steps 8.1 and 8.2 are performed iteratively. In this embodiment, the merging time threshold for different types of events is preferably set as follows: the merging time threshold for a single outbreak event. The time threshold for merging multiple outbreaks The merging time threshold of continuous random sound events Specifically, for After sorting the event intervals in the table by their start time, starting from the first event interval, let... The process involves sequentially performing the judgment and merging steps 8.1 and 8.2 on adjacent event intervals. Whenever a merge occurs, the two original intervals are replaced with the merged new interval, and the same merging judgment is performed on the new interval and subsequent intervals until... The merged SB event interval set is obtained by continuing until no adjacent event intervals satisfy the merging conditions are found. .for and Set the merging time thresholds respectively Take as and According to Repeat steps 8.1 and 8.2 in the same manner until no more event intervals can be merged in each set, thus obtaining the merged MB event interval sets. and the merged CRS event interval set Examples of actual waveforms before and after merging intervals of the same type of event are as follows: Figure 2 As shown.

[0047] Step 9: Perform priority merging on different types of event intervals. Based on the results obtained in Step 8... , , To address the conflict in decision-making when different types of event intervals are close to or partially overlap on the timeline, an event type priority strategy is introduced. Higher-priority events are used to absorb lower-priority events, resulting in the final set of event intervals. , , .

[0048] Step 9.1: Define the high-priority event range and the low-priority event range. For , , For any two different event intervals in the range, define the higher priority event interval as... The low-priority event range is ,in, and These are the start and end times of the high-priority event interval, respectively. and These represent the start and end times of the low-priority event interval. In this embodiment, the priority relationship of event types is: CRS > MB > SB, that is, the priority of continuous random sound (CRS) events is higher than that of multiple bursts (MB) events, and the priority of multiple bursts (MB) events is higher than that of single bursts (SB) events.

[0049] Step 9.2: Define the minimum time interval and set the merging time threshold. For any pair of high-priority event intervals... and low priority event range The minimum time interval between the two is defined as When two event intervals overlap on the time axis, the following condition is met: ,at this time When the two event intervals do not overlap, This represents the minimum time interval between two event intervals. In this embodiment, the throughput time threshold for CRS to anneal MB is preferably set to [value missing]. The time threshold for CRS to acquire SB is The time threshold for MB to acquire SB is This is used to limit the merging operation to be triggered only when different types of events are sufficiently close in time.

[0050] Step 9.3: Define the selection method for the swallowing conditions and the swallowing time threshold. In this embodiment, the conditions that satisfy the swallowing criteria will be defined. The condition is defined as the time proximity condition that triggers the takeover, where, This represents the throughput time threshold under the corresponding event type combination, and Specifically: when the high-priority event is CRS and the low-priority event is MB, take... When the high-priority event is CRS and the low-priority event is SB, take... When the high-priority event is MB and the low-priority event is SB, take... .when When the two types of events are within the above-mentioned threshold range, it is considered that the two types of events are close enough in time or overlap, and the high-priority event should absorb the low-priority event.

[0051] Step 9.4: Iteratively execute the priority merging operation and construct the final event interval set. This is based on the results obtained in Step 8. , , The process involves iteratively executing the merging operations described in steps 9.1 to 9.3, considering the combination relationships between different types of events sequentially. Specifically, for combinations of CRS events and MB events, and CRS events and SB events, the CRS event interval is designated as a high-priority event interval, and the MB or SB event interval is designated as a low-priority event interval. The minimum time interval is then calculated. And select the corresponding throughput time threshold. or When any pair of different type event intervals satisfies the merging condition At that time, the time range of high-priority event intervals is expanded to The process involves replacing the original high-priority event interval with the expanded high-priority event interval, and removing the merged low-priority event interval from the corresponding set. Then, the search continues on the updated event interval set for new pairs of different types of event intervals, repeating the above merger determination and update process until no more event interval pairs satisfying the merger conditions exist between CRS and MB, or between CRS and SB. Finally, for combinations of MB and SB events, the MB event interval is designated as the high-priority event interval, and the SB event interval as the low-priority event interval, and the selected... This process is repeated iteratively, using the same time threshold as the merging time, until no event interval pair satisfying the merging condition exists between MB and SB. Through this iterative process, the adjusted set of SB event intervals is finally obtained. Adjusted MB event interval set and the adjusted CRS event interval set It achieves a unified classification result based on priority in the case of neighboring or overlapping events of different types. An actual waveform example of its priority merging processing is shown below. Figure 3 As shown.

[0052] Step 10: Output the final bowel sound event classification detection results. Based on the results obtained in Step 9... , , The final interval set of the three types of events, along with their quantity, start time, end time, and duration, are used as the output of the bowel sound event classification detection. This output can be used for subsequent statistical analysis, visualization, or clinical decision support.

[0053] Step 10.1: Output the final SB event interval set, and denote the final SB event interval set as... ,in, This represents the total number of final SB event intervals; For the first The start time of each final SB event interval, Its end time, Its duration. This set allows us to obtain both the time range and duration of each SB event, and also... Characterizes the overall frequency of occurrence of a single outbreak event.

[0054] Step 10.2: Output the final set of MB event intervals, and denote the final set of MB event intervals as... ,in, This represents the total number of final MB event intervals; For the first The start time of each final MB event interval, Its end time, Its duration.

[0055] Step 10.3: Output the final CRS event interval set, and denote the final CRS event interval set as... ,in, This represents the total number of CRS event intervals. For the first The start time of each final CRS event interval, Its end time, Its duration.

[0056] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.

[0057] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.

Claims

1. A method for classifying bowel sound signals based on an adaptive threshold and priority strategy, characterized in that, Includes the following steps: Step 1: Obtain the bowel sound signal dataset ,in Indicates the first The timestamp of each sampling point express The corresponding bowel sound signal amplitude, This represents the total number of sampling points; Step 2, for Perform a short-time Fourier transform to obtain the sound intensity sequence. ,in, For timestamps The sound intensity value at that location; Step 3, based on Calculate the statistical characteristics of the signal, including: signal mean. and signal standard deviation ; Step 4: Calculate the detection threshold for a single burst of SB events using equations (1) and (2) respectively. Detection threshold for continuous random sound CRS events : (1) (2) In equations (1) and (2), This is the SB threshold adjustment parameter. This is the CRS threshold adjustment parameter; Step 5, based on ,right Perform layer-by-layer detection processing on the single burst (SB) event intervals to obtain the initial set of SB event intervals. ; Step 6: Set the initial SB event interval set. Sequence identification of multiple burst MB (Multiple Burst) event intervals was performed to construct an initial set of MB event intervals. and based on renew The updated set of independent SB event intervals is obtained. ; Step 7, based on ,right Independent detection processing is performed on the CRS (Continuous Random Sound) event intervals to obtain an initial set of CRS event intervals. ; Step 8, for , , Overlapping event intervals of the same type are merged to obtain a merged set of SB event intervals. The merged set of MB event intervals The merged CRS event interval set ; Step 9, for , , Different types of event intervals that are adjacent and do not overlap are prioritized and merged to obtain the final SB event interval set. The final set of MB event intervals The final set of CRS event intervals ; Step 10: Output the final set of SB event intervals. The final set of MB event intervals The final set of CRS event intervals Complete the classification and detection of bowel sound event intervals.

2. The bowel sound signal classification method based on adaptive threshold and priority strategy according to claim 1, characterized in that, Step 5 includes the following: Step 5.1: Define the SB index set ,in and For the first The candidate intervals for each SB event in the original time series The start and end index positions in the data, and satisfying the following conditions: , This represents the total number of candidate intervals. Step 5.2, Index From 1 to Sequential traversal, when index satisfy and At that time, set For the first The starting position of each SB event candidate interval; and continue traversing to the index. satisfy and At that time, set For the first The end position of each SB event candidate interval; and and exist The corresponding timestamps are respectively denoted as and And the first All indexes within the candidate range of SB events The corresponding sound intensities all satisfy ; Step 5.3: Set the boundary extension time length of the SB event interval as... Calculate the first Start time of each SB event interval , No. End time of each SB event interval , No. Duration of each SB event interval ; Step 5.4: Set the minimum duration threshold for the SB event interval as follows. and the maximum duration threshold is ; Step 5.5, for those that satisfy... Filter the candidate intervals of SB events by time range; Step 5.6: For the first [item] filtered by time range... For each candidate interval of SB events, calculate the peak sound intensity within that interval. And based on whether the peak intensity satisfies The candidate interval is subjected to peak intensity verification. The candidate interval is considered to have passed the peak intensity verification only if the above conditions are met. Peak validation coefficient Step 5.7: Arrange the SB event intervals that simultaneously meet the time range condition and the peak intensity condition in order of their starting time to form the initial SB event interval set. ,in, for The total number of SB event intervals; Indicates the first The start time of a qualified SB event interval. Indicates the first The end time of a qualified SB event interval Indicates the first The duration of a qualified SB event interval.

3. The bowel sound signal classification method based on adaptive threshold and priority strategy according to claim 2, characterized in that, Step 6 includes the following: Step 6.1: Initialize an empty sequence group; set the gap range. ,in, This represents the minimum time interval threshold between adjacent SB events within a sequence. This represents the maximum time interval threshold between adjacent SB events within the sequence, initialized... =1; Step 6.2, Calculation The Middle The time interval between the j+1th SB event interval and the j-th SB event interval ; Step 6.3, when the conditions are met At that time, the first The first SB event interval and the (j+1)th SB event interval are added to the sequence group, and step 6.4 is executed; otherwise, it is determined whether there is an SB event interval in the sequence group. If there is, all the SB event intervals in the sequence group are combined into a candidate MB sequence; if there is no SB event interval, step 6.4 is executed. After assigning j+1 to j in step 6.4, return to step 6.2 and execute sequentially until... This process yields several candidate MB sequences. Step 6.5: Set the minimum event interval number threshold. This represents the minimum number of SB events required to form an MB sequence; events with fewer than SB events will be considered. The SB event intervals in the candidate MB sequences and the SB event intervals not included in any candidate MB sequences are all regarded as independent SB event intervals, forming a set of independent SB event intervals; Step 6.6, for quantities not less than For each candidate MB sequence, calculate its start time. End time and duration ,in, This represents the start time of the first SB event interval. This is the end time of the last SB event interval; Step 6.7: Set the duration range of the MB event interval to... ,in, This represents the minimum duration threshold for an MB event interval. This represents the maximum duration threshold for an MB event interval; Step 6.8, satisfying The candidate MB sequences, arranged in chronological order of their start times, constitute the initial set of MB event intervals. ,in, for The total number of MB event intervals, Indicates the first The start time of a MB event interval Indicates the first The end time of a MB event interval Indicates the first The duration of a MB event interval; For duration not satisfied The candidate MB sequences are processed by treating the SB event intervals within them as independent SB event intervals and incorporating them into step 6.

5. This process yields a set of independent SB event intervals, which are then sorted by their start times to obtain an updated set of independent SB event intervals. .

4. The bowel sound signal classification method based on adaptive threshold and priority strategy according to claim 3, characterized in that, Step 7 includes the following: Step 7.1: Define the CRS index set ,in, and For the first The candidate intervals of CRS events in the original time series The starting and ending index positions in the array, and satisfying the following conditions: , This represents the total number of candidate intervals. Step 7.2, set the index From 1 to Sequential traversal, when index satisfy and At that time, set For the first The starting position of each CRS event candidate interval; and continue traversing to the index. satisfy and At that time, set For the first The end position of each CRS event candidate interval; and and exist The corresponding timestamps are respectively denoted as and And the first All indexes within the candidate range of CRS events The corresponding sound intensities all satisfy ; Step 7.3: Set the boundary extension time length of the CRS event interval as... Calculate the first Start time of each CRS event interval , No. End time of each CRS event interval , No. Duration of each CRS event interval ; Step 7.4: Set the minimum duration threshold for the CRS event interval as follows. and the maximum duration threshold is ; Step 7.5, satisfying The CRS event intervals are arranged in chronological order of their start times to form the initial set of CRS event intervals. ,in, for The total number of qualified CRS event intervals; Indicates the first The start time of a qualified CRS event interval. Indicates the first The end time of a qualified CRS event interval Indicates the first The duration of a qualified CRS event interval.

5. The bowel sound signal classification method based on an adaptive threshold and priority strategy according to claim 4, characterized in that, Step 8 includes the following: Step 8.1: Set the overlap detection time tolerance and merge time threshold ; in the same type of event interval set , and In this context, for each set, the preceding event intervals are arranged in chronological order of their start times. and the next event interval ,in and event intervals The start and end times, and event intervals The start and end times; defining the time interval between adjacent events. ; Step 8.2: If the overlap condition is met or adjacent conditions Then the event interval and event interval Merged into a new event interval The new event interval replaces the original event interval. and If none of the above conditions are met, the event intervals will not be merged and will be retained separately. and event interval constant; Step 8.3: Perform the following steps respectively, as per steps 8.1 and 8.

2. , , Perform the merging operation until merging is no longer possible, thereby obtaining the merged set of SB event intervals. Merged MB event interval set The merged CRS event interval set .

6. The bowel sound signal classification method based on an adaptive threshold and priority strategy according to claim 5, characterized in that, Step 9 includes the following: Step 9.1, for , , Define a higher-priority event interval from any two different event intervals. and low priority event range ,in, and These are the start and end times of the high-priority event interval, respectively. and These are the start and end times of the low-priority event intervals, respectively, with the priority relationship set as: CRS > MB > SB; Step 9.2: Define the minimum time interval Set the CRS to consume MB byte time threshold. The time threshold for CRS to acquire SB The time threshold for MB to acquire SB ; Step 9.3: Define the swallowing conditions as follows: ,in, Represents any throughput time threshold, and ∈{ , , }; Step 9.4, when , , When any two different types of event intervals satisfy the merging condition, the time range of the higher-priority event interval is expanded to... This process involves merging low-priority event intervals into high-priority event intervals until no further merging is possible, thus obtaining the final set of SB event intervals. The final set of MB event intervals The final set of CRS event intervals .

7. The bowel sound signal classification method based on an adaptive threshold and priority strategy according to claim 6, characterized in that, Step 10 includes the following: Step 10.1: Output the final set of SB event intervals. ,in This represents the total number of SB event intervals. Indicates the first The start time of each final SB event interval, Indicates the first The end time of each final SB event interval, Indicates the first The duration of each final SB event interval; Step 10.2: Output the final set of MB event intervals. ,in This represents the total number of MB event intervals in the final event range; Indicates the first The start time of each final MB event interval, Indicates the first The end time of each final MB event interval. Indicates the first The duration of each final MB event interval; Step 10.3: Output the final CRS event interval set. ,in This represents the total number of CRS event intervals. Indicates the first The start time of each final CRS event interval, Indicates the first The end time of each final CRS event interval. Indicates the first The duration of each final CRS event interval.

8. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the bowel sound signal classification method according to any one of claims 1-7, and the processor is configured to execute the program stored in the memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it performs the steps of the bowel sound signal classification method according to any one of claims 1-7.